Best answer

How should my webhook payload be formatted to leverage line item support?

  • 9 April 2020
  • 2 replies
  • 1324 views

Userlevel 1

I have payload being sent to Zapier which is currently formatted as an array of objects. A very simplified version:

[
{"id":"asdf1234",
"title":"asdf"},
{"id":"asdf1235",
"title":"fdsa"}
]

If I send this as-is to Zapier Webhook trigger, it’s being split and parsed individually (thereby using up more tasks since each object in the array triggers the zap). Is there a way to format this (I have complete control over the input) so that Zapier parses it in one big payload, but each object as a line item? Ultimately, I want to pass the data to Google Sheets, utilizing the line-item support of those actions.

I’ve tried nesting the array within another object, but that wreck’s Zapier’s parsing causing the array to become one long string.

Thanks!!

icon

Best answer by andywingrave 9 April 2020, 08:29

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.

2 replies

Userlevel 7
Badge +9

Try something like this:

[{
"id": ["asdf1234", "asdf1235"],
"title": ["asdf", "fdsa"]
}]

You want to pass each field as an array

Userlevel 1

Thanks! I got close but didn’t quite get the array structure right. Looks like this is working. Thanks again for the simple and quick response!