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 type | Permission (from least to most privileged) |
---|---|
Delegated | Mail.ReadBasic, Mail.Read |
Delegated | offline_access |
References https://docs.microsoft.com/en-us/graph/api/user-delete?view=graph-rest-1.0
Configurations
No. | Field Name | Description |
---|---|---|
1 | Step Name | Name 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 | |
2 | Grant Type | Select 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. |
3 | Tenant ID | Tenant ID of Microsoft Account. The data type is string. This field is mandatory. |
4 | Client ID | Client ID of the Application created in Microsoft Account. The data type is string. This field is mandatory. |
Client Secret: | ||
5 | Accept Value as variable/static | Leave 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. |
6 | Client Secret | Specify 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. |
7 | Username | Specify the name of the user whose email attachments are to be downloaded. |
8 | Password | Specify the password for the provided user name. |
9 | Refresh Token | Specify the refresh token required to authenticate the details. |
10 | Button: Test Connection | Test 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: | ||
1 | Folder | Specify 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(/). |
2 | Get | Click 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. |
3 | Retrieve | Select from the following retrieve options: - Get All Messages - Get unread messages. |
4 | Retrieve The Top ... Emails | Provide 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’. |
5 | Retrieve Emails In Reverse Order | Allowed values: 'Yes', 'No'. Provide ‘Yes’ to fetch in reverse order i.e. Old to New. This field is optional. |
6 | Mark As Read | Allowed values: 'Yes', 'No'. Provide ‘Yes’ if fetched mails are to be marked as read. This field is optional. |
7 | Default Character | Limit For Test Extraction Specify the character limit to read the email body. Default value: 1000000 |
Batch: | ||
1 | Fetch in Batches | Allowed 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’. |
2 | Batch Size | This 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. |
3 | Limit | Provide 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. | |
1 | Sender | Provide the mail address to filter mails by Sender. |
2 | Recipient | Provide the mail address to filter mails by Recipient |
3 | Subject | Provide the value to filter mails by Subject. |
4 | Category | Provide the value to filter mails by Category. |
5 | Has Attachments | Provide the value to filter the emails with attachments. Allowed value: ‘True’ or ‘False’. |
6 | Search Text | Provide the value to search the text in either of Body, Sender, or Subject. |
Received date: | ||
7 | Condition | Select 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. |
8 | Date1 | Provide the Date1 (yyyy-MM-dd) for the provided condition. |
9 | Date2 | Provide 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. | |
1 | Field Name | Click 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. |
2 | Output Field Name | Specify an Output Field Name to hold the corresponding value of the Field Name selected above. The data type is String. This field is mandatory. |
3 | Keep HTML Tags in the Body | Select the checkbox if you want the HTML tags to be displayed for the mail body. Note: The checkbox is clear by default. |