encodeURIComponent and decodeURIComponent

I’m send json through a webform where the values are encoded using Javascript’s encodeURIComponent, to prevent errors in the json file for special characters etc.

How can I decode this now in Make.com?

Welcome to the Make community!

Have you tried the built-in function decodeURL?

e.g.:

{{decodeURL("text")}}

For more information, see
https://www.make.com/en/help/functions/string-functions#decodeurl--text-

2 Likes

Yes, it seems to only work with Urls

Can you provide an example sample of what you have?

2 Likes

Apologies, I tried again decodeURL does decode text as well.

The problem I have now seems to come from somewhere else:
rest_invalid_json Invalid JSON body passed. Control character error, possibly incorrectly encoded

No problem, glad I could help!

1. If you have a new question in the future, please start a new thread. This makes it easier for others with the same problem to search for the answers to specific questions, and you are more likely to receive help since newer questions are monitored closely.

2. The Make Community guidelines encourages users to try to mark helpful replies as solutions to help keep the Community organized.

This marks the topic as solved, so that:

others can save time when catching up with the latest activity here, and

  • allows others to quickly jump to the solution if they come across the same problem

To do this, simply click the checkbox at the bottom of the post that answers your question:
Screenshot_2023-10-04_161049

3. Don’t forget to like and bookmark this topic so you can get back to it easily in future!

2 Likes