Etlworks reads, transforms, sends, and routes email through your existing mail infrastructure. Inbound email and attachments are pulled via POP3 or IMAP; outbound email is sent via SMTP, the Gmail API, or the Microsoft Graph API. Email can be a source, a destination, or the entire purpose of a flow.
What you can do with email in Etlworks
| Use case | How |
|---|---|
| Send a one-shot email | Send Email flow — dedicated flow type with subject, body, attachments, error-handler hooks. |
| Email the results of an ETL flow | Outbound email as the destination in a source-to-destination transformation. Body inline, or whole result attached as a file. |
| Send HTML email | HTML format + outbound email connection. |
| Process incoming emails or attachments | Inbound email as the source of an ETL flow. |
| Save email content or attachments to disk | Copy Files flow with inbound email as source. |
| Bulk-read thousands of messages | Read emails, save messages and attachments to the folder — flow type optimized for speed against slow inbound mailboxes. |
| Browse a mailbox interactively | The mailbox shows up in Etlworks Explorer alongside databases and files. |
| Email notifications on success / failure | Wire the scheduler or webhooks to the Send Email flow. |
| Work with Gmail or Microsoft 365 / Exchange | Provider-specific connectors using the Gmail API or the Microsoft Graph API. |
Email connections
Two connection types cover the inbound and outbound directions. Most other email features sit on top of these.
- Inbound Email Connection — reads emails and attachments via POP3 or IMAP. Used as a source in ETL or Copy Files flows.
- Outbound Email Connection — sends emails and attachments via SMTP, Gmail API, or Microsoft Graph API. Used as a destination in ETL flows or as the target of a dedicated Send Email flow.
Sending email and attachments
Two patterns. Use a dedicated Send Email flow when you just need to send a message. Use an outbound email connection as the destination of an ETL flow when you want to send the transformation result.
Option 1: dedicated Send Email flow
The Send Email flow is a one-action flow type. It can run on its own or as a step inside a nested flow — useful for sending a notification at the end of a pipeline.
- Create an Outbound Email Connection.
- Create a Send Email flow: Flows → + → type send email in Select Flow Type → pick Send Email.
- Select the Outbound Email connection from step 1.
- Open the Parameters tab and set the email fields. Each one overrides the matching field on the connection; most are optional:
| Field | What it does |
|---|---|
| From | Sender's email address. |
| To | Recipient address(es). |
| Cc / Bcc | CC / BCC address(es). |
| Subject | Email subject line. |
| Message | Email body. Supports HTML when the connection's Content Type is text/html. |
| Header | Optional header text added before the message body. |
| Folder | Folder on the mail server to copy the sent message into. |
| File | Full path to a file to attach. Use {tokens} like {app.data}; use wildcards (e.g. *.csv) to attach multiple files. |
Error handling options on the flow:
| Option | What it does |
|---|---|
| On Exception | By default, errors stop the flow. Enable Ignore to let the flow continue. See handling exceptions in flows for full coverage. |
| Exception Mask | Part or all of an exception message to ignore. Only applies when Ignore On Exception is enabled. |
| Execute if Error | Run this flow only when an upstream error occurs — ideal for failure notifications inside a nested flow. |
Option 2: outbound email as a destination in an ETL flow
Use this to send the output of a transformation as an email. The transformation runs normally; the destination is the outbound email connection rather than a database or file.
- Create an Outbound Email Connection. Set From, To, Subject, and optionally Cc, Bcc, and Message.
-
Optional: on the outbound connection, enable Always send message as attachment to send the transformed data as a file attachment rather than in the email body. This option is ignored if a flow-level File is set or if the connection is used in a dedicated Send Email flow.
- Create a source connection (database, file, web service, …).
- Create an ETL flow with email as the destination — type to email in Select Flow Type.
- Set FROM to the source from step 3 and TO to the outbound email connection from step 1. If Always send message as attachment is on, the TO filename (set in the mapping or transformation) becomes the attachment filename.
- Add mapping and adjust parameters as needed.
Sending HTML email
- Create an HTML format.
- On the Outbound Email Connection, set Content Type to text/html.
- Create an ETL flow with email as the destination (to email in the flow gallery).
- Add a transformation where the destination is the outbound email connection from step 2 and the destination format is the HTML format from step 1.
Receiving emails and attachments
Three patterns: ETL on the email content into another destination, copy email content / attachments to a file, or bulk-read many messages efficiently. All three use the same Inbound Email Connection as the source.
ETL emails and attachments into a destination
Use an Inbound Email Connection as the source in a source-to-destination transformation. The flow extracts the email or attachment payload, transforms it, and loads it into the configured destination.
- Create an Inbound Email Connection as the source.
- Create the destination connection.
- Create an ETL flow with email as the source — type email to in Select Flow Type.
- Set FROM to the inbound email connection from step 1 and TO to the destination from step 2. Use appropriate formats on both sides.
-
Filter emails by subject (optional): use the FROM field to specify a subject. Wildcards are supported. If multiple emails match, Etlworks picks the first by received time.
- Configure mapping and parameters. Three rules to know:
- If the email has attachments, the largest attachment is used as the source.
- If there are no attachments, the email body is used.
- To filter attachments by filename, use the File property on the Inbound Email Connection (wildcards allowed). If Dump Attachments To is set, matching attachments are saved to that folder and no further transformation runs.
Copy email content or attachments to a file
Use a Copy Files flow to land email bodies or attachments on a file-based destination — no transformation, no format parsing.
- Create an Inbound Email Connection as the source.
- Create the destination connection. Supported: cloud storage, file storage, Redis, HTTP.
- Create a Copy Files flow.
- Set FROM to the inbound email connection and TO to the file destination.
- Filter by subject (optional): use FROM with wildcards. First matching email (by received time) is used.
Read emails in bulk
For mailboxes with hundreds or thousands of messages on a slow connection, use the dedicated Read emails, save messages and attachments to the folder flow type. It's optimized for throughput and lets you process the saved files with any downstream file-to-X flow.
You can also use a regular ETL flow with an inbound email source, but it'll be slower than the bulk-read flow for large mailboxes.
Filter inbound emails
Filters are configured on the Inbound Email Connection itself (under Filter) and apply to every flow that uses the connection.
| Filter | What it does |
|---|---|
| Read Only New | If on, only unread messages are retrieved. |
| From | Filter by sender. Partial matches allowed (e.g. etlworks.com). |
| Subject | Filter by subject. Partial matches allowed. |
| Folder | Folder to read from. Defaults to INBOX. |
| File | Filter by attachment filename. Wildcards allowed. |
| Received After | Only messages received after the specified date (MM/DD/YYYY). |
| Received Before | Only messages received before the specified date. |
Delete or mark as read after processing
Two post-processing options on the Inbound Email Connection, both off by default:
-
Delete After Reading — deletes each email after it's processed.
-
Mark as Seen — marks each email as read after it's processed.
Browse a mailbox in Etlworks Explorer
Any Inbound Email Connection shows up in Etlworks Explorer — browse the mailbox the same way you browse a database or file storage.
Email notifications
Notifications on flow success or failure (scheduler)
Configure the scheduler to send an email when a scheduled flow succeeds or fails. See the scheduler's notification settings, or wire a Send Email flow into a nested flow for richer logic.
Notifications on webhook events
Trigger an email when any webhook event fires — for example, when a flow completes externally, or when an external system pushes an alert.
Configure the global email sender
Set the platform-wide Global Email Sender under the Mail configuration. Used as the default From for all outgoing email when a connection-level From isn't set.
Provider-specific connectors
Gmail (Gmail API)
Connect to Gmail to read or create messages and attachments via the Gmail API. See Working with Gmail for the setup walkthrough.
Microsoft Exchange and Office 365 (Microsoft Graph API)
Send and receive email via Exchange Online or Microsoft 365 using the Microsoft Graph API. See Microsoft Exchange connector.
Troubleshooting
If sending or reading email fails, enable JavaMail debug logging on the connection.
Add this to the Properties field of the Inbound or Outbound Email Connection:
mail.debug=true
The flow log will then include verbose protocol-level output. For example:
DEBUG SMTP: message successfully delivered to mail server