Skip to main content

Get Outlook Mail Messages

Description

Returns mail messages from Outlook

Properties

Host

  • Account – Specify the mail account from which to retrieve the mail messages.
  • Mail Folder – Specify the mail folder from which to retrieve the messages.

Misc

  • DisplayName – Add a display name to your Activity.
  • Private – By default, Activity will log the values of your properties inside your workflow. If private is selected, then it stops logging.

Optional

  • Continue On Error – Specifies if the automation should continue even when the Activity throws an error. This field only supports Boolean values (True, False). The default value is False.
    note

    Catches no error if this Activity is present inside the Try-Catch block and the value of this property is True.

Options

  • Delete Messages – Specify the Boolean value true for deleting the read messages.
  • Mark Mail As Read – Specifies whether to mark retrieved messages as read.

Output

  • Messages – The retrieved messages as a collection of MailMessage objects.

Email Filters

Users can apply filter criteria to extract the needed emails using this Activity. The Activity provides the user to build the filter expressions. You can click the Filter button as part of this Activity's body to create your filter expressions.

Clicking on the Filter button brings the filter expression builder dialog.

Filter Expression Dialog

Number of Records

Filter by the number of messages to retrieve. If not specified, returns all the mails which satisfy the filter condition.

Building filter expressions

  • Click on the + button available in the dialog
  • Select the field from the dropdown on which you need to filter the emails
  • Select the conditional operator to be used from the dropdown

    Note: The conditional operator list dynamically changes based on the field selected

  • Specify the value to be used for the filter

Note: If you need to build a complex expression, you can add more expressions by combining them with appropriate conjunctions.

  • Click on the + button
  • Select the conjunction from the dropdown
  • Continue building expressions

Expression Grid

ColumnDescription
LogicSelect the logical conjunction to be used to combine the expressions from the dropdown
FilterFieldApply the filter from the dropdown on the selected field
ConditionSelect the conditional operator to use in the expression from the dropdown
ValueSpecify the value of the selected field to filter

Logical Conjunctions

OptionDescription
ANDPerforms logical AND operation between the selected expressions
ORPerforms logical OR operation between the fixed terms

Email Filter Fields

FieldDescription
SubjectRetrieves emails that match the specified subject
SenderRetrieves emails that match the specified email address
ToRetrieves emails that match the specified receiver email address
CcRetrieves emails that match the specified CCed email address
BccRetrieves emails that match the specified BCCed email address
Mail BodyRetrieves emails that match the words in the mail body
ReceivedRetrieves emails that match the received Date of mails
SentRetrieves emails that match the sent Date of mails
Unread Mails OnlyRetrieves the unread emails
Read Mails OnlyRetrieves the read emails
Has AttachmentsRetrieves emails that contain attachments
ImportanceRetrieves emails that match the specified mail priority. The value can be "MailPriority.Low", "MailPriority.Normal", or "MailPriority.High"

Example

Download Example

Get Outlook Mail Message