Have Questions?  Need Expert Answers?  JOIN LUNCH N' LEARNS!

Get Headers Step

Prev Next

Step Details

Introduced in Version---
Modified in Version8.17.0, 8.6.0, 7.14.0
LocationCommunication > 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

PropertyDescriptionData Type
Use Recent FlagUsing 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

PropertyDescriptionData Type
CountSpecifies the number of email headers to returnInt32
OAuth TokenAllows 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
PasswordThe password of the user connecting to the email serverString
PortThe port number of the email serverInt32
Secure ConnectionUsed if the email server credentials require a secure connection (must be set to true when using OAuth for POP3 or IMAP)Boolean
ServerIMAP or POP email serverString
Sort DescendingWhen 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 OAuthSpecifies the use of OAuth authenticationBoolean
UsernameUsername to connect to the email serverString

Output

PropertyDescriptionData Type
HeadersList of the email header data foundEmailHeader list


Example

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

  6. Attach a ForEach Step from the FLOW MANAGEMENT > ITERATION category in the Toolbox panel to the Received path of the Get Headers step.
  7. 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. 

  8. 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.
  9. Connect the Not Found path to the End step. 
  10. 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. 

  11. Click Save to save changes to the Flow and close the Flow.  
  12. Back in the New Scheduled Flow window, scroll down to Calendar under Schedule Configuration. Select Time Span Schedule from the dropdown menu.
  13. 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

DescriptionVersionDeveloper Task
Added two new properties: Use Recent Flag and Sort Descending for the Get Email Step and Get Headers Step.8.17DT-038377

Related Information

Forum Posts:
Using Email Steps with Gmail Issue