View card widget and after delay view another widget in automatic manner.

48 views
Skip to first unread message

Pasindu Perera

unread,
Mar 11, 2022, 10:24:23 AM3/11/22
to Google Apps Script Community
What I need to do is show a card widget and after some time I need to show another card widget automatically. So I could not found any method in your documentation also. Can you mention if there is a specific method to do for google workspace add-on creation in app script with widget based approach ?

Clark Lind

unread,
Mar 12, 2022, 10:23:41 AM3/12/22
to Google Apps Script Community
I may be mistaken, but I do not think that is possible.  I tried creating a simple Gmail add-on with a simple "splash" card, and then used Utilities.sleep(3000)  [3 seconds] to call another function. I could not get it to work at all, it just gives an error stating "Unable to display the content". 
I think this is limited because all widgets, events, and actions are very tightly controlled and require user input. Otherwise we could just execute javascript any way we wish including deleting user emails without their knowledge, deleting, copying or corrupting drive files without user knowledge, etc etc. 
If you want a Splash screen, I suggest adding a simple button on it that says "Start" or something. As far as I can tell, all "events" are user-initiated, and all triggers are defined in the Manifest. If you can figure out how to set a timer function or something, I'm guessing it would be via the manifest.

Reply all
Reply to author
Forward
0 new messages