Outlook 365 connection UiPathEventObjectId <> MessageId

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?

Kind regards
Thomas

If you want to fetch the message id from O365 mails use the internetMessageId property. You will find it in the email headers.

I don’t want to fetch the message Id from an email, I wanna fetch this specific mail (via the message id) which triggered the process over the integration service.

Then use internetMessageId eq '<messageId>' in the Query property of the GetMail activity

image

example:

image

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

Blockquote Notes:

  • 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 see what you mean now. but

  • I’m confused, the UiPathEventObjectIds on your screenshots are indeed different.

  • Also, can you share a screenshot of your implementation to get additional context? maybe also a code sample if possible

image

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:

Blockquote
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.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.