Use Formatter to decode and encode HTML in Zaps

Available on plans:

Free

Professional

Team

Enterprise

URLs can only be transmitted over the internet using ASCII character sets.Your URL must be encoded properly to work. If you have an encoded URL and want to convert it into plain text, you must decode it. Formatter’s Text action has two transforms that you can use encode and decode URLs.

  • URL Decode: removes any URL encoding in your data.
  • URL Encode: encodes your data in a valid URL format.
actionEdit icon Example
  • You’re doing an audit of your website to share with a part of your organization’s leadership, who is not familiar with URL encoding. You can use the URL Decoder transform to change it into plain text so it’s easier for them to read. It goes from “financial+assets+2024+in+%24” to “financial assets 2024 in $”.
  • You’re building a new page on your website and want to use the page title, “Awesome home projects!”  as a slug in your URL. You can use the URL Encode transform to encode it, resulting in “Awesome+Home+Projects%21” instead.

1. Add a Formatter step

  • In the Zap editor, click the Action step. A dialog box will open.
  • In the search box, search for and select Formatter. The right sidebar will open to the Setup tab.
  • Click the Action event field to open the dropdown menu and select Text.
  • Click Continue to continue to the Configure tab.

2. Set up your transform

  • Click the Transform field to open the dropdown menu, then select the transform that you want the Zap to perform on your string:
    • URL Decode.
    • URL Encode.
  • In the Input field, manually enter the string you want to transform or map a field from a previous step.
  • If you’re using the URL Decode transform:
    • In the Convert plus to spaces? field, select True if you want Formatter to change all plus signs `+` into spaces or select False if you want Formatter to keep all plus signs + as plus signs.
  • If you’re using the URL Encode transform:
    • In the Convert space to plus? Field, select True if you want Formatter to change all spaces into plus signs + or select False if you want Formatter to leave all spaces as spaces.
  • Click Continue to continue to the Test tab.

3. Test your action

  • Click Test step.
    • The Data out tab will display the transform output so you can confirm your string was formatted correctly.
    • If the new data is not what you expect, you can adjust the transform settings and retest the step again.

Once you’ve set up your Formatter action, you can use the results in further actions in your Zap.

Was this article helpful?
2 out of 3 found this helpful