SAP Help Home SAP Intelligent RPA Help Portal SAP Intelligent RPA Community

Module - Gmail

Activities for Interacting with Gmail.

Activities

Send Email (Gmail)

Send an email using a Gmail account.


Technical Name Type Minimal Agent Version
send asynchronous WIN-2.0.0

Input Parameters:

Name Type Attributes Default Description
gmailParameters irpa_googleworkspace.gmailParameters mandatory The email parameters.
timeout number optional Timeout for the activity. The default is 30000ms.

Errors:

Error Class Package Description
SequenceError irpa_core Thrown if this activty is used without any authorization activity or if there is no domain wide delegation.
InvalidArgument irpa_core Error thrown when the input parameters are invalid or if this activty is used without the GmailScope.
Timeout irpa_core Error thrown when the activity times out.
GmailError irpa_googleworkspace Error thrown when call to the gmail fails.
Error irpa_core Generic Error.


Search Emails (Gmail)

Search for emails in a Gmail account.


Technical Name Type Minimal Agent Version
searchEmails asynchronous WIN-2.0.0

Input Parameters:

Name Type Attributes Default Description
query string optional String parameter to filter results that you define using the expression editor. Please refer to the Google documentation to learn more about the search operators you can use: https://support.google.com/mail/answer/7190?hl=en.
includeSpamTrash boolean optional Set this parameter to 'true' to include in your search messages from Spam/Trash folders.
timeout number optional Timeout for the activity. The default is 30000ms.

Output Parameters:

Name Type Description
messageIdentifiers Array.<irpa_googleworkspace.gmailMessageIdentifier> Parameter that returning a list of message identifiers.

Errors:

Error Class Package Description
GmailError irpa_googleworkspace Error thrown when call to the gmail fails.
SequenceError irpa_core Thrown if this activty is used without any authorization activity or if there is no domain wide delegation.
InvalidArgument irpa_core Thrown if this activty is used without the GmailScope.
Timeout irpa_core Error thrown when the activity times out.
Error irpa_core Generic Error.


Read Email (Gmail)

Read emails in a Gmail account.


Technical Name Type Minimal Agent Version
readEmail asynchronous WIN-2.0.0

Input Parameters:

Name Type Attributes Default Description
messageId string mandatory The unique ID of the email to be read. This ID can be found using the '€˜Search Emails (Gmail)'€™ activity.
location irpa_googleworkspace.enums.Location mandatory Parameter to define the location where you want to download attachments. It's either on your File System or in Google Drive.
pathOrDriveId string optional Parameter to set the path or the URL of the location you'€™ve defined to download attachments. By default, the 'Downloads' folder of the system is used if 'fileSystem' is selected, and 'My Drive' is used if 'drive' is selected as location.
markAsRead boolean optional If set to 'false', the email message is not marked as read. The value is '€˜true'€™ by default.
timeout number optional Timeout for the activity. The default is 30000ms.

Output Parameters:

Name Type Description
messageDetail irpa_googleworkspace.gmailMessageDetail Parameter to retrieve the details of the read email, such as the recipient, the sender, the subject, or the body.

Errors:

Error Class Package Description
GmailError irpa_googleworkspace Error thrown when call to the gmail fails.
SequenceError irpa_core Thrown if this activty is used without any authorization activity or if there is no domain wide delegation.
InvalidArgument irpa_core Error thrown when the download path does not exist or if this activty is used without the GmailScope.
GoogleDriveError irpa_googleworkspace Error thrown when the upload to google drive fails.
Timeout irpa_core Error thrown when the activity times out.
Error irpa_core Generic Error.


Modify Email Labels (Gmail)

Modify the labels of an email in a Gmail account.


Technical Name Type Minimal Agent Version
modifyEmailLabel asynchronous WIN-2.0.0

Input Parameters:

Name Type Attributes Default Description
messageId string mandatory The unique ID of the email. This ID can be found using the 'Search Emails (Gmail)' activity.
labelsToAdd Array. optional The list of labels you want to add to the message.
labelsToRemove Array. optional The list of labels you want to remove from the message.
timeout number optional Timeout for the activity. The default is 30000ms.

Errors:

Error Class Package Description
GmailError irpa_googleworkspace Error thrown when call to the gmail fails.
SequenceError irpa_core Thrown if this activty is used without any authorization activity or if there is no domain wide delegation.
InvalidArgument irpa_core Thrown when the folder names in foldersToMoveTo/foldersToRemoveFrom does not exist or if this activty is used without the GmailScope.
Timeout irpa_core Error thrown when the activity times out.
Error irpa_core Generic Error.


Send Reply (Gmail)

Reply to an email using a Gmail account.


Technical Name Type Minimal Agent Version
replyEmail asynchronous WIN-2.0.0

Input Parameters:

Name Type Attributes Default Description
replyParamters irpa_googleworkspace.gmailReplyParameters mandatory Define the parameters of the reply such as the recipient, the subject, or the body of the mail.
timeout number optional Timeout for the activity. The default is 30000ms.

Errors:

Error Class Package Description
GmailError irpa_googleworkspace Error thrown when call to the gmail fails.
SequenceError irpa_core Thrown if this activty is used without any authorization activity or if there is no domain wide delegation.
InvalidArgument irpa_core Error thrown when the attachment does not exist on file system or if this activty is used without the GmailScope.
Timeout irpa_core Error thrown when the activity times out.
Error irpa_core Generic Error.


Reply All (Gmail)

Send a '€˜reply all'€™ to an email using a Gmail account.


Technical Name Type Minimal Agent Version
replyAllEmail asynchronous WIN-2.0.0

Input Parameters:

Name Type Attributes Default Description
replyParamters irpa_googleworkspace.gmailReplyParameters mandatory The reply input parameters.
timeout number optional Timeout for the activity. The default is 30000ms.

Errors:

Error Class Package Description
GmailError irpa_googleworkspace Error thrown when call to the gmail fails.
SequenceError irpa_core Thrown if this activty is used without any authorization activity or if there is no domain wide delegation.
InvalidArgument irpa_core Error thrown when the attachment does not exist on file system or if this activty is used without the GmailScope.
Timeout irpa_core Error thrown when the activity times out.
Error irpa_core Generic Error.


Delete Email (Gmail)

Delete an email permanently from a Gmail account.


Technical Name Type Minimal Agent Version
deleteEmail asynchronous WIN-2.0.0

Input Parameters:

Name Type Attributes Default Description
messageId string mandatory The unique ID of the email to be deleted. This ID can be found using the 'Search Emails (Gmail)' activity.
timeout number optional Timeout for the activity. The default is 30000ms.

Errors:

Error Class Package Description
SequenceError irpa_core Thrown if this activty is used without any authorization activity or if there is no domain wide delegation.
InvalidArgument irpa_core Error thrown when the input parameters are invalid or if this activty is used without the GmailScope.
Timeout irpa_core Error thrown when the activity times out.
GmailError irpa_googleworkspace Error thrown when call to the gmail fails.
Error irpa_core Generic Error.