Office 365: Move Email
Description
This step moves an email to a different folder in a Microsoft 365 mailbox. You provide the message ID and the destination folder. Use this step in workflows that organize emails after processing, move handled messages to archive folders, or sort incoming mail into category folders.
Permission:
-
Following permissions are required to move email in Office365:
Permission type Permission (from least to most privileged) Delegated Mail.Read, offline_access -
To access a shared mailbox, verify the following configurations are complete:
- Provide admin consent for the corresponding delegated *.Shared Microsoft Graph permissions
Mailbox permission on the shared mailbox Delegated Graph permission (app registration) Full Access Mail.ReadWrite.Shared
- Provide admin consent for the corresponding delegated *.Shared Microsoft Graph permissions
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 | Shared Mailbox Email | Specify a shared mailbox address to move email to the destination folder within same shared mailbox. Leave the field blank to move email to the authenticated account mailbox. Note: The authenticated account must have access permissions for the shared mailbox, else the step fails and returns a Microsoft Graph permission error. The field accepts static or environment variable values. |
| 2 | Message Id | Specify the message Id of the email which is to be moved. The data type is string. This field is mandatory. Note: Message Id can be fetched using Office 365: Email Message Input plugin step |
| 3 | Destination Folder | Select the destination folder where emails are to be moved. Provide the destination folder path, such as folder1/folder2/folder3…folder n.The data type is string. This field is mandatory. Note: The Move Email plugin step may not work for the Destination Folder having special characters in the folder name. |
| 4 | Button: Get | Click this button to display a windows pop-up with a list of the folders. 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. |
| 5 | Create Folder (if not exist) | Select the checkbox if you want to create the destination folder in the provided path, if the folder does not already exist. Note: Forward slash (/) and backward slash () is not allowed in the folder name. |