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 / Approval Flow - How to...
Power Automate
Answered

Approval Flow - How to make attachments optional

(1) ShareShare
ReportReport
Posted on by 44

Hello! In an approval workflow, I need for the approver to be able to approve one to four files at the same time (main file, with possible additional supporting documents).

 

When I configure the Approver Process, I have put in the Attachment 2 field the parameters that I have captured in the manual input for the possible second file that can be attached.

 

cebolamonica_0-1604754076778.png

 

However, if in the manual input the user does not designate a second file, then the approval flow errs out. 

 

cebolamonica_1-1604754268302.png

 

Is there a way to make the second (and third, and fourth) attachments optional, so does it doesn't err out?

 

Thank you so much!

 

Categories:
  • Verified answer
    Pstork1 Profile Picture
    69,665 Most Valuable Professional on at

    If you build the Attachments as a JSON Array and then attach them as an array you won't need to specify the exact number of attachments.  You can switch to the array input using the button in the upper right hand corner of the attachment section of the approval dialog.  Take a look at the solution in this post for how to add attachments to an array.

    https://powerusers.microsoft.com/t5/Building-Flows/Creating-array-of-attachments-for-apporval-email/td-p/77328#:~:text=%20Re%3A%20Creating%20array%20of%20attachments%20for%20apporval,choose%20the%20Item%20ID%20from%20the...%20More%20 

  • tom_riha Profile Picture
    10,187 Most Valuable Professional on at

    Hello @cebolamonica ,

    you have to store the attachments and their content into an array variable and then use that variable in the task action.

    To get all the attachments and append them into the variable use the code below, it's the format the 'Approval task' action expects. Just replace the <...> parts with your dynamic content. 

     

     

    {
     "Name": <DisplayName>,
     "content": <Attachment Content>
    }

     

     

    image.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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 414

#2
11manish Profile Picture

11manish 331 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 274

Last 30 days Overall leaderboard