Set columns in multiple rows - Glide API

Hello everyone,

I’m having some dificulties with the Glide API to set columns in multiple rows.

I’m working on a scenario that works as follow:

  • I trigger a webhook from a glide app and send the selected items in Make
  • Create a PDF including the items sent from Glide as a JSON Payload
  • Edit the items in the glide tab with an HTTP module

I have some difficulties with step 3. If I have more than 1 item sent, only the first one is sent in my HTTM module and updated in my glide tab.
Here is an example of my JSON payload send in Make (2 items here) :

[{“Hours”:9.75,“Hourly_rate”:30,“Sent”:false,“Total”:292.5,“Task_title”:“Building Template”,“Project_name”:“OKR”,“id”:“VlRNOmHISlKM03Ww-ouQxw”}, {“Hours”:6.34,“Hourly_rate”:30,“Sent”:false,“Total”:190.2,“Task_title”:“Creating a desktop first template for the Agency.”,“Project_name”:“Real Estate Company”,“id”:“CGicV2ofRL-5GH1Mc4gZyg”}]

My items are defined by an ID, so I tried to “rearrange” the JSON payload to isolate the ids and find the corresponding items in glide but with no success.

The request in my HTTP module is as follow:

    "appID": "nIbJG7XdNVN02TjSnsPF",
    "mutations": [
            "kind": "set-columns-in-row",
            "tableName": "native-table-QPKijX8LgCShuqEeGsAN",
            "columnValues": {
                "5lvgu": {{true}},
                "1gVag": "{{2.created_at}}",
                "wYfmU": "{{5.webViewLink}}",
                "lgjoN": {{false}}
            "rowID": "{{}}"

Thanks for the help!

Have you tried using an iterator module?

Yes but it didn’t work (at least not the way I set it up).

I removed the aggregator and used the array from the JSON parse directly in my HTTP module and now it works!

But I honestly don’t know how since I tried it before and it wasn’t working haha

1 Like

Try, Parse Json>Itirator>Array Agregator

Is that what you are sending as the mutations collection?
If it is, that clearly won’t work as it’s not structured correctly.

You should use a Create JSON module to prepare your payload, see below:

Hi @Darren_Murphy

No I used a Parse JSON, and I use the output in the HTTP module.
Now it works, I don’t know why it wasn’t the case before.

Thanks for your help!

Most likely because on the run where it failed, you were sending invalid JSON (your Make log would confirm if that was the case). And if it failed once, it will eventually fail again.

In your earlier screen shot, it can be seen that you are manually constructing the JSON payload inside the HTTP module:

Doing it this way is fragile and subject to breakage. Bob’s video (the one that I linked to earlier) teaches you how to avoid this problem. Did you watch it?

Hum I see.

I didn’t know it would be an issue to write it manually, I’ll look into Bob’s video.
There is a lot I need to learn with Make and JSON so, thanks for sharing!

1 Like