Skip to main content
Best answer

How to select a whole object from a response?

  • April 2, 2023
  • 4 replies
  • 341 views

SuperSang

When I call a webhook, it returns me a response like this:

{
    lead: {
        id: …
        first_name: ….
         ….
    }
}

 

But when I try to add it into my Postgresql as an externalData, Zapier does not allow me to select only `lead`, instead it shows me only direct property like `Lead Id`, `Lead First Name` etc, which I don’t want.

I want to add the lead response as a JSON string in my row:

{
...
externalData: JSON.stringify(response.lead),
}

Is it possible to do it without using custom code or custom query?

Thanks.

Best answer by Troy Tessalone

@SuperSang 

You can use a Code step to make an API request and handle the response: https://zapier.com/apps/code/help

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

4 replies

Troy Tessalone
Zapier Orchestrator & Solution Partner
Forum|alt.badge.img+14
  • Zapier Orchestrator & Solution Partner
  • April 2, 2023

Hi @SuperSang 

Good question.

Try changing the Zap trigger to this: Webhook - Catch Raw Hook

 


SuperSang
  • Author
  • New
  • April 3, 2023

Thank you @Troy Tessalone , it looks promised. The new issue is we depends on the other trigger as starting point, and the `Webhook - Catch Raw Hook` does not allow me to use as secondary action.

 

Is there any work around for this?


Troy Tessalone
Zapier Orchestrator & Solution Partner
Forum|alt.badge.img+14
  • Zapier Orchestrator & Solution Partner
  • Answer
  • April 3, 2023

@SuperSang 

You can use a Code step to make an API request and handle the response: https://zapier.com/apps/code/help


SuperSang
  • Author
  • New
  • April 3, 2023

Thank you @Troy Tessalone , I feel like it is the last option.