Bot is not able to pick up the file from Outlook

Hi All,

{“Code”:“Robot”,“Title”:“Failed due to a System Exception”,“Detail”:“System.Activities.Statements.WorkflowTerminatedException: Failed due to a System Exception\r\n —> System.SystemException: Couldn’t Get Exchange Unread IDs From Folder ‘MAP\Input’ even after retrying this expected exception: The request failed. The remote server returned an error: (401) Unauthorized.\r\n at System.Activities.Statements.Throw.Execute(CodeActivityContext context)\r\n at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)\r\n at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)\r\n— End of stack trace from previous location —\r\n at UiPath.Executor.Core.Runners.BaseRunner.EndExecute(IAsyncResult result) in D:\a\1\s\Robot\UiPath.Executor.Core\Runners\BaseRunner.cs:line 56\r\n at UiPath.Executor.Core.Runners.WorkflowInProcessRunner.EndExecute(IAsyncResult result) in D:\a\1\s\Robot\UiPath.Executor.Core\Runners\WorkflowInProcessRunner.cs:line 121\r\n at UiPath.Core.Activities.ExecutorInvokeActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)\r\n at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)\r\n — End of inner exception stack trace —\r\n at System.Activities.Statements.Throw.Execute(CodeActivityContext context)\r\n at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)\r\n at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)\r\n— End of stack trace from previous location —\r\n at UiPath.Executor.Core.Runners.BaseRunner.EndExecute(IAsyncResult result) in D:\a\1\s\Robot\UiPath.Executor.Core\Runners\BaseRunner.cs:line 56\r\n at UiPath.Executor.Core.Runners.WorkflowInProcessRunner.EndExecute(IAsyncResult result) in D:\a\1\s\Robot\UiPath.Executor.Core\Runners\WorkflowInProcessRunner.cs:line 121\r\n at UiPath.Core.Activities.ExecutorInvokeActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)\r\n at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)”,“Category”:null,“Status”:null}

@Pavan_Mamadapur

Please check if the following setting is enabled in outlook

• Open Outlook
• Go to File → Account Settings → Account Settings
• Select your email account → click Change
• Under Offline Settings, move the slider to All

Also in your code ,In ‘Save attachments Activity’ Please ensure the attachment folder path exists or not , if required handle duplicate filenames by adding timestamp at the end.