Work with labels in Gmail using Integration Service activities

I notice you can only change the labels on an email in Gmail using the older activities that need you to use api details manually. Can we have activities to Add/Remove/Change labels for a given email that uses Integration Service. Also could we have a label filter option on the Get List of Email activity.

If they could reference label by friendly name rather than Label ID that would be ideal

This would make things easier in enterprise

1 Like

Hey @robotsrobots ,

Have a look at this, this might help you.


It looks like he is using classic activity with a key? Thanks but I’m asking for it to be done through Integration Service so we don’t need to use keys or credentials within studio

Hi @robotsrobots

If the desired functionalities are not available , you can use the following methods-

  1. You can use the “HTTP Request” activity in UiPath to interact with the Gmail API and perform operations like adding, removing, or changing labels for emails. This approach requires manually configuring the API details and crafting the API requests accordingly.
  2. you can create a custom activity using UiPath’s Custom Activity SDK. This allows you to build activities tailored to your specific requirements, including adding, removing, or changing labels for emails using the Gmail API.


1 Like

Hey Dan,

In the new set of Integration Service activities, we use Label as an Email Folder field. You can get the emails from a specific folder / with a specific label.

You can move emails to a new folder. → Change a Label to another Label.

To do this, use the Browser Widget or type the Folder/Label Name as String using Folder Path.

Also, each object has a propriety for labels: LabelsIDs and a propriety for folder: FolderName

Here is an example to Move the Email from one folder to another (Delete one Label and add a new One):

Here is an example of how to get the emails based on a Folder (Label) from another email:

NB: We don’t cover multiple labels for now.

Thank you,

1 Like

This is incorrect. The activity is not behaving like you write here. The activity is not deleting existing labels. From my experience, it is only adding new labels.

I am currently developing a robot where i need to remove all labels and add a single label. Can that be made possible, please?

It is not an option for me to use the pure Gmail API, and it is not an option for me to use the UiPath.GSuite.Activities.ChangeLabels. It is also not an option for me to use frontend/UI.

Please make it possible to select whether to remove all labels or not before adding a new label @AlexCrijman :pray:

Hey @jaeger,

After your feedback and other Insights, we have started working on some dedicated activities for Gmail Labels.

Those will be available by the end of this year - the beginning of next year in a preview Package first and then in the Official package.

The current Move Email doesn’t delete all labels. It moves an email from one folder (label) to another folder (label).

1 Like

It will change the label to new one if its a single email. But if its a mail chain then it seems it will not change the label but just add the label of the new folder to the mail chain.

Hey @arun.v7

As a mail chain, do you refer to a Mail Thread which groups multiple emails under one?

If you move each email from the thread, doesn’t it solve your issue?

Meanwhile, we have released 2.5.4-preview, which has a new set of activities for Gmail Labels. This also includes filtering.

Thank you,

yes for some emails having long conversation trails its hard to move all, since there are more than 90 conversations. Have not checked out 2.5.4, will check if it works