I'm having trouble getting Zapier's webhooks to post a true JSON array.
I want the webhook post data to be like this:
{
"attachments": [
{
"color": "danger",
"fallback": "My fallback text is here",
"title": "My Title is here",
"text":" foo"
}
]
}
But all I can get is this (notice the missing "[", and "]"). How can I get a properly formatted JSON array from Zapier's webhooks?
{
"attachments":
{
"color": "danger",
"text": "foo",
"fallback": "My fallback text is here",
"title": "My Title is here"
}
}
Here is what my Zapier Webhook configuration looks like:
Select the action app—the app you want to send data to. You'll see form fields to add data to that app. Click in the field where you want to add webhooks data and select it from the dropdown. Test your Zap and it's now ready to use.
If you need to create a Zap to work with an individual inbox, create an API token that has access to your individual inboxes, and utilize the Webhooks by Zapier Zap triggers and actions to issue API calls to Front.
Zapier lets you connect Webhooks by Zapier with thousands of the most popular apps, so you can automate your work and have more time for what matters most—no code required.
The default Webhooks > "POST" action coerces the payload values (including those that look like arrays) to strings, so you can't send an array value this way.
Instead of the "POST" action, you should use the "Custom Request" action.
This action allows you to specify the raw JSON payload. You can insert fields from previous steps anywhere in the object literal as long as the JSON syntax is good.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With