Zapier Webhooks Json Array Wiring

I am having trouble getting Zapier websites to host a true JSON array.

I want the postage 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 (note the missing "[", and "]"). How can I get a properly formatted JSON array from Zapier websites?

{
"attachments": 
    {
    "color": "danger", 
    "text": "foo", 
    "fallback": "My fallback text is here", 
    "title": "My Title is here"
    }
}

      

This is what my Zapier Webhook config looks like:

enter image description here

+3


source to share


1 answer


The default Webhooks> "POST" action forces the alignment of payload values ​​(including those that look like arrays) to strings, so you cannot send an array value that way.

Instead of the POST action, you must use the Custom Request action.



This action allows you to specify the raw JSON payload. You can insert fields from the previous steps anywhere in the object literal as long as the JSON syntax is good.

+5


source







All Articles