Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Adding attachment to approval - Creates "Apply to each"

(0) ShareShare
ReportReport
Posted on by 13

When creating an approval, I wish to attach and attachment which was originally sent via email. Whenever I attempt this, it creates an "apply to each", which I suspect is due to the fact that there could be multiple attachments. There will only ever be one attachment based on the flow I have created. How can I prevent an "Apply to each".

Many thanks

  • HC123 Profile Picture
    13 on at
    Re: Adding attachment to approval - Creates "Apply to each"

    Thank you for your help.

    I am running in to issues with the document when attached to an approval. I've tried the below to try and get the content of the file 

    first(triggerOutputs()?['body/attachments'])

    However, the file attaches visually, and the name is shown correctly, but the file won't open or display, regardless of the file type tested.

    I've also tried swapping the below 'name' swapped for 'attachment_content', and it returns this error.

    HC123_0-1673606160423.png
    Any advise would be greatly appreciated.

     

  • fchopo Profile Picture
    7,968 Super User 2025 Season 1 on at
    Re: Adding attachment to approval - Creates "Apply to each"

    Hi @HC123 

    You could use this expression in a Compose action, for instance. Use the output of the compose action in next steps when you need to access attachment content or attachment name.

    Hope it helps now!

    Ferran

  • HC123 Profile Picture
    13 on at
    Re: Adding attachment to approval - Creates "Apply to each"

    Thanks for the detailed information. Could you please clarify where this expression should go? Is it being set in a variable, or elsewhere?

     

    Thanks again.

  • fchopo Profile Picture
    7,968 Super User 2025 Season 1 on at
    Re: Adding attachment to approval - Creates "Apply to each"

    Hi @HC123 

    In order to avoid the apply to each, you should get the first attachment within the email using the following expression:

    first(triggerOutputs()?['body/attachments'])

    assuming you're using the trigger "when a new email arrives".

    For instance, if you want to access the attachment name you should write the expression:

    first(triggerOutputs()?['body/attachments'])?['name']

    And the same for other properties.

    Hope that helps!

    Ferran

     

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1