How to use UiPathEventObjectId with Microsoft Outlook 365 integration?
The UiPathEventObjectId can be different depending on what Integration Services are used.
When using the Microsoft Outlook 365 connector for the integration, the value returned by UiPathEventObjectId
can only be used with the "Get Mail" activity from the Office 365 package.
This is because both the integration service connector and the Office 365 activities are using Microsoft Graph
as the underlying service and can read/write the same values.
Using activities such as "Outlook Desktop" or "Get Exchange Mail Messages" activities will require a
different mail Id.
Below is an example on how to use the UiPathEventObjectId with Microsoft Outlook 365 integration
Note that it might take a few minutes before the process is triggered.
When using the Microsoft Outlook 365 connector for the integration, the value returned by UiPathEventObjectId
can only be used with the "Get Mail" activity from the Office 365 package.
This is because both the integration service connector and the Office 365 activities are using Microsoft Graph
as the underlying service and can read/write the same values.
Using activities such as "Outlook Desktop" or "Get Exchange Mail Messages" activities will require a
different mail Id.
Below is an example on how to use the UiPathEventObjectId with Microsoft Outlook 365 integration
- Create the connection:
- Go to https://cloud.uipath.com and log-in with your UiPath account
- Select "Integration Services" from the left side panel
- Search for "Microsoft Outlook 365" and select it
- Click "Add connection" and log-in with your Microsoft Office 365 account
- If the connection is successful, see the below:
- Build the process
- Create a new process and define the following input arguments of type String: "UiPathEventObjectId"
- Configure the Microsoft Office 365 Scope and the activities you want to use. (In this example we will use "Get Mail" and log the subject)
- For "Get mail", use the "UiPathEventObjectId" argument as an input for the "Email ID" property
- Publish the process to Orchestrator and add it to the same folder as the Machine and User that will be used
For more information on how to use the integration service trigger arguments check Using Triggers in the Integration Service.
- Create the trigger
- Go back to https://cloud.uipath.com -> "Integration Services"
- Select "Triggers" and "Add Trigger"
- Select the connector, connection, event, the process to execute and runtime license and click "Add trigger" (reference screenshots below). In this example we will use the event "New email received"
- Each time an e-mail must be received now, the process will use the UiPathEventObjectId to identify the mail and retrieve its subject.
Note that it might take a few minutes before the process is triggered.
- Once the process is started, you can see the attempt in Integration Services -> Triggers -> Select the trigger -> Attempt's history
- Once the job is completed, you can check the logs to validate the results: