Step Details |
Introduced in Version | --- |
Modified in Version | 8.17.0, 8.6.0, 7.14.0 |
Location | Communication > Email > IMAP/POP |
The Get Headers step for IMAP and POP email servers returns the header data of a specified number of emails from the user's configured email server.
Properties
Gmail
Property | Description | Data Type |
---|
Use Recent Flag | Using pop with Gmail will not retrieve all messages. Using the recent flag will get Gmail to return messages from the last 30 days. Note: The "Use Recent Flag" setting must be used on BOTH the "Get Header" step and the "Get Email" step to return the most recent emails; if Use Recent Flag is enabled on the "Get Header" step but not enabled on the "Get Email" step, then it will return no emails found. | Boolean |
Input
Property | Description | Data Type |
---|
Count | Specifies the number of email headers to return | Int32 |
OAuth Token | Allows a user to specify the IMAP or POP3 email server token. (Requires: email account configured for OAuth and POP3 or IMAP; OAuth Provider and Token for POP3 or IMAP) | String |
Password | The password of the user connecting to the email server | String |
Port | The port number of the email server | Int32 |
Secure Connection | Used if the email server credentials require a secure connection (must be set to true when using OAuth for POP3 or IMAP) | Boolean |
Server | IMAP or POP email server | String |
Sort Descending | When enabled, this will reverse the order of the messages before retrieving headers so that the newest messages will be returned by the step.
| Boolean |
Use OAuth | Specifies the use of OAuth authentication | Boolean |
Username | Username to connect to the email server | String |
Output
Property | Description | Data Type |
---|
Headers | List of the email header data found | EmailHeader list |

Example
- Create a new Scheduled Job
- Enter "Email Check" under Scheduled Job Name then click PICK SCHEDULED FLOW. Click CREATE and create a new Flow.
- Attach a Get Headers step from the COMMUNICATION > EMAIL > POP category in the Toolbox panel to the Start step.
- On the Properties panel, enter "10" under the Count field.
- Constant map the Email Servers information for the Username, Password, Server, and Port.

- Attach a ForEach Step from the FLOW MANAGEMENT > ITERATION category in the Toolbox panel to the Received path of the Get Headers step.
- On the Properties panel. Select From Flow map Headers to Collection.
Mapping the Collection Input will automatically adjust the Type under DATA, to its corresponding Data Type. This will allow the ForEach Step to pass EmailHeader data through the Flow.

- Attach the Done path to the End step, then attach a Get Email step from COMMUNICATION > EMAIL > POP. On the Properties panel, configure the inputs to match the settings from the Get Headers step. Click Unknown next to the Unique Id field and select Select From Flow. Select Headers. All UniqueId.First and click DONE.

- Connect the Not Found path to the End step.
- Attach the Found path to any desired Email processing Flows running as an Asynchronous Sub Flow.
When using an Email processing Sub Flow, define the Output Message data from the Get Email step as the Input for the Sub Flow, to allow the Flow to transfer all information through the Sub Flow and back.

- Click Save to save changes to the Flow and close the Flow.
- Back in the New Scheduled Flow window, scroll down to Calendar under Schedule Configuration. Select Time Span Schedule from the dropdown menu.

- Navigate to Time Span Schedule Information and configure the values to the desired time. Click Save.
The proper configuration of this example allows the Flow to check for new emails on a POP server, then process those emails via process logic in an Async Sub Flow.

Step Changes
Description | Version | Developer Task |
---|
Added two new properties: Use Recent Flag and Sort Descending for the Get Email Step and Get Headers Step. | 8.17 | DT-038377
|