List of numbers being passed as string

I have about half an hour at 2:15 (AEST) - about 45 minutes from now. I think there’s a few crossed wires here - if you can send through a zoom or something, I’ll jump on and walk you through it. Just DM me the details.

1 Like

So, we fixed it! I jumped on a call with @ccatalano and we identified the issues, and it was mainly due to arrays being passed directly as a bubble “stringified” structure. To summarise, so as to help anyone else who stumbles on this thread:

  • If you’re trying to use a GET in an API request set up as an “Action” in the API connector (i.e. you want to use the request in a workflow) - you cannot pass an array to any of the parameters. This is because the parameters are passed as strings to the API - so in effect, no matter what you do in trying to pass the array - it just won’t work.
  • As @ccatalano was expecting a File to be returned, it was not possible to use a client-side connector (e.g. Xano Connector) or as a data source in any element - so changing “Action” to “Data” would not have worked either.
  • To work around the above, there was only one option: convert the API to a POST (or any other method except GET). This allows you to pass a full JSON body, where you have full control over the data formatting passed to the API.
  • Avoid adding quotes around dynamic values in the JSON body - add them into the action in your workflow, so you have full control over the data structure and can conditionally choose to pass null (without quotes) when the value should truly be empty.
2 Likes

The call was not with me. I’ve just explained here :wink:

Oops, you’re right - chalk that up to a severe lack of sleep over the last few days due to work. I’ll fix it now!

Edit: fixed, my bad. Sorry @ccatalano!

1 Like