web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : gS3QgOIcowPDCoBuoo9dBJ
Power Automate - Power Automate Desktop
Answered

Upload documents from local download folder directory into SharePoint Library

Like (0) ShareShare
ReportReport
Posted on 31 Aug 2023 08:42:07 by 93

Hello All, 

 

I'm currently engaged in an automation project and could use your assistance. Let me outline the situation below.

 

I've successfully employed web automation to download documents from external sources. Now, my focus is on the subsequent step: uploading these downloaded documents to a SharePoint Library. The process of obtaining documents from external sites is functioning smoothly.

 

My intention is to trigger a subflow once a document has been downloaded and stored in the designated folder. This subflow will then manage the task of transferring all the downloaded documents into the SharePoint Library.

Furthermore, I'm keen to explore the feasibility of categorizing these documents within the SharePoint document library based on their respective document categories. Is such a categorization process achievable?

  • Verified answer
    Agnius Bartninkas Profile Picture
    Most Valuable Professional on 01 Sep 2023 at 10:49:07
    Re: Upload documents from local download folder directory into SharePoint Library

    You would need to use Get files in folder to get the relevant files, then use a For each loop to iterate through the list of files and use the steps I suggested earlier inside the loop.

    -------------------------------------------------------------------------

    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

     

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

  • AsheerHasan Profile Picture
    93 on 01 Sep 2023 at 07:07:58
    Re: Upload documents from local download folder directory into SharePoint Library

    Hello Agnius,

     

    I have tried the first approach and seems it's working fine for one file. Only thing I need to highlight it here is that I am downloading the documents every week from weekly email alerts and in the email we have multiple documents with different file formats. 

     

    In this case, how I can upload all the documents in SharePoint library using covert file to binary data and create file action. ( Please be noted that I am having PVA license.)

  • AsheerHasan Profile Picture
    93 on 01 Sep 2023 at 06:35:03
    Re: Upload documents from local download folder directory into SharePoint Library

    Thanks a lot for providing a very quick solution. I will give a try and update you, please. 

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on 31 Aug 2023 at 14:27:34
    Re: Upload documents from local download folder directory into SharePoint Library

    If you have a Premium license, you can use the SharePoint actions. Specifically, the Create file action under the SharePoint actions group will create a file. To use that, you must first use Convert file to binary data to have the file contents as binary data, and use that in the Create file action.

     

    See here for more reference on how to do that: https://learn.microsoft.com/en-us/power-automate/desktop-flows/actions-reference/sharepoint#how-to-upload-a-local-file-to-sharepoint

     

    If you do not have a Premium license, the easiest way to do this would be downloading the OneDrive desktop app and synchronizing the SharePoint library to your local machine. This way you will end up with a folder in your local system that is directly synced to the SharePoint library. You will be able to use Move file(s) or Copy file(s) actions to move or copy the files like you would if the target directory was a local folder. The OneDrive app will take care of the sync.

     

    As to your other question regarding classification of documents - can you please provide more context as to what you want to achieve? You want to have your flow read the file contents and then assign a category based on the contents? That's cognitive/AI functionality here. You will need external (paid) services to do that. AI builder is an option, but that requires a Premium license and can only be used via cloud flows. Also, depending on the number of documents processed monthly, it might require that you buy a capacity increase, which comes at a steep price of $500/month.

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

  • Srini007 Profile Picture
    3,234 Super User 2025 Season 2 on 31 Aug 2023 at 12:47:52
    Re: Upload documents from local download folder directory into SharePoint Library

    Hi @AsheerHasan 

     

    So, you can build a child flow in that you can have the a Argument as the Path of the file which was downloaded

    Now to upload the file to Sharepoint

     

    Using API call to the Sharepoint

    Documentation : https://learn.microsoft.com/en-us/sharepoint/dev/sp-add-ins/upload-a-file-by-using-the-rest-api-and-jquery

     

    If you find this reply helpful, please consider giving it a LIKE AND

    If this reply answers your question or solves your issue, please ACCEPT AS SOLUTION

     

    Thanks,

    Srini

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 986 Moderator

#2
stampcoin Profile Picture

stampcoin 699 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 577 Super User 2025 Season 2