MarketplaceStudioActivityAPI Activities for Gmail

Create your first automation in just a few minutes.Try Studio Web

API Activities for Gmail

API Activities for Gmail

by YouTube

2

Activity

Downloads

259

Posted 5 years ago

How to create new folder/Label in Gmail and how to move all mails to that folder.

Posted 5 years ago ago

To create a new label you can use the "Create Label" activity. 

To then add labels to emails use the "Modify message labels" activity.

Folders are different. Moving from one folder to the other is not possible with these  activities

Posted 5 years ago

Hi, it works great! I just wanted to ask,

Is there an option to reply to the email without creating a new one? Make a thread.

Thank you.

Posted 5 years ago ago

Hi Ramel,

This package https://connect.uipath.com/marketplace/components/google-gsuite will be easier to use for replies

Posted 5 years ago

Hello. I currently have an issue in capturing the email body because it contains HTML elements, list to be exact. How can I capture it? Thanks.

Posted 5 years ago ago

Hi, to capture the email body you need to use the "Message Body" output from the "Get message" activity. Alternatively, please check the "parts" property in https://developers.google.com/gmail/api/v1/reference/users/messages.

If this doesn't work, maybe the activity at https://docs.uipath.com/activities/docs/gsuite-get-mail-messages would be easier to use(it's inside the package UiPath.GSuite)

Posted 6 years ago

Hello. For the "modify message labels", what should be filled into "labels to add" and "labels to remove" fields? What specific format?

Let's say I want to add a label but remove none, since there are none.

Thanks a lot!

Posted 6 years ago ago

Hello,

Both fields should be lists of strings, with the elements in the list being the label id.

If you have nothing to remove then it should be an empty list

Posted 6 years ago

Great work on the activities!

I have one issue with getting labels: I receive this error when filling in the "result" field of the "get labels" activity (with ctrl + k, of course)

"Compiler error(s) encountered processing expression "gmailLabels". Reference required to assemby 'Google.Apis, Version=1.38.00, Culture=neutral, PublicKeyToken=4b01fa634db77ab' containing the implemented interface 'Google.Apis.Requests.IDirectResponseSchema.' Add one to your project."

Posted 6 years ago ago

Hi,

This means you need to add the namespace Google.Apis.

In imported namespace please add Google.Apis.

Posted 6 years ago

Great work on the activities!

I have one issue with getting labels: I receive this error when filling in the "result" field of the "get labels" activity (with ctrl + k, of course)

"Compiler error(s) encountered processing expression "gmailLabels". Reference required to assemby 'Google.Apis, Version=1.38.00, Culture=neutral, PublicKeyToken=4b01fa634db77ab' containing the implemented interface 'Google.Apis.Requests.IDirectResponseSchema.' Add one to your project."

Posted 6 years ago ago

Please add Google.Apis to imported namespaces

Posted 6 years ago

Hello,

How can i encode the mail message ? it doesn't work when using the different type of encoding such as UTF-8.

Thank you for advance

Posted 6 years ago ago

Hello,

Additional encoding options are not possible in this version.

What is your use case?

Posted 6 years ago

Hello Magali, thanks a lot for these activities, they work flawlessly. I am just wanted to ask: Is there any possibility to get not just a body of a mail, but also other mail related info like sender address, date, subject, etc ? I know that gsute activity pack from UIp can do it, but they do not offer such a wide scope of activities like your object does (label manipulation, attachments, and so on)

Posted 6 years ago ago

Hi,

The format of the message is as https://developers.google.com/gmail/api/v1/reference/users/messages.

To get different headers, you can loop on message.Payload.Headers and then see each header's name and value (header.name or header.value)

Posted 6 years ago

It looks really helpful but if you provided any user guide or instructions for use I would be grateful

Posted 6 years ago ago

Hi, here is the user guide:

Every activity should be in a gmail scope.

Gmail Scope

Description:

It handles the authentication into Google account and it is a placeholder for all the other activities in the package

Input arguments:

ID (required):

Can be a Google OAuth 2.0 Id or a Google Service Account Email. To get one, follow this link

Client Secret (mutual exclusive with Certificate Password and Certificate path):

The Client Secret value for case when ID is a Goolge OAuth 2.0 Id

Email address: User's email address. The special value "me" (default) can be used to indicate the authenticated user

Certificate password:(mutual exclusive with Client Secret):

  • password for certificate key

Certificate path (mutual exclusive with Client Secret):

  • local path to the file containing the certificate for the Service Account Key

Timeout:

  • timeout value, in milliseconds

Get mails

Description:

Gets all emails matching the query

Should be placed inside a Gmail Scope activity

Input arguments:

"Query" : Supports the same query format as the Gmail search box. For example, "is:unread". See https://support.google.com/mail/answer/7190?hl=en

"MaxResults": Max number of messages to return. Default is 100

Output arguments:

Result : String array of email ids 

Get Mesage By ID:

Description:

Retrieve a Message by ID.

Should be placed inside a Gmail Scope activity

Input arguments:

Message ID: The ID of the message to be retrieved (for example one result of get mails

Output arguments:

Result : Message

Message body: String for text found in the message body. In case of error (cannot convert to string), will be message.Snippet

Get Attachments:

Description:

Saves all the attachments of a message in a specific folder.

Should be placed inside a Gmail Scope activity

Input arguments:

Message ID: The ID of the message to be retrieved (for example one result of get mails

Output Directory: Where the attachments will be saved

Output arguments:

Saved Files (List of string) : Paths of the saved files

Send Email:

Description:

Sends an email with optional attachments.

Should be placed inside a Gmail Scope activity

Input arguments:

To: Array of email addresses to send to

Subject: Subject of the message

Body: Text of the message

Attachments: Array of paths of the attachments. Video is not supported

Get Labels:

Description:

List the labels in the user's mailbox

Should be placed inside a Gmail Scope activity

Output arguments:

Result : List of labels

Create Label:

Description:

Add a new Label to user's mailbox.

Should be placed inside a Gmail Scope activity

Input arguments:

Label: Name of label to be created

Modify Message Labels:

Description:

Modifies the labels on the specified message.

Should be placed inside a Gmail Scope activity

Input arguments:

Message ID: Of the message to which the labels will be added or removed

Labels to add: List of label IDs to add to the message

Labels to remove: List of label IDs to remove from the message

Publisher

YouTube

Visit publisher's page

Trusted Source

License & Privacy

License Agreement

Privacy Terms

Technical

Version

1.0

Updated

February 18, 2020

Works with

Developed and tested with Studio 2018.2.3

Certification

Silver Certified

Application

Google Gmail

Support

UiPath Community Support

Resources