Get Outlook Mail Message throwing error when Message Recall Success or Failure email is present in the Inbox

Hi Everyone

I have create Get Outlook Message to get emails form my Inbox. It is picking all emails perfectly. But whenever a notification email that confirms whether sent message was recalled successfully or not, is present it fails and throws below error. Also as I am trying to get email subject using for each loop. It do it perfectly till the time it encounter such email, after that it stops. Below is the extract from logs. Please check and suggest how to handle such notification emails thru this activity.

10/01/2021 06:51:50 => [Debug] Object reference not set to an instance of an object.
10/01/2021 06:51:50 => [Debug] System.NullReferenceException: Object reference not set to an instance of an object.
at lambda_method(Closure , ActivityContext )
at Microsoft.VisualBasic.Activities.VisualBasicValue1.Execute(CodeActivityContext context) at System.Activities.CodeActivity1.InternalExecuteInResolutionContext(CodeActivityContext context)
at System.Activities.Runtime.ActivityExecutor.ExecuteInResolutionContext[T](ActivityInstance parentInstance, Activity1 expressionActivity) at System.Activities.InArgument1.TryPopulateValue(LocationEnvironment targetEnvironment, ActivityInstance activityInstance, ActivityExecutor executor)
at System.Activities.RuntimeArgument.TryPopulateValue(LocationEnvironment targetEnvironment, ActivityInstance targetActivityInstance, ActivityExecutor executor, Object argumentValueOverride, Location resultLocation, Boolean skipFastPath)
at System.Activities.ActivityInstance.InternalTryPopulateArgumentValueOrScheduleExpression(RuntimeArgument argument, Int32 nextArgumentIndex, ActivityExecutor executor, IDictionary2 argumentValueOverrides, Location resultLocation, Boolean isDynamicUpdate) at System.Activities.ActivityInstance.ResolveArguments(ActivityExecutor executor, IDictionary2 argumentValueOverrides, Location resultLocation, Int32 startIndex)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
10/01/2021 06:51:50 => [Error] Log Message: Object reference not set to an instance of an object.
10/01/2021 06:51:50 => [Error] Invoke FetchOutlookEmails workflow: Object reference not set to an instance of an object.
10/01/2021 06:51:50 => [Debug] System exception at initialization: Object reference not set to an instance of an object. at Source: Invoke FetchOutlookEmails workflow: Log Message

Thanks for your time and help.
Regards

Hi

Welcome to uipath forum

May I know with which activity this error I coming
Try to run in debug mode to identify that

ans did we try to include few more conditions with IF activity inside FOR EACH activity along with the one you have for filtering Subjects

Cheers @AnkitJain

Cheers @AnkitJain