I've made an email client but messages take a while to show up

I’ve written an apps script to fetch any new emails from gmail and send them through a webhook into my app. Everything works, however, it’s taking a long time for new emails to show up. What, if anything, can be done to speed this up?

Thanks.

0 8 218
8 REPLIES 8

Where exactly are you seeing the slow down? How often does your script run?

Script runs every minute. It sends an Add action to my app table and I can see it writing on the sheet almost immediately, however, in my app, it doesn’t show up until I sync (i have delayed sync and automatic updates turned on). Automatic updates specify that it will update every 30 minutes, however, I’m looking for it to show up as soon as it’s received (just like an email client) and I don’t want to have the app sync every time an email is received because it takes 30-60 seconds for the app to sync.

You’re gonna have to sync to pull in any new data, no way around that.

When i add a row manually, it doesn’t need to sync and it shows up manually. Why does it need to sync when a new row is added via webhook but not when I add a row manually?

When you add a row manually, that data only exists on your device, until you sync, and then it gets sent to the backend. A webhook sends the data to Appsheet servers, which then populates the backend, then users have the sync to retrive the new data.

An alternative for you could be that any new rows would trigger a workflow (push notification, email, sms) that will alert you to the new data via another means.

Gotcha. I’d feel a bit defeated if I was checking gmail to see if have an email in my email client… Maybe I could trigger selenium to add the new row on a hidden chrome browser on my device

Thanks for the explanation! That’s a great help.

I more meant push notification or SMS, haha.

Top Labels in this Space