Microsoft 365 Outlook package

The Microsoft 365 Outlook package enables you to automate Outlook emails over Microsoft Outlook server.

Before you start

Microsoft has deprecated EWS API for Exchange Online and has recommended users to move to Graph API.

See Upcoming API Deprecations in Exchange Web Services for Exchange Online.

The Microsoft 365 Outlook package is based on the Graph API and can be used to automate email-related tasks for sending, receiving, and modifying emails and folders in Microsoft 365 Outlook.
Note: The integration of Graph API requires an administrator to grant access, after which you can configure an application access policy and limit the scope of application permissions. See Configure application access policy.
Note: Limited support is available for Graph API from Microsoft. Therefore. if you are using the Azure US GCC High for Microsoft 365 version, the following actions might be impacted:
  • Forward, Reply and Reply all
  • Send action if you have any attachments
Note: Graph API from Microsoft does not support downloading of attachments from emails that contain digital signatures.

Use this package in the following sequence:

  • Use the Connect action to create a session.
  • Use the various actions to automate tasks related to Microsoft 365 Outlook emails.
  • Use the Disconnect action to terminate the connection to the Microsoft Outlook server.
The Microsoft 365 Outlook package supports the email automation of a shared mailbox in Outlook 365. You can automate emails retrieved from a shared mailbox and perform email-related tasks by accessing each folder(s) and its subfolder(s) in the shared mailbox. Ensure the following requirements are met:
  • Administrator has enabled your access to shared mailbox.
  • The required delegated permissions are granted.
  • The shared mailbox is setup in your Microsoft 365 Outlook application.
Review the following table for important proxy considerations while using the Microsoft 365 Outlook package:
Proxy type Description Status
Authenticated Same proxy settings for Control Room URL and Graph API Endpoints Supported
Different proxy credentials for Control Room URL and Graph API Endpoints Not supported
Bypass authenticated proxy for Control Room URL and authenticated proxy settings for Graph API Endpoints Not supported
Unauthenticated Same settings for Control Room URL and Graph API Endpoints Supported
Different proxy settings for Control Room URL and Graph API Endpoints Supported
Combination of Authenticated and Unauthenticated Authenticated proxy for Control Room URL and unauthenticated proxy settings for Graph API Endpoints Supported
Unauthenticated proxy for Control Room URL and authenticated proxy settings for Graph API Endpoints Not supported
None No Proxy found on the Bot Runner machine Supported
Note: NTLM authentication for proxy server is available that enables you to connect to Exchange online.

Actions in the Microsoft 365 Outlook package

In the Actions palette on the Bot editor screen, double-click or drag any of the following actions in the Microsoft 365 Outlook package:

File stream support in Microsoft 365 Outlook

The Microsoft 365 Outlook package supports file stream capability. The file stream capability enables you to create, manage, and run API Tasks to send emails with an attachment. The Forward, Reply, Reply all, and Send actions support file stream in attachments.

The following is the high level workflow of how file stream capability works in Microsoft 365 Outlook package.:
  1. Use one of the file stream compatible actions to hold the file stream in a file variable. For more information on file stream compatible actions, see File streaming using file variable.
  2. Create a list variable with File subtype.
  3. Use the Add item action in List package to add the file variable that holds the file stream to the list variable.
  4. Use the updated list variable as an attachment in Attachment option in the settings of Forward, Reply, Reply all, and Send actions.
  5. When you run the automation, the automation streams the file from the data source and adds it as an attachment to the email. The automation sends the email only when the upload is complete. If the upload is not complete, the email remains in the Drafts folder of the mailbox. You must manually delete the email from the Drafts folder and re-run the automation.

The following are some of the error messages that you might encounter when you use any file stream capable Microsoft 365 Outlook actions and their root causes:

Unable to find the filename in file stream metadata. Verify the file stream metadata includes filename, then try again.
If the file name is blank or the file size is 0 KB, the system displays this error message.
Attachment exceeds the 25MB size limit. Upload a smaller file, then try again.
If the overall size of the attachment exceeds 150 MB, the system displays this error message.
Unable to find attachment “%s”. Verify the path, then try again
If the attachment is missing in the source location, the system displays this error message.