# Glide API Delete Rows

**URL:** <https://community.glideapps.com/t/glide-api-delete-rows/55437>\
**Category:** Ask for Help\
**Created:** [December 5, 2022, 5:44pm UTC](https://community.glideapps.com/t/glide-api-delete-rows/55437 "2022-12-05T17:44:43Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wayne\_S](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/wayne_s/32/50714_2.png) [@Wayne\_S](https://community.glideapps.com/u/Wayne_S)\
**Post date:** [December 5, 2022, 5:44pm UTC](https://community.glideapps.com/t/glide-api-delete-rows/55437/1 "2022-12-05T17:44:43Z")

</div>

I’m currently on the starter plan of glide so can’t check this out for myself just yet. Will be upgrading upon go-live.

I need to delete rows of data after 30 days. Ideally I’d use the API to get row that are 30 days old, export them to csv and then delete the rows using Make, however, I don’t see a way to get rows in the API docs, so is this even possible?

If not, the alternative is to do it via Airtable I guess.

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [December 5, 2022, 5:58pm UTC](https://community.glideapps.com/t/glide-api-delete-rows/55437/2 "2022-12-05T17:58:17Z")

</div>

A Get is only available on Business and Enterprise plans.

---

<div class="post-metadata">

**Author:** ![Wayne\_S](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/wayne_s/32/50714_2.png) [@Wayne\_S](https://community.glideapps.com/u/Wayne_S)\
**Post date:** [December 5, 2022, 5:58pm UTC](https://community.glideapps.com/t/glide-api-delete-rows/55437/3 "2022-12-05T17:58:53Z")

</div>

Argh ☹ don’t have anywhere near the budget for that

---

<div class="post-metadata">

**Author:** ![Joe\_Gabriele](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/joe_gabriele/32/57595_2.png) [@Joe\_Gabriele](https://community.glideapps.com/u/Joe_Gabriele)\
**Post date:** [December 5, 2022, 7:21pm UTC](https://community.glideapps.com/t/glide-api-delete-rows/55437/4 "2022-12-05T19:21:23Z")

</div>

Are you able to just do the following:

Use an ITE on the table you want to delete rows on and state IF Date Created is \> 30 days old, “DELETE”.

Then on your user table, create a Single Value that just says “DELETE”. Next, create a relation between both DELETE. Finally, create a button that only you can see that has an action of Delete Row attached to the DELETE relation. This will delete all rows that are 30 days old.

Its manual vs automated but only gotta do it once per month

---

<div class="post-metadata">

**Author:** ![Wayne\_S](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/wayne_s/32/50714_2.png) [@Wayne\_S](https://community.glideapps.com/u/Wayne_S)\
**Post date:** [December 5, 2022, 7:34pm UTC](https://community.glideapps.com/t/glide-api-delete-rows/55437/5 "2022-12-05T19:34:52Z")

</div>

Needs to be automated, it’s for a client so can’t have manual dependencies that rely me unfortunately.

---

<div class="post-metadata">

**Author:** ![Eric\_Penn](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/eric_penn/32/73888_2.png) [@Eric\_Penn](https://community.glideapps.com/u/Eric_Penn)\
**Post date:** [December 5, 2022, 8:39pm UTC](https://community.glideapps.com/t/glide-api-delete-rows/55437/6 "2022-12-05T20:39:44Z")

</div>

You could attach @Joe_Gabriele method to any inline list or button in your app. Your client will perform the action unknowingly.

Essentially while the customer is using the app he is deleting old rows for you.

FYI Glide just rolled out delete rows through multiple relations. (Delete many rows at once)

> [@new Deleting multiple rows from a delete action](https://community.glideapps.com/t/deleting-multiple-rows-from-a-delete-action/54734):
>
> It has finally arrived.

---

<div class="post-metadata">

**Author:** ![Wayne\_S](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/wayne_s/32/50714_2.png) [@Wayne\_S](https://community.glideapps.com/u/Wayne_S)\
**Post date:** [December 5, 2022, 8:48pm UTC](https://community.glideapps.com/t/glide-api-delete-rows/55437/7 "2022-12-05T20:48:42Z")

</div>

Yes Jeff mentioned this, could be the way forward, need to explore it however I need to export the data before it is deleted so not quite as straight forward as that

---

<div class="post-metadata">

**Author:** ![Eric\_Penn](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/eric_penn/32/73888_2.png) [@Eric\_Penn](https://community.glideapps.com/u/Eric_Penn)\
**Post date:** [December 5, 2022, 8:58pm UTC](https://community.glideapps.com/t/glide-api-delete-rows/55437/8 "2022-12-05T20:58:09Z")

</div>

You could export the data in the same action.

> [@How To: CSV Export and send as email](https://community.glideapps.com/t/how-to-csv-export-and-send-as-email/31618):
>
> Below is a short tutorial that demonstrates how to generate a CSV export from Glide, and send it as an email attachment using Integromat. This uses the joined list technique that was originally described by @Purvang_Joshi [here](https://community.glideapps.com/t/export-glide-table-google-sheet-data-to-csv-using-joined-list-apps-script/27467). I hope others find it useful slight_smile

Potentially you could hide the rows instead of deleting them by flagging an additional column with “hide” or anything really that satisfies an ITE column.

I.e. If col A is “hide” then blank… else Name

If you are using row owners you could just remove the row owner via Set Columns but I don’t believe set columns works with multiple relations… yet

---

<div class="post-metadata">

**Author:** ![Wayne\_S](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/wayne_s/32/50714_2.png) [@Wayne\_S](https://community.glideapps.com/u/Wayne_S)\
**Post date:** [December 5, 2022, 9:22pm UTC](https://community.glideapps.com/t/glide-api-delete-rows/55437/9 "2022-12-05T21:22:35Z")

</div>

Yes I’d planned to use this to export to CSV too, the problem is control.

Unfortunately it is not quite this straight forward a this, if I build in the delete rows that are 30 days old by relation and export to CSV from one button, then it would work for deletion, but the export would be overkill, and way too many emails would be generated. I don’t need 10k CSV exports a month 😉.

I need to give it some deep thought as im sure there is a way to get it to work but without being able to schedule an automation it does become a real pain.

Hence I’m thinking airtable might be the way forward for this part of the app. It will allow delete on schedule and on demand export via webhook and Make, or even on schedule export.

I just need to consider what affect this will have when it comes it update usage.

All becomes rather complex with so many factors and limitations at play!

---

<div class="post-metadata">

**Author:** ![Eric\_Penn](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/eric_penn/32/73888_2.png) [@Eric\_Penn](https://community.glideapps.com/u/Eric_Penn)\
**Post date:** [December 5, 2022, 9:26pm UTC](https://community.glideapps.com/t/glide-api-delete-rows/55437/10 "2022-12-05T21:26:01Z")

</div>

> [@Wayne\_S](#):
>
> Unfortunately it is not quite this straight forward a this, if I build in the delete rows that are 30 days old by relation and export to CSV from one button, then it would work for deletion, but the export would be overkill, and way too many emails would be generated. I don’t need 10k CSV exports a month 😉.

What I would do is add a “last deleted/ modified” time stamp to the action. Then have your action check if that timestamp is within the last 30 days.

I.e. if last modified timestamp is within 30 days then do nothing… else export csv, delete old rows, and update last modified.

I’m not familiar with AirTable so I can’t give any advice on that end.

---

<div class="post-metadata">

**Author:** ![Wayne\_S](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/wayne_s/32/50714_2.png) [@Wayne\_S](https://community.glideapps.com/u/Wayne_S)\
**Post date:** [December 5, 2022, 9:28pm UTC](https://community.glideapps.com/t/glide-api-delete-rows/55437/11 "2022-12-05T21:28:35Z")

</div>

Oh I didn’t think of that! That might very well work! Thanks, got a few ideas to work with 🙂.

I shall report back 🙂
