Use the Email Listener trigger block to monitor an inbox and submit incoming email bodies and attachments to a flow.
On SaaS, if the email server is not publicly accessible, allow access through your firewall. Hyperscience can provide the range of cloud-infrastructure IP addresses so you can restrict access to those addresses.
Nested email attachments in v43.2 and later
When an email contains an attached
.emlor.msgfile, the Email Listener passes the attached email to the flow as a single file. The Submission Bootstrap Block extracts the nested email body and its supported attachments for processing. The standard flow processes one nested email level. To process additional levels, add a Custom Code Block before the Submission Bootstrap Block. See How do I access an email stored by the Email Listener? in the Flows SDK documentation.
Sample use cases
Process email attachments sent from internal systems.
Process customer email bodies and their attachments.
Email Listener settings
In addition to the settings outlined below, you can also configure the settings described in Universal Integration Block Settings.
Name | Required? | Email providers | Description |
|---|---|---|---|
Email Provider | Yes | All | The type of email provider you are integrating with:
|
IMAP Server Address | Yes | Generic (IMAP) | The IMAP server address of the email account (e.g., "imap.google.com"). |
Port Number | Yes | Generic (IMAP) | The port number the connection should use to access the email account. Defaults to 993. |
Use SSL Connection | Yes | Generic (IMAP) | Indicates whether an SSL connection should be used to connect to the email account. Selected by default. |
Username | Yes | Generic (IMAP) | The username for the email account being scanned. |
Password | Yes | Generic (IMAP) | The password for the email account being scanned. To edit the password, click Edit value, modify the password, and then click Done. |
User Principal Name | Yes | Microsoft 365 Outlook | The User Principal Name of the user whose inbox you want to create submissions from. To find this value, log in to the Azure portal, click Azure Active Directory, and then click Users in the left-hand panel. |
Client ID | Yes | Microsoft 365 Outlook | The Application (client) ID of your Azure AD application. |
Client Secret | Yes | Microsoft 365 Outlook | The value of the Client Secret you created for your Azure AD application. |
Tenant ID | Yes | Microsoft 365 Outlook | The Directory (tenant) ID of your Azure AD application. |
Microsoft Graph Cloud Endpoint | Yes | Microsoft 365 Outlook | The endpoint of the Cloud where your application is hosted:
|
Azure AD Endpoint | Yes | Microsoft 365 Outlook | The Azure AD endpoint of the region where your application is hosted:
|
Polling interval (in seconds) | Yes | All | The frequency at which the connection monitors the email folder for submissions. Defaults to 60 seconds. |
Folder to scan for emails | Yes | All | The email folder to retrieve submissions from (e.g., "Inbox"). |
Email Body Treatment | Yes | All | Specifies how the body of processed emails is handled. Defaults to Ignore:
If set to Upload as a document to be processed, Hyperscience ingests the email body as a document and adds it to your submission. |
Headers to extract | No | All | The headers to render at the top of the email body when ingesting the body as a document in your submission:
This setting is only available if Email Body Treatment is set to Upload as a document to be processed. |
Post Process Action | Yes | All | Specifies how emails are handled after processing. Defaults to Move to folder:
|
Post Process Archive Folder | Yes, when Post Process Action is set to Move to folder | All | The folder that emails will be moved to after they are processed. If this value is invalid, the Email Listener fails, and no submissions are created from it. This setting is only available if Post Process Action is set to Move to folder. |
Original Email File | Yes | All | Determines whether a copy of the original email file is saved in the file store:
If Store a copy is selected, ensure that there is space available in the file store for the email files. For details on accessing stored email files, see our Flows SDK documentation. |
Attachment Headers | Yes | All | Determines whether attachment headers are extracted and included in the
Selecting Extract allows you to use attachment headers to inform the processing of emails in custom flows. For details on accessing stored attachment metadata, see our Flows SDK documentation. |
Set up the Email Listener
Remove email-forwarding rules
Before enabling the Email Listener, remove any forwarding rules on the email account the Listener will ingest submissions from. Any forwarding rules in place may interfere with how the Listener detects and moves messages, causing submission errors.
If you’re connecting to a generic (IMAP) email provider, you do not need to configure anything in the email inbox. To set up the Email Listener, enter the settings as described in the Email Listener settings above.
If you're using IMAP to connect to Gmail, you need to create an app password for your Google account and enter that password in the Password setting for the Email Listener. For more information about app passwords, see Google's Sign in with app passwords.
If you’re connecting to Microsoft 365, you first need to create an Azure AD application. For more information, see Microsoft 365 Outlook. Then, enter the settings as described in the Email Listener settings above to finish setting up the Email Listener.