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 Apps / Trigger flow onSuccess...
Power Apps
Answered

Trigger flow onSuccess with ID of current item

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello all!

 

I currently have a flow that usually triggers with the Sharepoint trigger "When an item is created or modified". However since that trigger seems to be bugged I'm looking into the possibilty to trigger the flow when the form is submitted. This seems to be the best option since we are already using a custom form for the list.

 

Now I have the problem that I use a HTTP request after triggering. It fetches the latest 2 Versions of the item created/modified and sees if certain fields have changed. For this I use the Uri "_api/web/lists/getbytitle('Test List')/items(ID OF CURRENT ITEM)/versions?$top=2.

With the Sharepoint trigger I could just simply insert the ID of the current item. How can I achieve this when triggering the flow with the onSuccess action in PowerApps?

 

Thanks for help 🙂 

Categories:
  • Verified answer
    mdevaney Profile Picture
    29,993 Moderator on at

    @Anonymous 

    PowerApps can pass the ID of the record to Flow using the RUN function.  It looks something like this:

     

    Run(your_flow_name, your_id)

     

    When I was first learning how to do this I used the tutorial below.  It'll take only 15 minutes to try it for yourself  and is well worth the time spent!  

     

    Tutorial Link

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/using-logic-flows

     

    ---
    Please click "Accept as Solution" if my response helped to solve your issue so that others may find it more quickly. If your thought the post was helpful please give it a "Thumbs Up."

  • Verified answer
    RezaDorrani Profile Picture
    12,145 on at

    Hi @Anonymous 

     

    If using a formcontrol in PowerApps for adding/editing data in a SP list

     

    Then this FormControl will have a OnSuccess property

     

    On this property you can call the Flow and to pass the ID of the item just use

    formname.LastSubmit.ID

     

    SO OnSuccess

    Flow.Run(formname.LastSubmit.ID)

     

    This will pass the item ID which you can then use in Flow to query for versions

     

    --------------------------------------------------------------------------------
    If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks to both of you. Really helped me and I managed to get it working.

     

    But now I have one more problem:
    The flow contains a create file action and sends an email. It seems that now with using the PowerApps trigger it creates the file and sends the mail on behalf of the person who submitted the form. That's a behaviour I don't want. It should always come frome the account that is running the flow. Any ideas?

     

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 397 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 354

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard