# Chat messages are deleted in a certain time

**URL:** https://community.glideapps.com/t/chat-messages-are-deleted-in-a-certain-time/11162
**Category:** Feature Requests
**Created:** [June 20, 2020, 5:36am UTC](https://community.glideapps.com/t/chat-messages-are-deleted-in-a-certain-time/11162 "2020-06-20T05:36:35Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![UNIVICTOR](https://avatars.discourse-cdn.com/v4/letter/u/f475e1/32.png) [@UNIVICTOR](https://community.glideapps.com/u/UNIVICTOR)
#### Post date: [June 20, 2020, 5:36am UTC](https://community.glideapps.com/t/chat-messages-are-deleted-in-a-certain-time/11162/1 "2020-06-20T05:36:35Z")

</div>

Hello guys, I’m new to Glide but I love it so far. I’ve been working on an app for a few weeks now, experimenting here and there. I was testing the chat and observed that the messages are filling the google spreadsheet. My question is if there is any way for them to be automatically erased suddenly after some time, say after 24 hours? Thank you

---

<div class="post-metadata">

### Author: ![Roberto\_Salim](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/roberto_salim/32/6861_2.png) [@Roberto\_Salim](https://community.glideapps.com/u/Roberto_Salim)
#### Post date: [June 20, 2020, 7:23am UTC](https://community.glideapps.com/t/chat-messages-are-deleted-in-a-certain-time/11162/2 "2020-06-20T07:23:37Z")

</div>

Hello, I don’t know if I’m the right person to present you with a solution, you’ll most certainly find it here.

I am also looking for something similar, what came to my mind was to create a script that erases the lines, and you schedule it to fire at 00hs.

This is the code, if you’re wrong, colleagues will correct it.

**function dell() {  
var spreadsheet = SpreadsheetApp.getActive().getSheetByName(“App: Comments”); //tab name to be deleted  
spreadsheet.getRange(‘A:F’).activate(); //delete from column A: F  
spreadsheet.getActiveRangeList().clear({contentsOnly: true, skipFilteredRows: true});  
};**

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [June 20, 2020, 7:59am UTC](https://community.glideapps.com/t/chat-messages-are-deleted-in-a-certain-time/11162/3 "2020-06-20T07:59:19Z")

</div>

Hi Roberto, that is the right idea but my concern is that if Victor is using the native chat offered by Glide, deleting the rows in the sheet won’t actually erase them from the app. As far as I aware the only way to delete chat comments now is to go to the builder, choose them and delete it.

---

<div class="post-metadata">

### Author: ![UNIVICTOR](https://avatars.discourse-cdn.com/v4/letter/u/f475e1/32.png) [@UNIVICTOR](https://community.glideapps.com/u/UNIVICTOR)
#### Post date: [June 20, 2020, 4:09pm UTC](https://community.glideapps.com/t/chat-messages-are-deleted-in-a-certain-time/11162/4 "2020-06-20T16:09:31Z")

</div>

Hello, I see that you mention native chat and you are correct that is the one I am experiencing, but a question comes to me, is there another chat that is not native?

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [June 20, 2020, 4:27pm UTC](https://community.glideapps.com/t/chat-messages-are-deleted-in-a-certain-time/11162/5 "2020-06-20T16:27:29Z")

</div>

Hello, you can read this thread on 1v1 chat.

> [@Need help on creating private chat](https://community.glideapps.com/t/need-help-on-creating-private-chat/10686/11):
>
> Gotcha. I don’t have a video tutorial but these are the steps. Feel free to message me and we can set up time to walk through it if that will work best. Create a Messages sheet in Google sheets. Add a Row ID column. This will ensure every chat has a unique identifier. Add two columns titled “User 1” and “User 2” Within Glide, on your Messages tab, add the Comments component On a different tab/screen (ideally where you’ll want users to be able to start a chat) add a button compone…

---

<div class="post-metadata">

### Author: ![UNIVICTOR](https://avatars.discourse-cdn.com/v4/letter/u/f475e1/32.png) [@UNIVICTOR](https://community.glideapps.com/u/UNIVICTOR)
#### Post date: [June 20, 2020, 4:35pm UTC](https://community.glideapps.com/t/chat-messages-are-deleted-in-a-certain-time/11162/6 "2020-06-20T16:35:13Z")

</div>

Excellent. I appreciate the help

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [June 20, 2020, 4:48pm UTC](https://community.glideapps.com/t/chat-messages-are-deleted-in-a-certain-time/11162/7 "2020-06-20T16:48:09Z")

</div>

If you need help setting it up feel free to send a personal message.

---

<div class="post-metadata">

### Author: ![Roberto\_Salim](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/roberto_salim/32/6861_2.png) [@Roberto\_Salim](https://community.glideapps.com/u/Roberto_Salim)
#### Post date: [June 20, 2020, 5:07pm UTC](https://community.glideapps.com/t/chat-messages-are-deleted-in-a-certain-time/11162/8 "2020-06-20T17:07:18Z")

</div>

very well @ThinhDinh

my idea was this: I didn’t get to use it, I didn’t know about it, thanks for sharing.
