Best answer

How to select a whole object from a response?

  • 2 April 2023
  • 4 replies
  • 170 views

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.

icon

Best answer by Troy Tessalone 3 April 2023, 17:01

View original

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

Userlevel 7
Badge +14

Hi @SuperSang 

Good question.

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

 

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?

Userlevel 7
Badge +14

@SuperSang 

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

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