We have a Google Workspace add-on that operates via a sidebar, so we use homepageTrigger so that the user can open the sidebar from the right hand menu.
This works well - but only once per page load - so if the user opens the sidebar, closes it and attempts to reopen via the right hand menu we instead get this page:
How instead can we have the homepageTrigger function run every time?
We have a Google Workspace add-on that operates via a sidebar, so we use homepageTrigger so that the user can open the sidebar from the right hand menu.
This works well - but only once per page load - so if the user opens the sidebar, closes it and attempts to reopen via the right hand menu we instead get this page:
How instead can we have the homepageTrigger function run every time?
Here is the appsscript.json:
Here is the function it is calling (when I add a log line at the start of this function it is only ever called once):