How do you use For Each to iterate MS365 Office365Messages[] array

This is my first time using MS365 Scope activities.

After defining the GetMail activity and using an array variable to return the Result, I use a For Each activity to loop through each email in the array. However, I keep getting late binding error messages when trying to select email values like Body, From, etc… from the item.

I’m using item.ToString but how can I use item.Body.ToString?


(https://Code so Far)

Hi,

Can you try to set UiPath.MicrosoftOffice365.Models.Office365Message at TypeArgument of ForEach, as the following?

Regards,

This worked. But, how do you download attachments from the M365 email message. There’s no activity that does this.

Hi,

We can use SaveAttachments activity under AppIntegration-Mail, as the following.

Regards,

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