Skip to main content

Hi !

This is nice on a webhook. But how could I do the same with a custom get request ?

My workflow is : 

  • Webhook
  • POST on api to get a Bearer
  • GET to retrieve Data
  • Send raw data to another solution.

I can not do the last step as I can’t find a solution to retrieve raw body from the 3rd step.

Do you have a solution ?

Thanks

@Tchinkatchuk - You might want to consider using a Code by Zapier step to perform the GET request. This will allow you to retrieve the raw body in the same code step. e.g.

const payload = await fetch("https://...").then((response) => response.json());

payload will contain the JSON payload returned from the GET request.


Thanks @ikbelkirasan ,

I’ll try the fetch with bearer from the previous step. This should work.

Great.


Hi @ikbelkirasan ,

I succeed in getting the payload but do you confirm that this payload will not be available in another step ?

My payload keys are dynamic and I can’t set a static mapping on my next step.

Sylvain


@Tchinkatchuk - If you want the payload to be available in the next steps then simply add it to the code step output.

output =  {
payload
}]

 


Such an idiot.

Thanks @ikbelkirasan 

Everything is fine.


Reply