Email Message Input
Description
Email Messages Input retrieves email messages and their attachments from a mail server using POP3, IMAP, or MBOX protocols. Use this step when your workflow needs to process incoming emails — for example, extracting invoice data from attachments, monitoring a support mailbox, or archiving messages. It supports filtering by sender, subject, and received date, along with SSL and proxy connections for secure environments. The step outputs message metadata and content as rows that downstream steps can transform or route.
The step also allows you to automatically extract attachments from email files (.eml) that are received as attachments within emails. This makes it easy to access files even when they are embedded inside multiple layers of emails.
For Zoho email IMAP server configuration: Search queries on the Subject field are subject to server-side indexing rules. Queries with less than three characters (for example, ID, HR, or P0) may return no results even if matching emails exist. This behavior is due to IMAP server limitations, which typically require a minimum of three characters for search terms.
Configurations
| Field Name | Description |
|---|---|
| General Tab: | General mail server connection settings. |
| Step Name | Specify the name of the step. This name has to be unique in a single workflow. |
| Server Settings: | |
| Source host | Provide the mail server host. |
| Use SSL? | Enable this checkbox if your server needs an SSL connection. |
| Username | Specify the username of the mailbox to connect to. |
| Password | Specify the password for the username. |
| Use proxy? | Select the checkbox if you want to connect through a proxy. |
| Proxy Host | Specify the Server Name or IP of the proxy. |
| Proxy Port | Specify the port number of the proxy. |
| Proxy Username | Specify the username to connect to the proxy server. |
| Proxy Password | Specify the password of the proxy server to connect. |
| Retrieve emails in reverse order | Enable this checkbox to retrieve email in reverse order i.e latest to oldest. |
| Fetch in batches? | Enable this checkbox if you want to retrieve larger volumes of mails in batches. |
| Save Attachments | Enable this checkbox to save attachments. |
| Attachment Folder | Click Select folder to specify the folder name to save the attachments. |
| Sanitize attachment filenames? | Select the checkbox to replace the illegal special characters in the filename with an underscore (). By default, the checkbox is clear. Note:Underscore () will replace the following illegal special characters in the filename, [ \ / : * ? " < > | ]. |
| Ignore errors reading fields | Sometimes a server doesn't support the retrieval of a particular piece of information. Enable this option to ignore these errors. |
| Protocol | Select a standard protocol POP3, IMAP or MBOX to retrieve mails. Note: To use a pop protocol, you need to configure your application for pop protocol, or for a web application you need to enable pop protocol which can differ for different service providers. For example:For web-based Gmail, you need to set the following, 1. Go to settings. 2. Go to Forwarding and POP/IMAP. 3. Enable POP for mail that arrives from now on. |
| Timeout and Protocols: | |
| Connection timeout (in milliseconds) | Specify the socket connection timeout value in milliseconds. Default value: Infinite |
| Timeout (in milliseconds) | Specify the socket read timeout in milliseconds. Default value: Infinite |
| Protocols | Select the checkbox of the TLS version for sending the email message. The available versions are: TLSv1, TLSv1.1, TLSv1.2, or TLSv1.3. You can select one or all versions. |
| Test Connection button | Click this button to connect to the mail server with the connection details specified. This button does not retrieve mails. |
| POP3 Settings: | POP3 Settings are enabled if you chose POP3 as the protocol. |
| Retrieve | Specify either "All emails" or "Retrieve first... emails" |
| Retrieve the ... first emails | If you chose "Retrieve first... emails", in the field above this field is enabled. Specify the number of mails you want to retrieve. Note: The value should be less than or equal to number of email present in INBOX. |
| Delete emails after | Enable checkbox to Delete emails after retrieval. |
| IMAP Settings: | IMAP Settings are enabled if you select IMAP as the protocol in General tab. Note: |
| Get folder from field | Enable this option if you wish to retrieve the IMAP folder name from an input field. |
| Folder field | Select a field containing the folder name. |
| IMAP folder | Specify the name for the IMAP folder to retrieve mails from Or ClickClick Test folder... to verify the folder is available and valid. |
| Test folder... button | Click Test folder button to test if the folder is valid. |
| Open button | Click Open button to select the IMAP folder. |
| Include subfolders | Check this option to retrieve mails from sub-folders as well. |
| Retrieve | Specify which mails to retrieve: Get all, new, old, read, unread, flagged, not flagged, draft, not draft, answered or not answered messages. |
| Retrieve the first ... emails | Specify the number emails to retrieve at most. Note: This field is enabled Protocol chosen is IMAP in the General settings tab. |
| Move Email to Folder | Specify the IMAP folder where emails should be moved after they are processed. This feature works only with IMAP (not supported for POP3). The field supports both static and environment variable values, for example, Click Test folder to verify whether the specified destination folder exists on the mail server. This helps validate the folder path before running the workflow. To move the email to the folder:Enter the folder name or full path where emails should be moved. For example,- INBOX/Processed - Archive/2024 - Completed Important: - Use the forward slash (/) to define folder hierarchy. For example, INBOX/Processed.- Leave the field empty to disable email movement. - Use variables to define IMAP folder, such as ${myVariable} or %%myVariable%% Examples: - INBOX/Archive - Moves emails to Archive inside Inbox- Processed - Moves emails to Processed folder - ${MOVE_TO_FOLDER} - Uses a variable value - Archive/ ${YEAR}/${MONTH} - Moves emails to dynamic folders based on year and month |
| (Button) Select folder | Click to open a folder browser that displays all available folders on the mail server. You can select the destination folder directly from the list. |
| Create folder | Select the checkbox to automatically create the destination folder, including any required parent folders if it does not already exist on the mail server. The step fails if the destination folder does not exist For example,The Move Email to Folder field contains the path: processed_emails/FY_Years/FY_2026. Only the processed_emails folder exists on the server. When you select Create folder: - The system creates folder FY_Years inside processed_emails.- The system creates folder FY_2026 inside folder FY_Years. - The system moves the emails to folder: processed_emails/FY_Years/FY_2026 |
| Batch Settings: | |
| Batch size | Specify the number of emails to retrieve at once in one batch. |
| Start at message number | Specify the first message number to start retrieving at. |
| End at message number | Specify the last message number to end retrieving with. |
| Attachment Tab: | Use the Attachment tab to configure how the step processes and stores email attachments, including nested .eml files. How .eml Extraction Works - The step saves all attachments from incoming emails to the Attachment Folder.- If it detects a .eml file, it parses the file and extracts any embedded attachments to the Extracted attachment location. - If the system encounters nested .eml files inside the parent .eml, it continues extracting based on your configured Maximum .eml extraction depth: - Depth of 1: Extracts attachments from the first .eml file only. - If nesting exceeds your configured limit, the system logs a warning, stops extraction, and saves the deepest reached .eml file intact. - The system preserves original file names during extraction. If it detects duplicate file names, it appends a numeric suffix to the new file (for example, invoice_1.pdf, invoice_2.pdf). - If the system cannot save an extracted attachment due to any reason (for example, invalid path or permission issue) the step fails and triggers your standard error-handling logic. - If extraction of even a single file inside an .eml message fails, the step fails. If the workflow includes error handling, it continues execution, but the extraction fails for the step; otherwise, the entire workflow fails. |
| Save Attachments | Select Save Attachments to save attachments from the incoming email. If cleared, the step ignores all attachments, including .eml files. |
| Attachment Folder | Specify the folder path to save the primary attachments. Or Click Select Folder to choose a location. |
| Extract attachment from .eml | Select Extract attachment from .eml to extract attachments embedded inside .eml file. Note: When selected, the following fields are enabled: Preserve .eml file, Extracted .eml attachment location and Maximum .eml extraction depth |
| Preserve .eml file | Select Preserve .eml file to keep the original .eml file after successful extraction. If cleared, the step deletes the .eml file after it successfully extracts the nested attachments, and saves only last extracted attachment file. |
| Extracted .eml attachment location | Specify the path to save the extracted attachments from the .eml files. Or Click Select folder to select the required location. |
| Maximum .eml extraction depth | Specify the number of nested email levels to extract attachments from (for example, 1, 2, …) Allowed Values: 1,2,3 Default Value: 2 |
| Sanitize attachment filenames? | Select Sanitize attachment filenames? to replace illegal characters (! @ # / and so on) in attachment filenames with an underscore (_). |
| Filters Tab: | These are the filters you can set on the header of the mail message. |
| Sender (FROM) | If check box is ticked then filter by Sender (FROM). |
| Recipient(To) | If check box is ticked then filter by Recipient(To). |
| Subject | If check box is ticked then filter by Subject. |
| Received Date | Choose a condition on Received Date from the list. |
| Limit Size | Put a size limit on the mail with attachments. |
| Fields Tab: | |
| Name | Choose email attributes to be available as fields. |
| Keep HTML Tags in the Body | Select the checkbox if you want the HTML tags to be displayed in the output view. Note: The checkbox is clear by default. |