Upload file - BC30311: Value O365RemoteItem cannot be converted to DriveItem

I have given the output of create folder as the input of Upload file. But it is throwing error
“BC30311: Value O365RemoteItem cannot be converted to DriveItem.”
How can we fix it? Or Is there a method to convert O365RemoteItem to DriveItem.?

Hi @ArjunKrishna

Try this:
=> Let the output variable of Create Folder be Folder.

=> Use the below syntax in Upload File in File to upload



The error is sound, DriveItem is from the Microsoft Graph API library and the O365RemoteItem is from UiPath.

What activities are you using as I am surprised you are getting a DriveItem variable and not a UiPath one.
Please be more specific than ‘Upload File’

I have used Create folder and Upload file from UiPath.Microsoftoffice365.activities.

It didn’t worked.

Hi @ArjunKrishna

Did you use the Create Folder classic activity only. Because the output datatype is DriveItem.



Please try it on your side and let me know if it worked.

First use Get file or Folder activity and use its output in the Upload File activity