What is the Correct Way to Escape Characters for a Webhook Post Request in Raw JSON Format?

This topic was automatically generated from Slack. You can find the original thread here.

Hello all, I had a query; sorry if this has been resolved. But I need to escape few characters when sending a via a workflow.

Step: webhook post_request
In the Body in raw JSON format I want to use {{1}} and also \n

My Question: How can I escape these for the code to work.
I tried %7B%7B1%7D%7D and %5Cn but it is not giving favourable output.
It is sending the value as %7B%7B1%7D%7D and %5Cn and not as ~{{1}}~ and ~\n~.

Just to make sure I got this correctly…
You’re sending a POST request to a Pipedream workflow endpoint and in the body of the request you want to include {{1}} and \n?

If you’re sending a JSON, just pass them within a string as usual (it’s valid text). When you finally are ready to process that data is where you would convert it (only if needed, most inputs would automatically convert \n and I imagine your system specifies passing variables like that, which would mean you don’t need to do anything).