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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Upload file to SharePo...
Power Automate
Answered

Upload file to SharePoint document folder via form

(0) ShareShare
ReportReport
Posted on by 36

Hi All

I'm (Very) new to Power Automate and whilst I can use a form to attach a file to a SharePoint List and complete all the relevant column fields, I cannot find a way to do this for a SharePoint folder (Documents not list).  Can someone point me in the right direction please?

Categories:
I have the same question (0)
  • Lockjack Profile Picture
    36 on at

    I'm guessing by the lack of responses that this is not possible?

    As a workaround, I'm able to copy the file to a Document folder, but I still cannot find a method to copy the column information (Meta-data), is this possible?

  • S-Venkadesh Profile Picture
    1,214 Moderator on at

    Hi @Lockjack,

    It is possible to upload a file using MS Form and then add it as an attachment to a SharePoint List or upload it to a SharePoint Library.

    Follow the steps below to add file as attachment:

    SVenkadesh_0-1688381230969.png

     

    SVenkadesh_1-1688381298408.png

    Please consider giving it a thumbs up!

    Click "Accept as Solution", if your problem has been resolved.

     

    Regards,

    Venkadesh

  • Lockjack Profile Picture
    36 on at

    thank you for your response. I can upload the file from the form, it is updating the columns which I cannot update.  maybe I'm missing something but I cannot see from your images where the column data would be transferred over to the documents folder e.g. The documents folder has multiple columns all requiring data from the form.  I can do this if I upload to a SharePoint list from the form, but don't seem to be able to do this for a SharePoint Document folder?  hope that made sense thx.

  • S-Venkadesh Profile Picture
    1,214 Moderator on at

    Hi @Lockjack,

    In the sample flow that I explained earlier, the purpose was to add an attachment to an SPList.

    Action: "Get Response Details" is used to fetch the inputs from MSForm.

    Action: "Create Item" is used to create an List Item with required columns

    To provide further assistance, could you please clarify if you want to:

    Add an attachment with metadata to a SharePoint List?
    or

    Upload a file with metadata to a SharePoint Document Library?
    Please let me know so that I can guide you accordingly.

    Regards,

    Venkadesh

  • Lockjack Profile Picture
    36 on at

    Thanks again for your response. Apologies if I haven't made myself clear.  As mentioned I have succesfully managed to get responses from a form to populate all the columns in a Showpad List, and attach the file.  However, for the purpose i need this to work on SharePoint Document folder.  I have all the same column headings as my per my Sharepoint list (and form).  I can attach the file, but can not find no way of populating all the columns.

  • S-Venkadesh Profile Picture
    1,214 Moderator on at

    Hi @Lockjack ,

    you can follow the steps below, If you want to update the metadata of a SharePoint folder, 

    1. Retrieve the unique identifier (ID) of the folder you want to update.

    2. Use the "Update file properties" action. (It works for folder as well)

     

    Regards,

    Venkadesh

     

  • Lockjack Profile Picture
    36 on at

    @S-Venkadesh Thank you so much for your assistance.  I could not work out how to do this via Forms. so decided to try a different approach. in that, I uploaded the attachment to SharePoint list then I created a flow that would be applied when a condition is met. I can copy the file over to the Documents folder with no problem.  But when I add the "update file properties" to flow, I get an error "bad request" - "An action failed. No dependent actions succeeded." and the error occurs in create file section.  Despite this, the file is copied over.  but because of the error, it does not proceed to the update files properties and therefore the columns are not completed.  Attached is my flow. hope you are able to assist me and thanks again for all your assistance.

  • S-Venkadesh Profile Picture
    1,214 Moderator on at

    Hi @Lockjack,

    Based on the screenshot provided, it appears that the flow encountered an error during file creation but you've mentioned like error occurred on "update file properties".

    To assist you further, please provide more details or an additional screenshot related to the specific error encountered. This will help in identifying the issue and providing a more accurate solution or guidance.

    Regards,

    S-Venkadesh

  • Lockjack Profile Picture
    36 on at

    Hi, the error occurred at "Create files" although this works if i don't add the update file properties. not sure what else I can share as the error message is shown on the first slide.

     

    here is the download code if that helps.

    {"statusCode":400,"headers":{"Vary":"Origin","X-NetworkStatistics":"0,525568,0,0,1592,0,48499","X-SharePointHealthScore":"0","X-MS-SPConnector":"1","X-SP-SERVERSTATE":"ReadOnly=0","DATASERVICEVERSION":"3.0","SPClientServiceRequestDuration":"59","SPRequestDuration":"59","X-DataBoundary":"NONE","X-1DSCollectorUrl":"https://mobile.events.data.microsoft.com/OneCollector/1.0/","X-AriaCollectorURL":"https://browser.pipe.aria.microsoft.com/Collector/3.0/","SPRequestGuid":"026e1125-17b7-470f-966f-4a5786b2a72c","request-id":"026e1125-17b7-470f-966f-4a5786b2a72c","MS-CV":"JRFuArcXD0eWb0pXhrKnLA.0","Strict-Transport-Security":"max-age=31536000","X-FRAME-OPTIONS":"SAMEORIGIN","Content-Security-Policy":"frame-ancestors 'self' teams.microsoft.com *.teams.microsoft.com *.skype.com *.teams.microsoft.us local.teams.office.com teams.microsoftonline.cn *.powerapps.com *.yammer.com *.officeapps.live.com *.office.com *.stream.azure-test.net *.microsoftstream.com *.dynamics.com *.microsoft.com onedrive.live.com *.onedrive.live.com securebroker.sharepointonline.com;","MicrosoftSharePointTeamServices":"16.0.0.23821","X-Content-Type-Options":"nosniff","X-MS-InvokeApp":"1; RequireReadOnly","Timing-Allow-Origin":"*","x-ms-apihub-cached-response":"true","x-ms-apihub-obo":"false","Cache-Control":"max-age=0, private","Date":"Tue, 04 Jul 2023 13:40:34 GMT","P3P":"CP=\"ALL IND DSP COR ADM CONo CUR CUSo IVAo IVDo PSA PSD TAI TELo OUR SAMo CNT COM INT NAV ONL PHY PRE PUR UNI\"","X-AspNet-Version":"4.0.30319","X-Powered-By":"ASP.NET","Content-Length":"352","Content-Type":"application/json","Expires":"Mon, 19 Jun 2023 13:40:35 GMT","Last-Modified":"Tue, 04 Jul 2023 13:40:35 GMT"},"body":{"status":400,"message":"A file with the name Shared Documents/General/Showpad Asset Folder/boot rack image.jpg already exists. It was last modified by i:0#.f|membership|gordon_jackson@goodyea on 04 Jul 2023 06:37:11 -0700.\r\nclientRequestId: 026e1125-17b7-470f-966f-4a5786b2a72c\r\nserviceRequestId: 026e1125-17b7-470f-966f-4a5786b2a72c"}}

  • Verified answer
    S-Venkadesh Profile Picture
    1,214 Moderator on at

    Hi @Lockjack

    Try the solution as described in the article -https://sharepointstuff.com/2022/04/20/overwrite-files-using-create-file-action

    Regards,

    S-Venkadesh

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 398 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 331 Super User 2025 Season 2

#3
Expiscornovus Profile Picture

Expiscornovus 203 Most Valuable Professional

Last 30 days Overall leaderboard