Hi, I have a problem using the Microsoft Outlook 365 connection in Integration Service.
According to the docs I should be able to fetch the exact email that triggered a process by passing the UiPathEventObjectId as an in_arg into the process.
The problem is that it passes some Id into the process, but it is always the same ID for each process triggered and it’s not a message-id. The “Get Email by Id” is always throwing an exception.
Does anyone know what could be the reason that the UiPathEventObjectId is not correlating to an actual messageId and is always the same value?
Maybe I was not clear with my question. I have no issue with the activities in Studio, the problem lies in the Integration Service that is apparently not passing the messageId as “UiPathEventObjectId” into my workflow.
In the screenshots you can see that a newly received mail triggered my test-process which should start and read the exact mail that triggered the process.
But the UiPathEventObjectId is always the same value, even though the process was triggered at different times through different received emails.
According to the documentation the messageId should be automatically passed if the process was triggered from the integration service
The value for Email ID can can be retrieved from the MailMessage.Headers("Uid") object or from the UiPathEventObjectId project argument if an Integration Service trigger is used.
When used with the Use Outlook 365 activity, value retrieval from the UiPathEventObjectId argument is not supported on Windows-Legacy projects.
I hadn’t noticed the difference in the IDs, my bad.
I was using the “Use Desktop Outlook App” activity in the implementation and that didn’t work.
Anyway, I got a reply from UiPath support that’s worth sharing here:
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 activity mentioned has Microsoft Graph as the underlying service and can read/write the same values.
Using activities such as “Outlook Desktop” activities will require a different mail Id.