How to Send JSON Body Without Value Names?

Hi,

I want to send the following JSON body in a web API. How can I do this in Triggre without needing to include the value names?

{
“values”: [
[
“12:00 AM”,
“Name Last”,
“Globe”,
“Company”,
“No Reason”,
“2000”,
“c:/”
]
]
}

Kind regards,
Melissa

Hi Melissa,
Currently it’s not possible to do that with Triggre. In general it’s quite strange for me to send it like this, since the order of the values will matter a lot.

Maybe it’s possible using the Webhook functionality of Zapier.

1 Like

The issue here is not the ordering, but the fact dat Google Sheets API Append needs an array in an array.
We are looking for a way to accomplish this.

Unfortunately, in this use case Zapier is not an option.

Hi @ronald,

There currently doesn’t seem to be a compatible solution in Triggre indeed. We’ll look into this with the development team. It is a case we haven’t run into yet, nameless arrays inside another array. Or nameless values in general, for that matter.

That being said, I think there is a temporary solution:

Create a PHP script that can convert a JSON structure that Triggre can make, into one that is compatible with Google Sheets, sends it to Google Sheets (without needing to know which sheet etc, that can be sent as data to the script), and returns the exact same structure it gets back from Google to Triggre.

That way, when we have resolved the issue, you can remove this ‘proxy’ script and send data to Google Sheets directly, without having to change a lot in the design.

Would it be an option?

Hi @Jesse, a blast from the past. I was a bit curious if the “nameless array” functionality has been discussed with the dev team and if yes, what the outcome is.

We are still struggling with the fact that we can’t Append to an Excel (Google Sheet) via the API. The amount of records we need to export nightly (>10k) requires this approach.

Hi @ronald,

We discussed it but didn’t find a good solution just yet. For the Web API we have prioritized a few other important features, that allow better use of complex structures.

One of the issues is that we ‘collapse’ lists in lists to a single list. This is a feature that is a core part of the Triggre concept, so in order for this one very specific exception to work we need to really find a good workaround.

I will discuss it with the team again in the light of these new features, perhaps someone has a good idea of how to support this without compromising a core feature of the platform.

That being said I think there is a simple workaround possible as I described using PHP (or another scripting language like Python). Though I think you already use some form of workaround and would (obviously) prefer to see this work natively, it could be a very good solution for the time being.

1 Like