Skip to main content

Office 365: Email Message Input

Description

Office 365: Email Message Input plugin step fetches the mails for an Office 365 user. Note:

  • For MFA enabled user account. Select Grant Type as Refresh Token.
  • If the emails need to be marked as read, then you need to provide the ‘Mail.ReadWrite’ permission.

Permission: Office 365 Email Messages Input Step needs the following permissions to fetch emails.

Permission typePermission (from least to most privileged)
DelegatedMail.ReadBasic, Mail.Read
Delegatedoffline_access

References https://docs.microsoft.com/en-us/graph/api/user-delete?view=graph-rest-1.0

Configurations

No.Field NameDescription
1Step NameName of the step. This name has to be unique in a single workflow.
Connection:For details about app registration, see Office 365 App Registration for Grant Type – Password Grant or Office 365 App Registration for Grant Type Refresh Token
2Grant TypeSelect the type of grant from Password Grant or Refresh Token.
The data type is string. This field is mandatory.
Note: It is recommended to select the grant type from Refresh Token.
3Tenant IDTenant ID of Microsoft Account.
The data type is string. This field is mandatory.
4Client IDClient ID of the Application created in Microsoft Account.
The data type is string. This field is mandatory.
Client Secret:
5Accept Value as variable/staticLeave checkbox unchecked to accept Client Secret value from a field in the previous steps of the stream using a drop down list. Else enable checkbox for Client Secret field to appear as Text box.
6Client SecretSpecify the Client Secret generated in Microsoft Account.
Client Secret is entered using a widget. The widget handles both Text (static value or environment variable) and Combo (drop down containing values from previous steps). If checkbox above is enabled Client Secret field appears as a Text box and accepts static or variable values. Else if checkbox above is disabled Client Secret field appears as a drop down to select fields from previous steps.
The data type is secure string. This field is mandatory.
7UsernameSpecify the name of the user whose email attachments are to be downloaded.
8PasswordSpecify the password for the provided user name.
9Refresh TokenSpecify the refresh token required to authenticate the details.
10Button: Test ConnectionTest connection with Client ID and Client Secret provided. Verifies whether the connection is established or not.
Note: For the purpose of verification fields coming from previous steps are not allowed since field values can only be accessed when workflow is in running state. Static values and environment variables are allowed.
Input Tab:
Input Fields:
1FolderSpecify the folder of which emails are to be fetched. Provide folder name, such as, folder1/folder2/folder3…folder.
The data type is String. This field is mandatory.
Note: It must be a valid email folder and the folder name must not contain slash(/).
2GetClick to display a list of folders for email account.
Known issue: The folder structure may not be correct when fetched and selected through Get.
Note: Verify the folder structure when selected through Get.
Recommendation: For multi-level folder structure, pass the folder structure directly to the field instead of selecting through Folder Explorer, which appears after you click Get.
3RetrieveSelect from the following retrieve options:
- Get All Messages
- Get unread messages.
4Retrieve The Top ... EmailsProvide the positive integer value to fetch top n emails.
This field is optional.
Retrieve The Top ... Emails value is ignored if ‘Fetch in Batches’ below is ‘Yes’.
5Retrieve Emails In Reverse OrderAllowed values: 'Yes', 'No'. Provide ‘Yes’ to fetch in reverse order i.e. Old to New. This field is optional.
6Mark As ReadAllowed values: 'Yes', 'No'. Provide ‘Yes’ if fetched mails are to be marked as read. This field is optional.
7Default CharacterLimit For Test Extraction Specify the character limit to read the email body.
Default value: 1000000
Batch:
1Fetch in BatchesAllowed values: 'Yes', 'No'. Provide ‘Yes’ to fetch in batches.
Note:
• If Retrieve Emails In Reverse Order and Fetch In Batches both are selected then the batches are reversed.
• Retrieve The Top ... Emails value is ignored if ‘Fetch in Batches’ below is ‘Yes’.
• Batch Size and Limit will be considered only if Fetch in Batches is ‘Yes’.
2Batch SizeThis field is enabled if the checkbox above is selected.
Provide the positive integer value for the size of the batch to be fetched.
If ‘Yes’ is provided in ‘Fetch in Batches’ field above, a value must be provided.
3LimitProvide a positive integer which is an upper limit for the total number of emails to fetch.
You may optionally provide a value if Yes is provided in field ‘Fetch in Batches above.
**Filters Tab: **
Header:Note: If multiple filters are used from the below list, then AND operator is used for filters.
The data type of all fields in the Header is String. The fields are optional.
1SenderProvide the mail address to filter mails by Sender.
2RecipientProvide the mail address to filter mails by Recipient
3SubjectProvide the value to filter mails by Subject.
4CategoryProvide the value to filter mails by Category.
5Has AttachmentsProvide the value to filter the emails with attachments. Allowed value: ‘True’ or ‘False’.
6Search TextProvide the value to search the text in either of Body, Sender, or Subject.
Received date:
7ConditionSelect the condition to filter mail by received date.
Allowed values are: 'None', 'Equal to', 'Smaller than', 'Greater than', 'Between...and...'.
Date values below are not considered if Condition is ‘None’/Blank.
8Date1Provide the Date1 (yyyy-MM-dd) for the provided condition.
9Date2Provide the Date2 (yyyy-MM-dd) only if Between conditions is selected.
Note:
- Validate Date1 and Date2 based on the selected condition for Received Date.
- Date values below are not considered if Condition is ‘None’/Blank.
- Date1 value must be smaller than Date 2 value if Received Condition is 'Between...and...'; and if Date1 value is greater than Date 2 value then the workflow executes successfully without any output.
Output Fields:This is a tabular list.
1Field NameClick on a field in the Name column to open the Select Fields Name pop-up window explorer and select email properties to fetch You may select multiple properties.
The data type is String. At least one field must be selected.
2Output Field NameSpecify an Output Field Name to hold the corresponding value of the Field Name selected above.
The data type is String. This field is mandatory.
3Keep HTML Tags in the BodySelect the checkbox if you want the HTML tags to be displayed for the mail body.
Note: The checkbox is clear by default.