Question

Pass RAW json-response in POST request

  • 30 August 2022
  • 3 replies
  • 1908 views

Userlevel 1

Hi,

I have set up a “Custom Request” - Webhook GET request. The result is a JSON response. I want to pass the entire raw data response via POST request, but the response is parsed by Zapier. How can I get the entire unparsed json passed to further steps?

 

Thanks


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

3 replies

Userlevel 7
Badge +12

Hi @ViacheslavB!

Thanks for your question :)

When you say that the payload is parsed, do you mean the way that Zapier is formatting it as it comes in? Are you sending a nested array at all?  There isn’t a way to change the way that Zapier will receive the data but perhaps if you could share a little more detail about what you’re seeing and what you’d like to do with the data in the next step/s we could find a way to workaround it?

Thanks!

Userlevel 1

Hi,

I figured out how to transfer “raw” data, but during such a transfer, double quotes are replaced by single ones and it breaks everything. How to make the data be passed with double quotes, as in the original?

Userlevel 1

WOW after days of banging my head against the wall. I finally found the answer and wanted to leave it here for others as there were several posts that got to the same point as @ViacheslavB but then no one gave an answer OR the answer was to manipulate the string to replace single quotes with double quotes. 

 

I went down the path of string manipulation which I knew was 100% wrong but was without options and had a solution that was getting the sting back to valid JSON but could break at any moment as soon as something that was not accounted for came through the next POST.

 

First thing to note is I found a Zapier Community post (see below)

that said that as of a year ago the single quote issue was a known bug and was going to be resolved. If this was accurate as of today it is still not resolved. However in my case the following worked.

 

Do not use Custom Request go back and set Event to be POST/PUT. In my case I am using POST, then set payload_type  to JSON. If you were like me this is where you started before you went to Custom Request and there is no obvious way to pass through the raw json. However if you simply to not provide any key/value settings to the Data section the JSON passes right through and is valid json when posted to your endpoint.