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 / For a selected item tr...
Power Automate
Answered

For a selected item trigger with input file - manual syntax overridden when flow runs

(1) ShareShare
ReportReport
Posted on by 11
I've run into an issue using the "For a selected item" SharePoint trigger action. My trigger is setup with a file user input where the user is prompted to include a file when triggering the Flow from a SharePoint list. I then need to attach this file to a "Start and wait for an approval" action.  When I setup the attachment for the approval action, I provide the attachment name and content using dynamic values from the "For a selected item" trigger. Initially, the syntax is triggerBody()['file']['name'], however, after I save and when the flow runs it changes to triggerBody()['entity']['file']['name']; it is changing and adding ['entity'] which is causing it to fail.
 
When I look at the raw outputs from the "For a selected item" trigger, the value I need ,"name", is under file, not entity. I'm not sure why when it runs it changes to include ['entity']. I have tried selecting the value as dynamic content and manually typed the correct syntax in the function box, but no matter what I try it changes to include ['entity'] beyond my control.
 
Is there a way to hard code and retain syntax? Am I missing something?
 
 
 
 
 
 
 
 
Categories:
I have the same question (0)
  • creativeopinion Profile Picture
    10,508 Moderator on at
    It doesn't seem like the input file dynamic content is available to select from when using the For a Selected Item trigger. However, it is available when using the Manual Trigger.
     
    For the content, could you try using the following expression?
    triggerBody()['file']['contentBytes']
     
    If that doesn't work—try toggling off the new designer. It's still a big buggy.

    Hope this helps!

    Consider giving me a ❤️ if you liked my response!

    👉 Level up your Power Automate skills by checking out my tutorials on YouTube
    👉 Tips and Tricks on TikTok and Instagram
     
  • Verified answer
    RPSluxsaga Profile Picture
    11 on at
    Thanks for the suggestion! It pointed me in the right direction and I was able to get it working again. Here's what I did:
     
    This flow was several years old and worked flawlessly. I suspect one of the causes of my issues began after editing the flow in the new designer after it was originally created in the old designer. It seems the old designer tries to "help out" less and allow for custom typed formulas to stay as is.
     
    These were my steps to a working solution:
    • Open flow, switch new designer OFF; save
    • Now in old designer, deleted trigger action; re-added same trigger action and setup needed inputs
    • Added a compose action for input file name and another compose action for input file contents
    • Downstream in the flow I now reference the output from the compose actions where needed
     

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 March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 592

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard