cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Upload file to sharepoint document library subfolder

sdoscher
New Contributor III

I have a pipeline that uses the SharePoint Online - Upload File snap and it works fine. It uploads the file to a Document Library, โ€œReportsโ€ in this case. I have subfolders in that document library and want to be able to upload the file to one of the SUBFOLDERs in that same library instead. Any ideas on how I can configure the snap to do that?

image

4 REPLIES 4

SpiroTaleski
Valued Contributor

@sdoscher

I guess you should add the absolute path of the directory where the file needs to be created(in the Target path field).

BR,
Spiro Taleski

Thank you @Spiro_Taleski. Conceptually, I understand that, however, I am struggling with the syntax. Any insight you can offer on the below?

This works (but only in top level of doc library):
โ€˜Mx_Manual_Ltrs_โ€™ + Date.now().toLocaleDateTimeString({ timeZone: โ€œESTโ€, format: โ€œyyyy-MM-ddโ€ }) + โ€˜.xlsxโ€™

This is what I tried for the absolute path to put the file in a subdirectory of the same library.
This does not work.

โ€˜https://mln.sharepoint.com/:f:/r/sites/MxLettersTeamPeerReview/Shared%20Documents/Reportsโ€™+'Mx_Manua...โ€™ + Date.now().toLocaleDateTimeString({ timeZone: โ€œESTโ€, format: โ€œyyyy-MM-ddโ€ }) + โ€˜.xlsxโ€™

The error I get is:
Either source/target drive (%s) is not found in the tenant
Resolution:
verify if the drive name exists in the tenant.
Reason:
The drive name you have entered might not be available in the tenant.

SpiroTaleski
Valued Contributor

@sdoscher

Did you try to disable the expression button for โ€œTarget pathโ€?

If disabled, it should suggest the document library/libraries within the RxLettersTeamPeerReview Site.

Then from there, probably you can see/construct the exact path.

BR,
Spiro Taleski

sdoscher
New Contributor III

@Spiro_Taleski Thank you. Ironically, I just got help from a co worker who showed me the syntax. Basically, I did not need to put the entire path of the site. The correct syntax ended up being:

โ€œ/Reports/โ€+โ€˜Mx_Manual_Ltrs_โ€™ + Date.now().toLocaleDateTimeString({ timeZone: โ€œESTโ€, format: โ€œyyyy-MM-ddโ€ }) + โ€˜.xlsxโ€™

Where โ€œReportsโ€ is the sub dir (under the Doc Library โ€œDocumentsโ€) that I put the file.

Thank you again, so much, for being willing to help.