I’ve been digging into using webhooks with a JS application i’ve been developing, to sync the data to our crm and generate some PDFs in real time.
The thing I’m struggling with is on the webhook catch quoting side. A client can submit a quote and then I need to pass those line items on to the next step. The line items will vary, and the number of line items will vary.
So using mock data, i’ve got something like this:
If I wanted to send each person quoted to a google spreadsheet, how would I do that?
The zap only allows mapping of the children [0] of the array, not like “for all first names” do this.
Basically how would I use a webhook to accomplish essentially a for loop in js?
Any help pointing me in the right direction would be great!
Thanks
Ben
Best answer by williamBest answer by william
Hey @bwright, I hope you’re doing well, I just wanted to check in here!
Were you able to get this working, or can we still help out here?
From the description and the information provided by Troy, I believe a good solution here may be available with our standard integrations.
As Troy mention though, using a code step to convert the data into a proper array and then loop through the data would like be the most efficient approach: https://zapier.com/apps/code/help
If you’re needing to perform actions in a loop based on that array, you can use the line itemizer linked above, or a code step as linked by Troy to get a proper array. From there you would send that array into a Looping by Zapier action to loop whatever actions you need based on that line item array.
As Troy mention though, using a code step to convert the data into a proper array and then loop through the data would like be the most efficient approach: https://zapier.com/apps/code/help
If you’re needing to perform actions in a loop based on that array, you can use the line itemizer linked above, or a code step as linked by Troy to get a proper array. From there you would send that array into a Looping by Zapier action to loop whatever actions you need based on that line item array.