While I am trying to read all emails using GetOutlookMailMessage > Loop through ForEach > Find emails from specific person > UIPath Studio shows object reference not set to an instance issue. Please help. Attached screenshot.
Hi
Welcome to uipath community
The condition be like this
item.From.Address.ToString.Contains(“keyword”)
Cheers @vchandu
Hi vchandu,
-
Check if ‘item’ datattype is set to messages correctly. On click of for each activity, on right side you will be able to see the datatype of item variable.
-
Make sure, Get Outlook Message activity’s output is set to variable messages.
-
Make sure message variable scope is correctly set.
If above three points are correct, issue will be fixed.
in IF, use: Not item.From Is Nothing And item.From.User.Contains(“emailToFind”)
then, messages does not contain any mails . i.e, either the variable in get Outlook message is wrong or it is null/not instantiated.
Could you check if Get Outlook Mail Message activity is returning any output? if possible post a screenshot of getOutlook Mail message activity configuration
Thank you Palaniyappan, ArunVelaayudhanG, bcorrea for your suggestions.
Issue got resolved, it was problem with donotreply email in my inbox.