Uploading file to Sharepoint

Hi all

I’m trying to upload a file to Sharepoint but I’m getting this error:


This is my process and the Properties on the Microsoft Office 365 Scope (I’ve removed my username and part of the attachmentName variable but they are complete)

And these are the Properties for the Find Files And Folders activity:

Can someone please advise what I’m missing?

Thanks :slight_smile:


You need to provide the drive name and Site url

Drive name is the document library name you see in the sharepoint, URL is your sp url

url - https://www.sharepoint.com/sites/sitename

and also if the Upload tests is inside any folder please provide the relative path to it in subfolder

Relative path should start after drive name and go till end
say when you open upload test folder in ui

you see Documents → folder1 → folder2 → Upload Tests

then relative path is Folder1/Folder2


1 Like

Ahh thanks, so does the URL go into Site URL and the relative path goes into Subfolder? Or does it all go into the Site URL part?

Thanks :slight_smile:


Url goes into site url…and sub folder will take the relative path…and drive name will be ypur document library name, which you can get from site contents or from admin…

Generally they are documents or shared documents …but can be different as well if multiple libraries are present


Hey @Anil_G :slight_smile:

So like this?

Then I’m not sure what you mean by document library name sorry? Is it somewhere in what I’ve uploaded above?



Above sharepoint url …there is drive name right…that drive name needs to be filled…

When you open your sharepoint manually the left side panel will show which document library you are on


Documente is the drive name or the document library name from the image

Hope this helps



Find Files and Folders activity is used to find the file in a given list. I hope that activity is not required for uploading the file.

in the upload file activity, “File to upload” attribute should be the local path of the file on your machine.
if your folder structure in sharepoint is Documents → Folder1 → Folder2 → Upload Tests
Destination folder → Shared Documents/Folder1/Folder2/Upload Tests



Just to correct…find files is still needed as for folder upload file needs a drive item….

And the relative path would not contain drive name …it is a separate field


Thanks for correction @Anil_G :slightly_smiling_face:

1 Like