SharePoint - Upload file: The object specified does not belong to a list

I’m trying to upload a file to a SharePoint folder. The activity is working and the file is successfully being uploaded but as soon as the activity finishes I get the error in the title.

Has anyone encountered this before? I’ve never had an activity work correctly and then throw an error. I’ve also googled the error but I’ve not found any explanations or solutions that are relevant to my case.
Here’s my code:

Any help is greatly appreciated :slightly_smiling_face:

@radu_bucur Hi Radu, Could you please advise? Thanks!

Hey Max, are you sure you are trying to upload the txt file in a library? It seems you are using a list and Sharepoint by design does not allow you to upload files to lists. So try to use a library instead or add this item as an attachment to an existing list item.

Best of luck!

@Max.Randle did you resolve this issue? I am trying to upload an xlsx file to a SharePoint Document Library and I face the same issue

One reason for that error message could also be the specification of the “Sharepoint Application Scope” URL - its important to set it to a specific site, e.g.:

Afterwards use the item URL of the “upload” activity to specify the target directory (and name) - the path has to be relative to the “Application Scope” URL, e.g.:

  • /Project/Documents/10_ProjMgmt/Temp/test2.csv

IMPORTANT: If you would use these URLs instead - you are getting the error mentioned above!

1 Like

Old topic–but in case anyone else runs into this, I was getting the “does not belong to a list” error because I had "" (backslash) characters in my Item URL instead of “/” (forward slash). File uploaded okay, but threw the error.

I’m getting the same error. I’m trying to upload an xlsx file, the files get uploaded but throws this error

did you resolve the issue?