I'm rather new are writing Google App Script code, but I am struggling to find any resources on this topic.
I am wanting to create a custom trigger that will run my function 10 minutes after an edit has been made.
I have a function that will send out an HTML table of the data in my sheet.
I currently am using the On-edit trigger, but every time I update a cell in my sheet it is sending out an email.
I am wanting to set it so that after I made an edit I will have about 10 minutes to make all of my edits and THEN have one single email sent with the updated data.
Any advice is appreciated or if you could point me in the direction of information on how to go about coding this that would be wonderful!!
CodePudding user response:
Flow would be
- Create a installable edit trigger for say
editIns
. - When
editIns
gets triggered, create another trigger tosendEmail
after 10 minutes, if no trigger is already present within the next 10 minutes(check time saved in properties) - If new trigger is created, save created trigger and time created in properties service