0

I have created a custom function in a Google Sheet and I have given access to the Sheet to other users. But unfortunately the security settings of there company do not allow the users to unlock this script for their account.

This app is blocked. This app has tried to access confidential data in your Google account. To protect your account, we have blocked the access.

Is there any way that users can still run this script externally without having to install it themselves? So for example via a click on a button, which then starts the script in my account.

user3392296
  • 644
  • 4
  • 16

1 Answers1

0

No, you won't be able to do that. The only way some code could be triggered by external users, but effectively executed by your account, would be in an apps script web app.

As you can see in the screenshot, there's an "Execute as" setting when you deploy an app that controls this behaviour:

Screenshot of a new deployment in apps script

I appreciate that this may not be an option for you, given that the current code is a custom function in a sheet. The only other approach would be to have the external users make a copy of the sheet, with its function(s), to run in their Google Workspace environment.

Ben
  • 7,548
  • 31
  • 45