I wrote a function that adds an all-day event.
When the function running from script editor it\'s working fine, the all-day event is inserted to the calendar.
While it is not possible to run a script which requires authorisation directly from a cell in a Sheet, you can set up the script to run on button click instead.
As a button does not have the same authorisation restrictions as custom functions, you can use them to run code with the scopes you need. To set this up:
Insert > Drawing menu item and create a shape; any shape will do, this will act as your button.Save and Close to add this to your sheet.⋮). Click this, and then click Assign script.myFunction), and press OK.I hope this is helpful to you!