Get Email By Id - The resource could not be found - although there is a mail with that id - why?

Hi guys,

sorry for the rather long title.

So I build a robot that receives a messageId and I have to retrieve that mail with that ID.
I put in the “Get Email By Id” activity and select the correct “Connection” and also the correct ID as string.

When I run it I will receive this error:

image

I then tried this:

Put in a “For Each Email” Activity - select the correct “Connection” - Select the correct folder where that mail is (its just this one for testing) - then I log it out and the message Id is the same I put in in the other activity.

So the mail is definetily in this mailbox.

Why is “Get Email By Id” giving me this error, altough the email is clearly in the mailbox?
I also tried to put the Email in the Inbox Folder (instead of a seperate subfolder), but still same error.

@ShadowDom

Is this the activity you are using?

If so did you happen to check if you are retreiving the uid only?

Cheers

Hi thank you very much for the reply.

No it’s this one: Aktivitäten – Get Email By Id (uipath.com)

What do you mean by if I’m retrieving the uid only? Thx

@ShadowDom

What is the id you are using?

cheers

It is CurrentEmail.MessageId so it’s the MessageId property.

image

And thats indeed what I got in the activity I fetch the mail, i can see it in the debug window - it is infact the correct ID and it should find it, but it doesnt:

“The resource could not be found”

It seems to me that the library is a bit buggy in that regard. We had troubles with the library in the past with other things, that got fixed with updates. Maybe I will open a support ticket.

@ShadowDom

Just to check xan you tey with this id

CurrentEmail.Headers("Uid").ToString

Check header key once if either all caps or so if this does kot show…also you can check the headers keys

Cheers