How Do Triggers Work in Google Sheets and How Do They Detect Updates?

This topic was automatically generated from Slack. You can find the original thread here.

Hi can someone help me understand the way triggers are working for googlsheets, like when a row is updated are we comparing in cron basis the revisions of sheets to know if sheet has been updated. My doubt is when google sheet is updated how an event is being fired to know sheet has been updated.

can you answer above.

I apologize for the delay in my response. Regarding Google Sheets triggers in Pipedream, when a row is updated, Pipedream doesn’t compare revisions on a cron basis. Instead, it uses Google Sheets API to listen for changes in the sheet. When an update occurs, an event is fired, and Pipedream processes the event accordingly. If you have any further questions or need clarification, please feel free to ask.

who is firing the event when an update is occuring in sheet.

Google sends us a webhook on updates. Note that they can batch updates and send them in one call. Those updates may also be delayed, sometimes minutes after the update happens in the sheet. Google controls this logic. We process the update as soon as Google notifies us.

The code for this source is here if you’re interested: https://github.com/PipedreamHQ/pipedream/blob/master/components/google_sheets/sources/new-updates/new-updates.mjs

, I didn’t found any webhook or google api which gets fire on change of sheet. that’s the part I’m not getting. I looked into the above code but wasn’t getting anything.

there was appscript with sheet which which provides us webhooks but that I’m not seeing in codebase.

so are we setting up any service which checks the changes between current and previous version and we are firing the event and we are monitoring these changes using polling ?

can you answer above ?