Email Listener

Email Listener

The Email Listener allows you to monitor an email inbox so that any emails that are received are processed by Hyperscience.

To use the Email Listener on SaaS, the customer should open a firewall pinhole if the email server is not public. We may provide a range of IP addresses used by our cloud infrastructure, so firewall access may be more restrictive.

Sample use cases

Block settings table

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:
- Generic (IMAP)

- Microsoft 365 Outlook
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:
- Global

- US Government L4

- US Government L5 (DOD)

- Germany

- China
Azure AD Endpoint Yes Microsoft 365 Outlook The Azure AD endpoint of the region where your application is hosted:
- Azure AD Global (public cloud)

- Azure AD China

- Azure AD Germany

- Azure AD US Government
Polling Interval In Seconds Yes All The frequency at which the connection will monitor the email folder for submissions.
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 will be handled:
- Ignore

- Upload as a document to be processed

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 Include No All The headers to render at the top of the email body when ingesting the body as a document in your submission:
- To

- From

- Subject

- Date

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 will be handled after they are processed:
- Delete

- Move to folder
Post Process Archive Folder Yes, if available 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:
- Do not store a copy (default)

- Store a copy

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 (opens in new tab).
Attachment Headers Yes All Determines whether attachment headers are extracted and included in the attachment_metadata element of the block’s output:
- Do not extract (default)

- Extract

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 (opens in new tab).

Setting 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 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 (opens in new tab).