I need to pass an array of strings into my Webhook body. I’m trying to use a JSON structure in my Webhook API request with “values”: geo_ids where geo_ids is an array of strings like [“3889330”, “3703328”, “3709403”, “3711041”, “3789423”, “3762202”, “3711811”, “3740228”, “3867349”, “3731856”].
However, I’m encountering an issue but can’t identify the problem based on the documentation for how to pass a list of items in. Can anyone help me understand what might be going wrong or if there’s a specific format or requirement I’m missing for this API endpoint?
The workflow that triggers the webhook is:
A workshop button triggers an action (passing a couple of variables including geo_ids) → then the action takes those variables and inputs them into the json as parameters.
The body that works and has been tested is:
{
“day_id”: 2900,
“resource_filters”: [
{
“filter_key”: “trip_intersects”,
“values”: [
“3889330”,
“3703328”,
“3709403”,
“3711041”,
“3789423”,
“3762202”,
“3711811”,
“3740228”,
“3867349”,
“3731856”
] // this array for trip intersects values is what i am referring to as geo_ids
},
{
“filter_key”: “primary_mode”,
“values”: [
“WALKING”,
“BIKING”
]
}
],
“origin_geo_layer_id”: 6622,
“destination_geo_layer_id”: 6622
}
What documentation are you looking at and what API are you trying to call? It would help if you could reference the explicit names used in the product for the workflow you are trying to configure.
I’m using the Webhook Data Connection to hit a private api within our company.
I was kind of able to pinpoint the issue. So the webhook has been configured to accept a list of strings (array of strings) as a parameter.
But when i pass an array of strings through the action to call the webhook, it is reformatted to have extra quotes and back slashes which can be seen in the webhook history. Do you know how to pass a list of strings through a workshop action with the correct format?
As another test, I built a function that calls the webhook and it successfully returns a response from the webhook in the function previewer, but the function fails in workshop.