IMAP Mail Poller Trigger
Use the IMAP Mail Poller trigger to periodically poll a mailbox and start a flow when emails that match the specified search criteria are found.
The trigger connects to the configured IMAP server and retrieves emails from the specified mailbox. When matching emails are found, the trigger invokes the associated flow and passes the email details to the flow inputs.
The trigger supports batch processing and provides optional configurations for retrieving the email body, marking emails as read, and deleting emails after processing.
Trigger Settings
The Trigger Settings section contains the configuration required to connect to the mailbox and retrieve emails.
| Field | Description |
|---|---|
| IMAP Server Connection | Select the IMAP connection used to connect to the email server. |
| MailBox Name | Name of the MailBox/Label/Folder to poll emails from e.g. Inbox, Sent, Drafts or custom folder/label. |
| Polling Interval | Specifies the time interval between mailbox polling operations. e.g. 30m, 1.5h. Valid time units are 'ns', 'us' (or 'µs'), 'ms', 's', 'm', 'h' |
| Search Criteria | Specifies the IMAP search criteria used to filter emails retrieved from the mailbox. Refer https://datatracker.ietf.org/doc/html/rfc3501#section-6.4.4 for more details. |
| Batch Size | Specifies the max number of emails processed in each polling cycle. If set to 0 or less, all mails will be processed |
| Read Body | Boolean value that determines whether the email body content is retrieved. The default value is false. |
| Mark As Read | Boolean value that determines whether the processed emails are marked as read. The default value is false. |
| Delete Mail | Boolean value that determines whether the emails are deleted from the mailbox after processing. Be cautious as emails are permanently deleted and can not be recovered. The default value is false. |
Map to Flow Inputs
The Map to Flow Inputs section displays the email data that can be mapped to the flow inputs when the trigger is executed.
| Field | Description |
|---|---|
| mails | Array containing the emails retrieved from the mailbox. |
Each element in the mails array contains the following fields:
| Field | Description |
|---|---|
| from | Sender information of the email. |
| to | List of recipient email addresses. |
| cc | List of carbon copy recipients. |
| bcc | List of blind carbon copy recipients. |
| date | Date and time when the email was sent. |
| precedence | Precedence header value of the email. |
| subject | Subject line of the email. |
| body | Email message body content. |
| flags | Flags associated with the email such as Seen or Answered. |
| attachments | List of attachments included in the email. |
Each element in the attachments array contains the following fields:
| Field | Description |
|---|---|
| name | Name of the attachment file. |
| type | MIME type of the attachment. |
| data | Encoded content of the attachment file. |