Gsuite activities in Studio Web

The well known activities from UiPath.Gsuite.Activities are now also available on Studio Web, for anyone looking to build automations involving Google Suite.

Functionally, the Gsuite activities on Studio Web behave by the same logic as the traditional activities you worked with in Studio. It is important for us to ensure everyone takes advantage of the same functional perks, regardless the chosen development tool.


How can I find the Gsuite activities in Studio Web?

  1. Once you have opened Studio Web in your browser, create a new project or open an existing one.
  2. Click on the “+” button to add an activity.
  3. In the opened dialog, you’ll see a long list of different activities. But you can easily filter them out by writing some keywords in the search field. You can go by generic keywords like “Google” or more activity specific like “Upload Files” - either way, you will get the activity you look for.

An activity structure overview

All Gsuite activities follow more or less the same structure during configuration. That is merely:

  1. Connection field
    On this filed you’ll have displayed the connection that will be used in the activity when you run it. In case you do not have a predefined connection in Integration Services, you will be prompted to create on.
  2. Mandatory input fields
    Mandatory fields vary from one activity to another, but these are usually marked with red and * symbol. These fields must be filled in with information for the activity to function properly.
  3. Advanced options
    Advanced options is the umbrella for all the beautifying or customization of your activity. The output field is also available in there for you to configure, shall you want it custom.

Tips for those building an automation first time ever

Generally, activities work by the Input->Output logic. This means that you have to indicate what should the activity take in for processing, and then it will return it as an Ouput to any further activities within your workflow.

You can use activities like “Get newest email” or “Get File/Folder” to reach out for the exact item you need. The output values of “Get” type of activities can be used as input for any further activities that process the item in some way.

Alternatively, in most of the activities now you can indicate directly to the item by browsing and navigating towards your file.

How to fill in the fields
The image button on every field presents you all the possible modes for fields completion.

Example: In the activity “Download file”, for the field “File to download” you have 2 options to indicate your input (the file that will be downloaded):

  1. By browsing to your file via the image button.
    2.By using an existing variable that contains the path to your file, via image

If you select image, field mode will change and you will be able to select the value you need from the list of previously saved/available values in your project. It will look like this:

Now, the options available via image will also look different:

  • Browse will return you to the browsing mode for file selection
  • Url or Id allows you to indicate the exact Url or Id for the file to download.
  • Use variable will list you all the available variables, including those standing for the output generated by previous activities.
  • Open Expression Editor allows you to type by hand any reference for your input value.

For Email activities, the input modes for the email location are almost the same. The only difference is that you have an image option instead of image.


What can I automate now in Studio Web?

At first, our focus is on files handling via Google Drive.
We know there are many more to add, and we will do so!

Here is an extensive list with a short description of the available activities:

  • Create Folder: Creates a folder in Google Drive.
  • Copy File/Folder: Copies a file on Google Drive.
  • Download File: Download the indicated file to the project’s folder.
  • Delete File/Folder: Deletes the specified file or folder.
  • Upload Files: Uploads the specified files to Google Drive.
  • Share File/Folder: Shares a file or folder with the specified recipients.
  • Move File: Moves a file on Google Drive.
  • Get File/Folder: Gets a file or folder from Google Drive to use in other activities.
  • For Each File/Folder: Iterates over a list of files and folders.

Examples of Automation scenarios to play with

We thought you might like us showing you around Gsuite activities in Studio Web, by building some automations.

Let us know your thoughts on the Gsuite activities in Studio Web: Do you like them? Do you find them useful? Are they easy to use?
We’re happy for any feedback and suggestions! :wink:

Hi @loginerror,

I’m trying to use the Download File activity. The Automation runs, but I can’t seem to save the file to my local drive. Here is the debug snippet. The automation runs without issues but I don’t see the file anywhere.

  1. Where is the /tmp location on the local machine?
  2. How do I save the file locally by using the Result variable?
  3. Do I have to use any other activity such as the System Copy File to copy the file from Result.LocalPath to my local file drive?

thanks

Hey @AndyMenon

Just to be sure - you are running your published automations via Assistant, correct?

Could you maybe show a snippet of the workflow, so that we have full clarity on how it looks like?

Hello @loginerror,

I am running it from StudioW. Here is the set up. There are 3 steps:

Step 1: The connection works, I am able to select a file by browsing the Drive folders

Step 2: Logging relevant stuff from the Result variable

Step 3: Copy file to local Drive (Questionable attempt by me :neutral_face: )

One thing to note: When I use Path.Combine with more that one input string, it adds a forward-slash to it. I posted a separate thread regarding this.

Therefore, in this case, I have used a Path.Combine(“full-path-of-file”) to make it work.

The automation works, but throws no error and there is no file in my local file path

This should work when run from Assistant, but is expected to not work when you run it from StudioWeb (as then the automation is run on Cloud)

This will require further investigation. I feel like it should let you know that it didn’t do anything when run in StudioWeb, but at the same time it should just work when run from Assistant.

We’ll look into what can be improved.

For sure this will be improved (the activity doesn’t seem to support the output from the Download File activity:

I actually assigned my own inferred variable that later turned out to be of type ILocalResource. I was not able to get anywhere with that variable either. I then changed to another variable of Type File, and even that didn’t work.

I’m still wondering where this is? Assuming that the automation works only when run from Assistant (after deployment), where does the /tmp folder exist?

On Windows machines it is expected to be under the Temp folder and also under the %userprofile% folder. Is this assumption correct?

thanks

1 Like

When run from Assistant, I think it’s in the unpackaged process package folder with that automation, similar to how it worked until now.

Hmmm. If the path is available only after deployment, how then can we test the automation in Development?

I’m asking because this is a simple file download and might not matter much. What if there is complex logic that is dependent on the file download . This would be make it challenging to test the logic if we cannot resolve the file path at development time.

thanks

Ha! It worked after I applied the fixes and ran the automation from Assistant @loginerror ! :smiley:

The Result variable works as well! Here is how I set it up after downloading the file from Google Drive. On the local machine, the file is downloaded to the path as shown in the log output of the job run below.

I see that the file has some random name when downloaded as shown in the log message:

Copy file from Result variable to local file path

Forward-whacked all the back-whacks in the file path and (for now) gave the file a specific name that I can recognize (I can later change this to use the Result-> Name attribute of the downloaded file.

Finally, I see the downloaded file copied to the local path as intended! :slight_smile:

Thanks!

1 Like

Subsequently I found that Path.Combine does not work even from Assistant.

In the example that works, I set Path.Combine in the Copy File activity as follows:

Path.Combine(“C:/Users/Public/Documents/StudioWebArea/MyGoogleDrive_Files/My_ImageFile.png”)

I then modified it to work as follows:

var fileNm = Result->Name
var fileExtn = Result->Extension

And modified Path.Combine to be:

Path.Combine(“C:/Users/Public/Documents/StudioWebArea/MyGoogleDrive_Files”, fileNm+"."+fileExtn)

And yet, the Automation failed from Assistant despite the file path being formed correctly:

However, if I remove path.combine and replace the file path with a regular string expression as shown below, it works and the file is copied over to the location as expected.

"C:/Users/Public/Documents/StudioWebArea/MyGoogleDrive_Files/"+ fileNm+"."+fileExtn