Using upload file activity O365

I’m unable to upload .txt and .png files. The same activity works well for .xlsx, zip and pdf.
If anyone could assist, it would be a great help.
Thank you!

May i know what issue you are facing while uploading that type of documents

This is the error

System.AggregateException: One or more errors occurred. —> System.Threading.Tasks.TaskCanceledException: A task was canceled.
— End of inner exception stack trace —
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification) at System.Threading.Tasks.Task1.get_Result()
at UiPath.Shared.Activities.AsyncTaskCodeActivityImplementation.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at UiPath.Shared.Activities.AsyncTaskCodeActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at UiPath.MicrosoftOffice365.Activities.Office365ClientActivity`2.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

@Madiha_Mariam Please share your workflow if possible.


Hi @Madiha_Mariam ,

Nothing looks wrong. Can you try with putting complete file path. Also could you share the properties of Find Files and Folder Activity?


Tried with complete path as well, not working!

We faced the same issue on our end getting this error (Upload File: One or more errors occurred. (A task was canceled.))
However after using another file we noticed that sharepoint doesnt allow you to upload empty txt files.
Try putting any form of data in and then retry

1 Like