web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Calling Flow from Powe...
Power Apps
Unanswered

Calling Flow from Power apps

(0) ShareShare
ReportReport
Posted on by 213

I have an existing flow that has a trigger `` For a selected file``(SharePoint). Basically, I run the flow by selecting a file from the SharePoint site and then select the proper flow that appears under the power automate tab and run it directly there.
My question is that How to call such a flow from power apps instead of SharePoint?


Categories:
I have the same question (0)
  • v-xiaochen-msft Profile Picture
    on at

    Hi @Serbay ,

     

    Could you tell me:

    Do you want to trigger the flow and execute it when you press a button control in the canvas?

     

    If so , you could try to use instant flow.

     

    I did a test for you:

    1\ Add an instant flow and save it.

    v-xiaochen-msft_0-1611298612722.png

    v-xiaochen-msft_1-1611298695473.png

     

    2\ Create a canvas app and add a button control.

    Select this button and click 'Action' -> 'Power Automate'. Then add the flow.

    v-xiaochen-msft_2-1611298860724.png

     

    Set the onselect property of the button control to:

    TEST18.Run()

     

    3\ Click F5 and click the button control to trigger the flow

     

    4\ The result is as follows:

    v-xiaochen-msft_3-1611298987758.png

    v-xiaochen-msft_4-1611299026112.png

    Best Regards,
    Wearsky
    If my post helps, then please consider Accept it as the solution to help others. Thanks.

     

  • Serbay Profile Picture
    213 on at

    Hi. thank you for your answer. But I already have an instant flow that triggers by a selecting file from SharePoint. To run this flow through power apps, I need to attach/insert file by selection into power apps then once I click the button, I should be able to get the file and properties then.
    As an example;

    Serbay_0-1611304700735.png

     

  • v-xiaochen-msft Profile Picture
    on at

    Hi @Serbay ,

     

    I do not quite understand you.

     

    If you want to use canvas to trigger an instant flow, you should choose powerapps trigger instead of for a selected file trigger.

    Then you could not add for a selected file trigger after powerapps trigger.

    174.PNG

     

    If I understand it wrong, please show me the right direction.

     

    Best Regards,
    Wearsky
    If my post helps, then please consider Accept it as the solution to help others. Thanks.

  • Serbay Profile Picture
    213 on at

    Yes That's the problem actually, Once we run flow through the apps, we can not use the "For a selected file" trigger. So trigger has to be "Power Apps".
    There needs to be such a way that, the flow should run depending on the selected or inserted file inside power apps. 
    For example; step1 -  insert the file or write the path of the file into the text input
                         step2 - Then Run the flow from the button 
     The issue is how to run this flow for the inserted file?
    Another Example to point the issue:  
    Let's assume we want to execute Script for a selected file through the power apps.
    or let's say we want to add worksheet into an excel file through the apps for selected/specific file that has been defined from apps.
    I hope you understand the issue now 🙂 

  • Verified answer
    v-xiaochen-msft Profile Picture
    on at

    Hi @Serbay ,

     

    Sorry for the late reply.

    According to your description, I think your needs can be met .

     

    1. Firstly, you could create a gallery control and you could display these files in the control.
    2. Secondly, Create an instant flow with get file properties action .(The Id of the action is passed from canvas)
    3. Lastly, when the user selects a file in the gallery control, the Id parameter of the file is passed to the run() function of the button control, and finally pass to the the flow.

    I did a test for you:

    1\ Build my instant flow

    v-xiaochen-msft_0-1611887701219.png

    Id : Ask in powerapps

     

    2\ Add a gallery control and set its Items property to:

    AABBCCDDEE

    3\ Add a button control ,connect to the flow and set its onselect property to:

    'PowerApp->Getfileproperties,Initializevariable'.Run(Gallery1.Selected.ID)
    
    // Gallery1 is the name of my gallery control .'PowerApp->Getfileproperties,Initializevariable' is the name of my flow

     

    4/ The result is as follows:

    Choose a file and click on the button to run the flow.

    182.PNG

     

    Successfully execute flow and get the file name property .

    183.PNG

     

    Best Regards,
    Wearsky
    If my post helps, then please consider Accept it as the solution to help others. Thanks.

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard