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

Get Email By Id

UiPath.Mail.Activities.Business.GetEmailById

Retrieves the email with the specified ID. This activity must be added inside a Use Outlook 365, Use Gmail, or Use Desktop Outlook App activity.

Configuring the Activity

In the Body of the Activity
  • Account - The account to search in. In StudioX, click Plus docs image on the right side of the field and then, from the drop-down menu, select an Outlook 365, Gmail, or desktop Outlook account added to the automation.
  • Email ID - The ID of the email to look for. In StudioX, click Plus on the right side of the field and then, from the drop-down menu, use one of the available options to select the ID:

    • Data from the Project Notebook, a parent Excel file or Outlook account. For example, select an Excel file, and then select Indicate in Excel to indicate a cell from the file, or select an email in Outlook and then select a field in the email that contains the ID.
    • Use Variable - Select a variable that you previously created in the project.
    • Text - Enter an email ID in the Text Builder.
    • Ask when run - Prompt for the ID when the project is executed.
    • Paste from clipboard - Paste a value that you previously copied to the clipboard in the project.
    • Open in Advanced Editor - Enter a VB expression.
  • Reference as - The name used to refer to the retrieved email in other activities. In StudioX, click Plus on the right side of the field and then, from the drop-down menu, use one of the available options:

    • Create Variable - Creates a new variable in the project to store the email from the activity.
    • Use Variable - Select a variable that you previously created in the project to store the email from the activity.
Properties Panel

Common

  • DisplayName - The display name of the activity.

Input

  • See the options in the body of the activity.

    Note:
    • The value for Email ID can can be retrieved from the MailMessage.Headers("Uid") object or from the UiPathEventObjectId project argument if an Integration Service trigger is used.
    • When used with the Use Outlook 365 activity, value retrieval from the UiPathEventObjectId argument is not supported on Windows-Legacy projects.

Misc

  • Private - If selected, the values of variables and arguments are no longer logged at Verbose level.

Output

  • See the options in the body of the activity.
  • Configuring the Activity

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.