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 / What's the easiest way...
Power Apps
Unanswered

What's the easiest way to trigger a flow from a button (model driven app)?

(0) ShareShare
ReportReport
Posted on by 121

Hello. I find difficult to trigger a powerautomate flow from a basic button (command bar) in a data model driven power app (I know it's easier in a canvas app). Do someone know what's the best and easiest way, and without installing the Ribbon Workbench (tried without success)?

Is there a possibility with some javascript code or with a powerfx formula? I have seen a post about a function like MyFlow.Run in the power community, but it appears not to be true.

 

For the moment I keep triggering the flow from a dataverse change.

 

 

Thank you.

Categories:
I have the same question (0)
  • ANB Profile Picture
    7,223 Super User 2025 Season 2 on at

    Hi @Gilles12 , Have you checked this:

    https://powerusers.microsoft.com/t5/Building-Power-Apps/Run-a-flow-from-Model-Driven-App-UI/td-p/1675089

    https://powerusers.microsoft.com/t5/Building-Power-Apps/Manually-trigger-flow-from-Model-Driven-App/td-p/1606117

     

    -----------------------------------------------------------------------------------------------------------------------------

    I hope this helps.

    Please click Accept as solution ✅ if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs up.👍

    Thanks,
    ANB


  • Gilles12 Profile Picture
    121 on at

    Thank you for your quick response, but before I go in this direction, I am not sure I can pass the row ID as a parameter (currently my flow is triggered by something like a record change, so I need to keep receving what's the object the request is about to perform the actions). Do you know?

  • Gilles12 Profile Picture
    121 on at

    I replied too fast, I see this is possible... Let's explore this...

  • ChrisPiasecki Profile Picture
    6,422 Most Valuable Professional on at

    Hi @Gilles12,

     

    Using the when a Row is Selected trigger in Power Automate is one way to run your flow on demand and pass the row in. 

     

    Here is a good video from Scott Durow that explains different approaches that you can use for both single or multiple records.

     

    ---
    Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

  • Gilles12 Profile Picture
    121 on at

    Thanks guys! I will stick for the moment on my simple Dataverse trigger based on a row or field change, as all the solutions you highlighted here (thanks for that) are not very straighforward. I have tried the HTTP request one, but it requires playing with libraries, authentication issues, etc. The Power FX one needs to add significant code as well. I was hoping a very simple way to exist. PowerApps make the life so easier for certain things that I was naively expecting to be able to relate a basic button to the name of my flow. What would prevent this to exist? Anyway, thanks!

  • ChrisPiasecki Profile Picture
    6,422 Most Valuable Professional on at

    Hi @Gilles12,

     

    Yes I understand the frustration, being able to Run a Flow from a Power FX command button is something we've been waiting for a while to be added. "In the fullness of time" is what we hear, so hopefully sometime soon..

     

    ---
    Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

  • Suggested answer
    gvrijdag Profile Picture
    2 on at
    Hi all,
    Today I found the easiest solution so far.
    Below the explanation for implementing an unbound action (without any context): so to just run a flow.
    1. Create a custom API
    • Unique Name: prefix_StartMyFlow
    • Display Name: Start My Flow
    • Binding Type: Global (no entity needed)
    • Execute Privilege Name: empty
    • Is Function: No
    • Is Private: No
    • Allow Custom Processing Step Registration: Async Only
    • Enabled for Workflow: Yes
    2. Create your cloud flow
    • Trigger: Dataverse When action is performed
    • Select:
      • Catalog: ALL
      • Category: ALL
      • Table name: none
      • Action name: unique name of the custom API
    3. add command button in modern command designer
    and add enclosed javascript (sufficient documentation on this available)
     
    Explanation:
    * javascript calls the custom api
    * Dataverse raises the unbound action
    * Flow triggers
     
    No authentication
    No URL's
    Scalable, you can add parameters later
    You can even make the javascript more generic by using the name of the custom api as an input parameter.
  • Suggested answer
    Gabriel G. Profile Picture
    831 Super User 2025 Season 2 on at
    Hi there!

    As @ChrisPiasecki mentioned, you can use a column thart you update from command bar, which trigger a flow.

    For example, you create a new Date field named 'publishedDate' on table concerned. Then, you use PowerFX to update the column on your command bar button action: Patch(<tablename>, Self.Selected.AllItems, {publishedDate: Now()}).
     
    Now, it is easy to trigger your flow from this column changed.

    I hope it helps!
    ______________________________________
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.

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