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

For Each Email

UiPath.MicrosoftOffice365.Activities.Mail.ForEachEmailConnections

Description

Repeats the contained activities for each email 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:

  • Mail.Read

OR

  • Mail.ReadWrite

OR

  • Mail.Read.Shared

OR

  • Mail.ReadWrite.Shared

Project compatibility

Windows | Cross-platform

Configuration

  • Microsoft Outlook 365 connection - The connection for the Microsoft 365 account to use in the activity.
  • Use shared mailbox - Set the toggle to On if you want to use a shared mailbox. Default value is Off.

    • Shared mailbox - The email address of a user or shared mailbox. This field supports String type input.

  • In email folder - The folder that stores the emails. Browse the Outlook folders and select a folder. This field accepts IResource input. Use the See more button menu to switch to Folder path input mode.
    • Folder path - Specify the full path of the folder. 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 - Additional conditions to filter the emails. Supports filtering on the following fields: Attachment name, BCC, Body, CC, Category, Date and time, From, Recipients, Subject, To, Type.
Additional options

Options

  • Limit emails to first - The maximum number of emails to return. A value of 0 or less means there is no limit. This field supports Int32 variables and Int32 values.
  • Shared mailbox - The email address of a user or the shared mailbox from which to retrieve the emails. This property supports String variables and string formatted values.
  • Include subfolders - Boolean value. Set to True to expand the search to include all the subfolders of the selected email folder.
  • Return Body as HTML - Boolean value. Set to True to return the body of the emails as HTML code. Set to False to return plain text.
  • Unread only - Boolean value. Set to True to only consider unread emails.
  • With attachments only - Boolean value. Set to True to only consider emails with attachments.
  • Importance - The predefined priority of the emails: Any, Low, Normal, High.
  • Mark as read - Boolean value. Set to True to mark the retrieved emails as read.

Output

  • Number of emails processed - The number of emails processed 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.