Help

Getting an array from a webhook

Topic Labels: Automations
2235 3
cancel
Showing results for 
Search instead for 
Did you mean: 
Chaya_Trevor
4 - Data Explorer
4 - Data Explorer

Hi.
i have a webhook to polly API to get poll responses. Every time a new response is filled in, I want to add the vote to airtable. It worked nicely using inputConfig when there was just one response, but when I have multiple responses - I can’t access any item in the results array from the inputConfig UI drop down.

Unsure how to access the body received by the webhook, I was. using the input Config UI to get the values i need to process in the script… but its not showing me what is in the results array…
image
This is what the webhook is receiving (data from documentation):

{
   "id":"8971234khjasdf987asdfkjnq24",
   "question":{
      "id":"sBkL6C2BK7aWdwtTF",
      "text":"Rate your Employee Orientation experience.",
      "results":[
         {
            "id":"sBkL6C2BK7aWdwtTF",
            "created_at":"2018-03-27 22:41:28.939Z",
            "user_id":"U7718512",
            "user_name":"Alex",
            "text":"it was ok",
            "choice_id":1,
            "weight":null,
            "rank":null
         },
         {
            "id":"sBkL6C2BK7aWdwtTF",
            "created_at":"2018-03-27 22:43:28.939Z",
            "user_id":"U7716512",
            "user_name":"Paul",
            "text":"it was ok",
            "choice_id":0,
            "weight":null,
            "rank":null
         }
      ]
   }
}

How can I access the results array?

3 Replies 3

Did you re-test your automation trigger?

Chaya_Trevor
4 - Data Explorer
4 - Data Explorer

Possibly, I don’t know. As I recommended in that thread, you can easily setup advanced webhooks in Make: