Get Outlook mail messages - Object reference error

I am having trouble with a “Get Outlook Mail Messages” sequence. This was running fine last night but now I cannot identify what has broken. The application will mark my emails as read, then fails. It does not save the files to my folder.

Any suggestions would be greatly appreciated.

Error: For Each: Object reference not set to an instance of an object.


Place a IF condition before For Each

If there is no mails then It will return null

So place a if condition as below

Hope this helps you


Well… After creating the support request I found the solution to my own issue… I was missing an object in my Get Outlook Application activity…

Kindly share a screenshot of the same. I have been stuck here for hours

Your activity isn’t getting any emails so there is nothing to loop through.

I am getting email as it is going inside the for loop and count is also 30 as I am taking top 30 emails. but still when it tries to check mail.subject or mail.From it says Object reference error.

Still stuck in the same use case.

Do you have your For Each TypeArgument set to

Yes I have. Please see the screenshot below