Use the Save email action in the Email package to automatically save email messages as EML files to a specified folder in your bot. Use this action within a Loop action to process and archive multiple emails in a single automated workflow.
Settings
Note: Use the For each mail in mail box
iterator to repeat a set of actions on all the emails within the specific
parameters. See the following links:
- Session name: Enter the name of the session that you used to connect to the email server in the Connect action.
- Save emails to folder: Specify the location to save the
email. This field is not case-sensitive.
- (Optional) Filename:
Enter a name that you want to use to save the email. You can use the complete folder
path to save the email. By default, if a filename is not provided, the email subject
is used to save the email. Note:
- The maximum number of characters that this field supports is 250.
Characters exceeding this limit will be truncated. The operating system
limit for full file path (folder path + filename + extension) is as
follows:
- macOS - 1024 characters
- Windows: 260 characters
max filename length = max path limit - folder path length - extension length - When the email subject is used as the filename, the following special
characters are replaced with an underscore (_):
- Slash, forward or backward ( / \ )
- Angle bracket, left or right ( < > )
- Colon ( : )
- Asterisk ( * )
- Braces left or right ( { } )
- Percent ( % )
- Quote ( " )
- Single quote ( ' )
- Question mark ( ? )
- Pipe ( | )
- TAB (\t)
- The maximum number of characters that this field supports is 250.
Characters exceeding this limit will be truncated. The operating system
limit for full file path (folder path + filename + extension) is as
follows:
- Overwrite file(s): Select this option to overwrite the existing file with the same name. If this option is not selected, the email message is saved with the same filename suffixed with a numeric value; it does not overwrite the existing file.
Note: Microsoft Outlook supports this action on the
Windows platform only. To create automation on the macOS platform, use the Microsoft Outlook (macOS)
package. See Microsoft Outlook (macOS) package.
Example
This example saves unread emails as EML files to a local folder.
- Drag the Connect
action from the Email
package and enter a session name, for example
EmailSession1. - Drag the Loop
action and do the following:
- In the Iterator list, select For each mail in mail box under Email package.
- Enter
EmailSession1for Session name. - Select Unread under Status of email.
- Inside the loop, drag the Save email
action and do the following:
- Enter
EmailSession1for Session name. - Set Save emails to folder to your destination path, for
example
C:\EmailArchive\.
- Enter
- After the loop, drag the Disconnect
action and enter
EmailSession1for Session name.
Result: Each unread email is saved as an EML file in the archive folder. See Using the For each mail in mail box iterator for iterator options.