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 Apps / How do I attach multip...
Power Apps
Unanswered

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,297 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
    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
    5,015 Super User 2025 Season 2 on at
     
     
    Can you please post what is the exact issue which you are facing with the implementation either flow screenshot or error screenshot
  • Kushal_M Profile Picture
    131 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

Forum hierarchy changes are complete!

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

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard