Best answer

How to separate multiple lead records provided in a single webhook trigger

  • 6 July 2021
  • 6 replies
  • 276 views

Userlevel 1

I have a webhook set up to pull lead data from salesforce and occasionally it will return multiple records combined into a single response. This is due to an API updating multiple records in salesforce at once.

If you look at the images below, I have three records worth of data nested into the one response. How can I separate these into individual responses?

 

icon

Best answer by Troy Tessalone 6 July 2021, 23:19

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.

6 replies

Userlevel 7
Badge +14

Hi @CMM 

Try using the Looping app for these arrays: https://zapier.com/apps/looping/help

Userlevel 1

Thanks @Troy Tessalone will this work if all the records show up in one response with multiples for each line item.

Eg, Type_of_Cuisine shows up as three lines with three different values. It’s not one line with three values that are separated.

Userlevel 7
Badge +14

@CMM 

When you go to map the values, the data is combined into an array per data point, which is different than how it displays broken out in the screenshots.

Give it a try and let us know how it goes.

Userlevel 1

Hey @Troy Tessalone 

The loop hit an error  Required field "Values to Loop" (loop_values) is missing.

There are three individual arrays in the response, each with duplicate data points. The values have been mapped appropriately (I think) however no values made it into the loop from the webhook response. 

Loop value setup

Any ideas on how to make this work?

 

 

Userlevel 7
Badge +14

@CMM 

You may have to try process of elimination in order to isolate the data point causing the issue OR try a different Looping type.

 

Userlevel 1

@Troy Tessalone 

Text may not work since there’s no delimiter for most data points. It’s one response per line (except for 2 responses where you’re supposed to get multiples ie, Mon, Tues, Wed, etc)

I’ll give it a try though