I want to use App Scripts activities from GSuite. I have been able to use all the activities, but I am facing problem with run script activity. I am not able to execute the script from UiPath Studio.
Steps followed
Created a Project - Using Create Script Project Activity
Uploaded the Script file “*.gs” - using Upload Script File Activity
Deployed the script - using Create Deployment activity
Run the Script - using Run Script Activity
Steps 1 to 3 are running fine and i have also checked in my google projects, the projects are being created. but only the last step is always giving me an error. I can run the same uploaded script manually from the google project page (https://script.google.com/)
Below is my workflow followed by the error
The reason why the script is returning not found is because there is a middle intermediary step in between publishing the project and being able to run it.
In short, when you create a new script a new gcp project is created along-side it. For you to be able to run, you need to manually switch the associated project of the script (there is no way to do this using the api, i also faced the same problem when developing and testing apps script).
Here is the official documentation explaining what to do:
I’ve been trying to run a apps script in UiPath, but getting the exactly same error mentioned above. I went through the documentation @Mihai_Dunareanu has mentioned, but didn’t help.
I have performed below steps:
Created a project in GCP. Gave OAuth credentials to it.
Wrote Apps script, deployed it using new deployment and type ‘API executable’.
Copied the project number from Project dashboard page and entered it in Apps script project settings page.
Called the ‘Run Script’ activity (directly) in GSuite Application scope. Provided all required scopes and provided Script ID (found in project settings page of Apps Script) and function name.
I get the same error over there. (Requested entity not found)
Have I missed some step?
Thanks for the answer!
Did you use this deployment ID in the ‘Script ID’ property of the UiPath activity?
Also, are you using OAuth or Service account for the Google API?
Yes. Use the deployment ID on the script id property. Im using Oauth on this. I tried using service account but for some reason it throws error (same setup with Oauth tho )