My Question : Need to Upload file to SharePoint (SubFolder present in Documents tab) from local machine.
- I have a sharepoint. As we all know there will be few tabs in sharepoint like Home, Documents, Recycle Bin etc as per our comfort.
- In my SharePoint there is one tab called Documents. Under Documents there are many SubFolders like Input Files, Output Files, Raw Files etc
- Under one of the Sub Folder called Raw Files there are few folders. For eg we can take each folder is named with each Year and inside it again each month has each folder respectively
Sample Folder Path Structure: Documnets/RawFiles/2026/March - I need to upload file in above folder path.
My Solution:
- Used Microsoft Office 365 Scope activity and passed necessart details for authentication like Client ID, Secure Password and Tenant ID.
- Placed Find Files and Folders activity created necessary variables in properties
First - Variable Named as FileName which is of DriveItem argument
Results - Var Name das FileResults which is of Array of DriveItem argument
Drive Name - “Documents”
Site URL - I given Home Page URL of SharePoint - Placed Upload File activity created necessary variables in properties
File to upload : Passed the path of the file present in local machine
Destination Folder : Passed Filename variable - When I ran the bot file is uploading to “Documents/InputFiles/MyFile.xlsx”
I also gave Drive Name as : “Documnets/RawFiles/2026/March” but throwing error saying don’t have access to this folder which I do have
How to upload the file the correct nested folder inside documents folder?
TIA