cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
robcarrs
Frequent Visitor

Flow based on Button in Sharepoint List

Flow is used to copy information from a Forms response into a Sharepoint List

 

I have a button int the Sharepoint List, 'Generate Documents' which triggers a Flow. How can I pass the current list item information into Flow?

 

The button is a column with the JSON format edited:

 

{ "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "button", "customRowAction": { "action": "executeFlow", "actionParams": "{\"id\": \"id}" }, "attributes": { "class": "ms-fontColor-themePrimary ms-fontColor-themeDarker--hover" }, "style": { "border": "none", "background-color": "transparent", "cursor": "pointer" }, "children": [ { "elmType": "span", "attributes": { "iconName": "Flow" }, "style": { "padding-right": "6px" } }, { "elmType": "span", "txtContent": "Generate Documents" } ] }

1 ACCEPTED SOLUTION

Accepted Solutions
RobElliott
Super User
Super User

@robcarrs create your flow first using the For a selected item SharePoint trigger. Copy the ID of the flow:
1-forSelectedItem-ID.png

 Then use that ID in your JSON column format:

0-formatColumn.pngRob
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.

View solution in original post

2 REPLIES 2
RobElliott
Super User
Super User

@robcarrs create your flow first using the For a selected item SharePoint trigger. Copy the ID of the flow:
1-forSelectedItem-ID.png

 Then use that ID in your JSON column format:

0-formatColumn.pngRob
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.

This is perfect, thanks @RobElliott . I was just confused as to how Flow is able to retrieve the item from the Flow trigger ID, but I can now accept that it is magic and it works great. 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Users online (3,589)