Skip to main content
Best answer

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

  • April 9, 2020
  • 2 replies
  • 1379 views

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!!

Best answer by andywingrave

Try something like this:

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

You want to pass each field as an array

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

andywingrave
Forum|alt.badge.img+9
  • Zapier Solution Partner
  • Answer
  • April 9, 2020

Try something like this:

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

You want to pass each field as an array


  • Author
  • Beginner
  • April 9, 2020

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!