cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

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

@Anonymous 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

@Anonymous 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.

Anonymous
Not applicable

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 Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Kudoed Authors
Users online (4,085)