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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How do I attach multip...
Power Apps
Answered

How do I attach multiple files to a SharePoint list item using PowerApps and Power Automate

(0) ShareShare
ReportReport
Posted on by 72

I am using a PowerApps app to create a new item in a SharePoint list with attachments, using a Power Automate flow. I can do that successfully by assigning the following to the "Create new item" button:

 

'FlowName.Run(Label1.Text,{contentBytes:First(DataCardValue6.Attachments).Value, name: First(DataCardValue6.Attachments).Name}) 

 

Where DatacardValue6 is the attachment control storing my attachments. Obviously, with "First" in the formula, the flow only uploads the first attachment in the box. What should I change in my formula for all the attachments in the box to be uploaded to the list?

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Salv 

    I would suggest that you redo your PowerAutomate flow to allow for an array of files to be passed to it rather than just one.  This would allow your formula to become:

    'FlowName.Run(Label1.Text, DataCardValue6.Attachments) 

    It would be highly efficient as your flow would only be called once and all the data it needs is passed to it.

     

    Otherwise, you can change your formula to include a ForAll function used in a backward way (this is the ONLY time you should use a ForAll backward like this!)

    Ex.

    ForAll(DataCardValue6.Attachments,
     'FlowName.Run(Label1.Text,{contentBytes:Value, name: Name})
    ) 

     

    I hope this is helpful for you.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi, I tried using the ForAll function but it created multiple sharepoint list items based on the number of attachments submitted. Is there any other way to update all attachments to one sharepoint list item using powerappv2?

  • CU17120559-0 Profile Picture
    2 on at
    I have the am issue tried multiple approch but it is not working as expected
    Can someone help us on this
  • MS.Ragavendar Profile Picture
    7,162 Super User 2026 Season 1 on at
     
     
    Can you please post what is the exact issue which you are facing with the implementation either flow screenshot or error screenshot
  • Verified answer
    Kushal_M Profile Picture
    195 Super User 2026 Season 1 on at
    Hello 
     
    Hope you are using the Forall like below in PowerApps
     
    ForAll(DataCardValue6.Attachments,
     'FlowName.Run(Label1.Text,{contentBytes:Value, name: Name})
     
    And in Powerautomate - the input type is File Type and using Add attachments to the list item ID that was created. This will not create new items.
     
     
    If you don’t need Power Automate, Let SharePoint handle attachments natively by Just submit the form: SubmitForm(EditForm1)
    Power Apps uploads all attachments automatically without any flow.
     
    🏷️ Please tag me @Kushal_M, if you still have any queries related to the solution or issue persists.
    ❤️ Please consider giving it a Like, If the approach was useful in other ways.
     Please click Accept as solution if my post helped you solve your issue and help others who will face the similar issue in future.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 839

#2
Valantis Profile Picture

Valantis 533

#3
Haque Profile Picture

Haque 412

Last 30 days Overall leaderboard