Subscribe

UiPath Activities

The UiPath Activities Guide

Save Email Attachments

UiPath.Mail.Activities.Business.SaveMailAttachmentsX

Saves the attachments of a mail message or invite to a specified folder on your computer. Should be used for the email currently selected in the Outlook desktop app, or in a For Each Email activity when iterating through Gmail or Outlook emails. This activity must be added inside a Use Outlook 365, Use Gmail, or Use Desktop Outlook App activity.

To learn how to use this activity, see:

Configuring the Activity

In the Body of the Activity

  • Email - Click Plus plus buttonplus button on the right side of the field, and then, from the menu, select the email whose attachments to save. When the activity is inside a For Each Email activity, select CurrentMail to indicate the current mail in the iteration. When automating the Outlook desktop app, you can also select Selected Mail to use the message that is selected in Outlook when the project is executed. Alternatively, you can select Open in Advanced Editor and enter a VB expression.
  • Filter by file name (e.g. .xls) - Click Plus plus buttonplus button on the right side of the field, then select Text from the menu, and enter a filter to narrow down the types of attachments to save by file name. You can use the asterisk * wildcard character (matches any number of characters).
    For example:
    • To only save PDF attachments, enter *.pdf in the Text Builder.
    • To save all Excel files regardless of extension (xls, xlsb, xlsx, etc), enter *.xls* as the filter.
    • To save multiple types of attachments, for example PDFs and Excel files, enter *.xls|*.pdf as the filter.
  • Save to folder - Click Browse browse filesbrowse files next to the field, and then browse to and select the folder where to save the attachments. Alternatively, you can indicate a file by selecting an option from the Plus plus buttonplus button menu on the right side of the field. If a file with the same name as an attachment already exists in the folder, a digit is appended to the attachment name. If no folder is selected, the attachments are saved to the project folder.
  • Overwrite existing - If selected, overwrites an existing file with the same name as the attachment.

In the Properties Panel

Common

  • DisplayName - The name displayed for the activity in the Designer panel.

Input

Misc

  • Private - If selected, the data used in the activity is not logged by StudioX.

Options

Output

  • Attachments - List of attachments saved from the mail.

Updated 5 months ago


Save Email Attachments


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.