Overview
This Flow reads email messages and attachments from an inbound email connection and saves them as individual files in a specified folder on the server (read about Server Storage connection). It is optimized for high-volume email processing and is significantly faster than using a standard source-to-destination Flow.
You can later process the saved files using any File to Destination Flow.
When to use this flow type
Use this Flow type when:
-
You need to process hundreds or thousands of emails quickly.
-
Your Inbound Email Connection is relatively slow.
-
You prefer to store emails and attachments as files for further downstream processing.
How to Create the Flow
Step-by-step instruction
Step 1. Create an Inbound Email Connection
This connection will serve as the source.
Step 2. Create the Flow
Enter Read emails in the Select Flow Type field), select Read emails, save messages to the folder.
Step 3. Choose Source Connection
In the Source connection dropdown, select the previously created Inbound Email Connection.
Step 4. Configure Parameters
Switch to the Parameters tab and enter the relevant Flow parameters:
-
From: Filter by sender address. Partial matches are supported (e.g., etlworks.com includes all emails from that domain).
-
Subject: Filter by subject line. Partial matches are supported (e.g., important!).
-
Email Folder: Folder to read messages from (default: Inbox).
-
Received After: Only read emails received after this date (MM/DD/YYYY).
-
Received Before: Only read emails received before this date (MM/DD/YYYY).
-
Read Only New: If enabled, retrieves only unread messages.
-
Max messages to read: Maximum number of messages to read in one run.
-
Folder to save messages to (required): Location in server storage where emails and attachments will be saved (e.g., {app.data}/attachments).
→ See Saving Email Attachments below for overwrite protection.
-
Delete After Reading: Choose one:
-
Same as connection (default)
-
Yes: Delete message after reading
-
No: Keep message after reading
-
-
Script: JavaScript to run before the Flow starts (e.g., to set global variables).
-
On Exception: By default, errors stop the Flow. Select Ignore to allow it to continue even if an error occurs.
-
Exception Mask: Partial or full exception string to ignore specific errors. Used only when Ignore On Exception is enabled.
-
Execute on exception: JavaScript to run if an error occurs.
-
Execute if Error: If selected, sends an email when a Flow error occurs. Useful for error notifications or report delivery.
Configure Folder to Save Email Attachments
The Folder to save messages to parameter defines the directory in which email attachments will be stored.
-
By default, attachments retain their original filenames.
-
When processing multiple emails, attachments with the same name can be overwritten.
-
To avoid this, enclose the folder path in angle brackets (<>), for example:
<{app.data}/attachments>
This tells Etlworks to generate unique filenames to prevent overwriting.
Comments
0 comments
Please sign in to leave a comment.