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 Automate / Triggering flow from S...
Power Automate
Unanswered

Triggering flow from SharePoint list details form

(0) ShareShare
ReportReport
Posted on by 11

Hi all,

I am looking for potentially a very simple thing. I wish to add a button to a SharePoint list detail form that can trigger a Power Automate flow with the specific list item's ID as context.

 

I know I can edit the list form using Power Apps, but I can't figure out how to pass the item's ID to Power Automate when the button is clicked. ThisItem.ID doesn't seem to work.

 

Any suggestions would be very welcome!
Thanks,

Gabriel

Categories:
I have the same question (0)
  • RobElliott Profile Picture
    10,319 Super User 2025 Season 2 on at

    @GabrielHarangi rather than have the button in the form, why not just have it in the list?

     

    100-FlowButton.png

     

     

    The button is formatted in advanced mode with JSON using the following syntax. You would need to change the flow ID to your flow's ID and the button text etc.

     

    {
     "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
     "elmType": "button",
     "txtContent": "Change Created By to name of page contact",
     "customRowAction": {
     "action": "executeFlow",
     "actionParams": "='{\"id\":\"50097cde-b800-4c6c-ade9-95be7574f4e5\", \"headerText\":\" ' + [$Title] + '\",\"runFlowButtonText\":\"Go\"}'"
     },
     "style": {
     "background-color": "#cf000f",
     "color": "white",
     "border-radius": "10px"
     }
    }

     

    In the flow the trigger is the SharePoint "for a selected item", then you add the get item action to get the column details and then add whatever other actions you need.

     

     Rob
    Los Gallardos
    If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.

  • GabrielHarangi Profile Picture
    11 on at

    Hey RobEliott,

    thanks for such a quick response!

     

    I am, in fact, already using that solution. But I wish my users to be able to also click a button directly in the edit form. The reason is simply a better and quicker user experience.

     

    Secondly, and this is perhaps more important, I wish to be able to trigger flows from lists embedded in Teams. I believe that would work with the PowerApps solution, but it does not work with the JSON formatted button (but maybe there is a trick for that?).

     

    It looks like Powe Apps should be the perfect solution for this and many other neat tricks, which is why I'd like to find out more about this.

  • Verified answer
    GabrielHarangi Profile Picture
    11 on at

    I found the solution I was looking for. When using Power Apps to create custom forms for a SharePoint list, you can call:

    SharePointIntegration.SelectedListItemID

    To trigger a flow, you can add the following code to OnSelect:

    'FlowName'.Run(SharePointIntegration.SelectedListItemID)

     

    I ended up using a slightly different solution. I trigger the flow with OnSuccess for form submission (instead of OnSelect for the button) with:

    'FlowName'.Run(SharePointForm1.LastSubmit.ID)

     

    Maybe someone fill find this useful!

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 Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 406 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard