GSuite App Script - Run Script activity giving error - Requested entity was not found. [404]

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

  1. Created a Project - Using Create Script Project Activity
  2. Uploaded the Script file “*.gs” - using Upload Script File Activity
  3. Deployed the script - using Create Deployment activity
  4. 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


image

Hi @botBotGo,

Sorry for the late answer, have been really busy!

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:

As you can see, it links to this: https://developers.google.com/apps-script/guides/cloud-platform-projects#switching_to_a_different_standard_gcp_project

The second link details what you need to do.

1 Like