activities
latest
false
UiPath logo, featuring letters U and I in white
Productivity Activities
Last updated Nov 21, 2024

For Each Email

UiPath.GSuite.Activities.ForEachEmailConnections

Description

Iterates through activities for each email message in a specified folder or label matching the filter criteria.

Add the activities to repeat inside For Each Email and, when you configure the activities, select Use Variable > CurrentEmail from the See more button menu to indicate that you want to repeat the actions for each email in the iteration.

Note: This activity uses pagination for processing large numbers of items and mitigating performance issues. This activity doesn't support persistence.
Scopes

This activity requires the following scopes:

  • https://mail.google.com/

OR

  • https://www.googleapis.com/auth/gmail.modify

OR

  • https://www.googleapis.com/auth/gmail.readonly

OR

  • https://www.googleapis.com/auth/gmail.metadata

Project compatibility

Windows | Cross-platform

Configuration

  • Gmail connection - The connection for the Google Workspace account to use in the activity.
  • Email folder or label - The folder or label to get email messages from. This field accepts IResource input. Click the Folder docs image icon to browse email folders. Use See more docs image button menu to switch to Folder path input mode.
    • Folder path - Specify the full path of the folder or label. This property supports String variables and string formatted values.

      Select the Reload Email Folder Data option if you've modified your email folders and need to retrieve the latest data.

  • Additional filters - Click this field to open the Filter builder and add additional filters for the query. Supports filtering on the following fields: BCC, Has the words, CC, Categories, Date and time, Attachment name, From, Subject, To, Labels.

Additional options

Options

  • Limit emails to first - Select the number of emails to iterate through. This field supports Int32 variables and Int32 values. By default, 100 is selected.
  • Include subfolders - Specifies whether to expand the search to include all subfolders of the selected mail folder. This field supports Boolean values. By default, False is selected.
  • Unread only - Specifies whether to consider only unread emails. This field supports Boolean values. By default, False is selected.
  • With attachments only - Specifies whether to consider only emails with attachemnts. This field supports Boolean values. By default, False is selected.
  • Important only - Specifies whether to consider only important emails. This field supports Boolean values. By default, False is selected.
  • Starred only - Specifies whether to consider only starred emails. This field supports Boolean values. By default, False is selected.
  • Mark as read - Specifies whether to mark the retrieved email as read. This field supports Boolean values. By default, False is selected.

Output

  • Emails - The list of emails retrieved by the activity. Can be used outside the For Each Email activity. Automatically generated output variable. You can use it as it is or save it with a different name.
Body

The body of the activity that stores other activities used in the automation.

Note:

Batching API calls is supported for the following activities when used inside the For each:

Example



See also:
  • Description
  • Project compatibility
  • Configuration
  • Example

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.