Is it possible tu run a script (from Google App Script) using an activitie/API ?
The only way I found is to open my spreadsheet, and use a Click activity to run my script (or to parametrize an onOpen trigger). But it’s not the most robust way to do it…
I looked for a solution inside the forum but I didn’t find anything about this,
I saw in the documentation that now some activities are availalable to use Google App Script. But, they didn’t aprear in my studio. I have the version 2019.4.4 and all my packages are udated. Moreover, I am used to develop with other Google activities without any problem.
hello Matthieu, I am using the 2020.4.3 version of studio and its available for me. So i would suggest you to update your Studio to this version. But anyways, I have been using all the gsuite activities and they all seem to work. But the run script activity in Apps Scripts is always giving me an error. Below is the workflow i am using, followed by the error.
Nice one! problem with Oauth credentials tho is that it shows oauth consent screen. I think the token has an expiration so you may want to check on it maybe.
The other option to eliminate the oauth consent screen is by using service account credentials. Tho it seems that appscript is not supported using service account :3.
I have done exactly as you mentioned - wrote script, deployed it with API executable (with access to ‘Anyone with Google Account’), added GCP, Create OAuth, Called ‘Run Script’ activity inside a scope with OAuth credentials and gave required scopes to it. However, I’m getting an error - “the caller does not have permission”. Did you encounter this? Have I missed any step?