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 Automate / Attaching multiple doc...
Power Automate
Answered

Attaching multiple documents dynamically for Approval Flow

(0) ShareShare
ReportReport
Posted on by 1,121

I have a SharePoint list where am starting my approval flow when a new item in created. The requirement is number of attachments for each item submitted can be 1 or more which is not fixed number. How can I tell my flow to send those attachments in my approval email? Its clear in the action for fixed number of attachments. But when the number of attachments is only known during item submission, how can I deal with this?

 

RameshMukka_0-1601199522957.png

 

Categories:
I have the same question (0)
  • efialttes Profile Picture
    14,756 on at

    Hi!

    On the 'Start and wat for an approval' attachments section you can see an icon on the right (capital T surrounded by a square). When you click on it you switch into Input Array mode, meaning you can buid an array whose elements are your file attachnents and assing it as its input.

    Same approach as the one described in this thread

    https://powerusers.microsoft.com/t5/Building-Flows/Creating-array-of-attachments-for-apporval-email/td-p/77328

     

    Hope this helps

  • rameshmukka Profile Picture
    1,121 on at

    @efialttes I exactly did it and somehow the flow is failing at getting the contentbytes. Here is what i have with error

     

    RameshMukka_0-1601209335456.png

     

    My expression for getting attachment content

     

    outputs('Get_attachment_content')?['body'].$content

    Attachment Content Error.PNG

     
     
     

    I have used my AllAttachments Variable in the approval action. Dont know what is going wrong here.

    Attachment Content Error2.PNG

  • Verified answer
    efialttes Profile Picture
    14,756 on at

    Hi again!

    Not sure if base64() will make the difference as explained in this great article

    https://blog.mattweston365.com/2020/03/sending-multiple-attachments.html?m=1

     

    If not succeed, please note I just searched for the error text and found a promising thread in this same forum

    https://powerusers.microsoft.com/t5/General-Power-Automate/Power-Automate-approval-with-Attachments/td-p/415327

     

    Hope this helps

     

     

  • rameshmukka Profile Picture
    1,121 on at

    @efialttes Thank you so much. Replacing ContentBytes with Content has fixed the problem.

     

    RameshMukka_0-1601215559320.png

     

  • rameshmukka Profile Picture
    1,121 on at

    @efialttes @yashag2255 I lately noticed that attachments coming to email are corrupted. Is this something to with base64 conversion?

     

    Once again this is how my array is looking like and my expression

     

    Attachment Content Error3.PNG

    body('Get_attachment_content')['$content']

    Also used this outputs('Get_attachment_content')?['body'].$content. 

     

    What are the differences between both of them? Which one should I be using?

     

    In both cases my attachments are corrupted.

     

    Attachment Content Error4.PNG

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!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 67

#2
David_MA Profile Picture

David_MA 64 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 39 Most Valuable Professional

Last 30 days Overall leaderboard