Skip to main content

Notifications

Community site session details

Community site session details

Session Id : ixIDL4EeLxANvFPfc2NnwH
Power Automate - Building Flows
Answered

Sending the Selected File Metadata from Power Automate to Power App

Like (0) ShareShare
ReportReport
Posted on 26 Jan 2024 14:33:47 by 11

I am setting up an automatic Custom File Properties workflow for DMS purposes. For that I am using the following:

  • Sharepoint - Storing the files
  • Power Automate - To have a flow for end user to trigger adding properties to the selected file
  • Power App - Interface for the end user to fill in the necessary data

 

I need to pass the Selected File's Metadata into my Power App in order to create the Document ID. The logic for the ID is based on the File Path (I can explain that logic if necessary) but there's some string manipulation and such. But I need the raw Metadata string for the File Path. 

 

For the Workflow, I have currently:

1. PowerApp (v2) trigger

2. For the selected file (with correct Site address + Library name)

3. Get file metadata 

4. Respond to a PowerApp or Flow (With the only output being the FilePath based on the dynamic value from step 3)

DocumentingEng_0-1706279115182.png

 

But when I try to save this, I get the following error:

The power flow's logic app flow template was invalid. The 'kind' property of template action 'For_a_selected_item' at line '1' and column '536' is not supported.

 

Any ideas on how to fix this? Or if there is some way to get a selected file's metadata, specifically the File Path, into Power App? I am very new to both Power Automate and Power Apps so please let me know if I'm misunderstanding something super basic. 

  • Verified answer
    DocumentingEng Profile Picture
    11 on 23 Feb 2024 at 08:01:01
    Re: Sending the Selected File Metadata from Power Automate to Power App

    I have figured out what was wrong and how to "fix" it:

     

    1. In order to use Get File Metadata, you need to use the file identifier, not the file ID. This gets solved by using Get File Properties first, then using the File Identifier variable from there inside the Get File Metadata
    2. It is not possible to use For Selected File/Item (or any kind of changing item/file for that matter, anything with a changing occurrence) with a PowerApps trigger. So you need to figure out a work-around for this.
      For anyone interested, I made the first flow to create a Sharepoint List item with necessary info, and then created a hyperlink button for the user to click (with formatting inside Sharepoint column) to get them to the PowerApp, where I call the latest entry into the Sharepoint list based on who the user is to get needed data.
    3. "Fun" fact that I learned as well - it is not possible for you to both call a Power Automate Flow and to have a hyperlink tied to a single button inside the Sharepoint library. At least neither me or a Power BI design team couldn't figure out a way. 
  • DocumentingEng Profile Picture
    11 on 29 Jan 2024 at 10:58:08
    Re: Sending the Selected File Metadata from Power Automate to Power App

    It's inside the For a Selected File, yes, but I am very confused how/if my workflow is possible. This is the code inside the For a selected File:

    DocumentingEng_0-1706525692514.png

     

    The ideal scenario for my flow would be:

    1. User triggers the Workflow in Sharepoint for their file

    2. They get sent to the Power App to fill in properties. This is also where the Folder Path would be generated

    3. After submitting, the input info will be sent back to Power Automate and the properties are added to the File Properties of that selected File

     

    This is what the Power App looks like:

    DocumentingEng_1-1706525852365.png

    I need the File Path to generate the Folder Path code through string manipulation. 

     

    Is this even possible? 

  • schwibach Profile Picture
    Super User 2025 Season 1 on 27 Jan 2024 at 16:52:34
    Re: Sending the Selected File Metadata from Power Automate to Power App

    Check where you are referencing the property "kind".

     

    I suspect it's in 'Get file metadata' and it should be referencing items('For_each')['kind'] or something similar instead.

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - Building Flows

#1
stampcoin Profile Picture

stampcoin 105

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 82 Super User 2025 Season 1

#3
David_MA Profile Picture

David_MA 62 Super User 2025 Season 1

Overall leaderboard
Loading started