🎓 Glide Tutorial - Add, Edit or Delete Multiple Rows (Using Glide's API)

What’s up Gliders!

Glide’s new native API functionality has unlocked a ton of power :exploding_head:

I’ve always wanted the ability to natively add, edit, or delete multiple rows without needing Make/Zapier…
And after seeing a quick loom from @Darren_Murphy I was reminded that this is now possible :handshake:

In this video I explain:

  • How to add a predefined list of tasks to a new project.
  • How to delete any tasks related to a project that you delete.

There may be more efficient ways of doing this (e.g. deleting rows via the relation/query column) but the fact that it’s possible via API is what excites me! :fire:

Possible Use Cases Include:

  • Have predefined “groups” of rows that you can add and relate to parent row in a single action.
  • Editing all related rows when the parent row is edited.
  • Deleting all related rows when you delete the parent row.
  • And much, much more!

:popcorn: Enjoy!

15 Likes

Thank you @Loqode for step by step tutorials. So easy to understand.

1 Like

You’re welcome!

1 Like

@Loqode I really need your help to implement Call API columns in one of my projects.

I will explain you my scenario. A Client submits a form with many values in an App. Out of many values, there is one component wherein a client has to select multiple States. What I want is, upon form submission, if 30 states are selected, 30 new rows for each state shall be added in another table.

I followed your instructions as per view and I hope I have done it correctly. However, while executing actions, I am getting an error “Call API: No Response”. Can you help me troublesheet it?

What plan are you on?

I am on Pro plan

image
Here is an screenshot of action

Screenshot of Body column
image

Is there any limit on number of mutations mentioned in CallAPI action? Like I am trying to add 40 rows using this column

The limit is 500 mutations with a single call.

From your screenshots, I don’t see anything obviously wrong. Have you validated your JSON payload using JSON lint?

Also, try sending the same payload with a curl command in a terminal, and see what response you get from the Glide API.

1 Like

Thank you for the response. I tried to validate the values from “Body column” and it gave me this error.
image

Secondly, I am not sure what did you mention here below.

Okay, so your JSON is invalid. You’ll need to fix that first. It looks like you have extra double quotes in there.

but here if you see the values, it shows only one double quotes. Double quotes are coming only when I am copy pasting it on website @Darren_Murphy

How are you creating the JSON?

By using join column (as shown in above video by @Loqode )

Okay, well I’m not sure then. It seems like somethings not right, but I can’t see it based on what you’ve shared.

1 Like

Is there any other way to create a json?

Well, a joined list column on it’s own doesn’t create a JSON string. You must be joining something, and that something must have been created… somehow…

Usually, the JSON for each row would be created in one of 3 ways:

  • a template column
  • a JSON Object column (the new one)
  • a Make JSON Object column (the old one)

Are you using one of those 3, or some other way?
The second one is probably the recommended way, although that column is still in Previews and probably not fully baked yet. So I don’t know how reliable it is just yet.

I am using Template column to create that.

Okay, that should work fine.
Sorry, I really don’t have any more suggestions.

1 Like

Thanks

@Darren_Murphy, I removed comma after last column value and tried to validate. Now it shows Valid JSON. However, it is still not working.

This is the final payload.
image

EDIT:

It’s working now. I published the changes and then it worked. It was not even working on Editor. Now it’s working in both editor as well on published app.

2 Likes