I discovered your channel recently. I watched several videos, very good work. Superb presentation that gives me clues about an upcoming project. A channel to follow!
As someone who is a BIG proponent of "instant" flows, this has become a huge selling point to users. Honestly, it's not that difficult to run those flows from the command bar or the item menu once you know how, but this eliminates that learning curve. Also, with a bit of creativity, you can have multiple icons/buttons to run different flows.
Hi Chad and many thanks for providing this tutorial. I am wondering if it‘s possible to present such buttons inside the list form. Background is a board based view where the button is not visible (and this is ok, i want to have clean/situation depending cards). But if the user clicks to open the form i would like to enable an „one click action“ to run a flow. Any hint if this is achieveable would be very appreciated.
Displaying the buttons on a card/gallery view is possible (just take the formatting code and replace it in the formatting for that view), but getting them to appear on the list form is (in my experience) more complicated. I've had a few cases where they just showed up there, but I've never been able to figure out why or make the formatting appear on a particular form. It's one of those things I keep on the back burner until I have some free time. I'm fairly certain I've seen Chris Kent demo that capability, but cannot find the video.
Hi i have an issue, other users can't click the button. if they do nothing happens. if i click the button i see a process working in the upper corner and the flow is´triggered as well. Any ideas?
Have you added those users as ”Run only" users to the flow? Without that access, they can't initiate the flow. See learn.microsoft.com/en-us/sharepoint/dev/business-apps/power-automate/guidance/manage-list-flows
@@cvkealey Ty vm it works now, do you know how to get the users displayname or upn who started the flow into the http request? perhaps in the json body somehow?
Hi Chad, is there any way to add a single global button at the top of the SP list , that can run a flow to create an email draft with in "ccn" all the users selected in the list? I had this developed with JS in old sharepoint 2013, but the same code is no more allowed in my 365 Sharepoint list. How could I add a similar flow via power automate now?
I'm not sure how to do that as Microsoft has locked down the UI to prevent that level of customization. The best workaround I can think of would be creating a checkbox column in the list like "run flow" and then create an instant flow that includes a "get items" action that will retrieve items from the list that have that box checked.
Thanks for the video, very useful for someone new to Sharepoint and PA! Are you able to pass the line items over to PA on the row you have 'clicked' the button for?
This method works with the "For a selected item" ( or file) trigger, which returns the id of the item or file. You then use a "Get item" or "Get file properties" action to get the details of that item/file.
hi, i want to ask. what if i already created the approval flow in power automate where when the user click save button in the sharepoint list form, the approval automatically start. but then, what will happend if i create this button? how to stop the auto approval flow and use thing only
We have a few different workflows that we start this way (“For a selected item”). Is there a way to create a column but then have the button display a list of available workflow for the user to choose from? We are really liking the column approach, however, we would like to avoid having a column per workflow.
You can add another column, like a date/time column, to record that the workflow has been started. If so, you can either just hide the icon/button, or show a different icon or message.
This method works with Instant cloud flows using the "For a selected item" or "For a selected file" triggers. The flow could just immediately send an email if that's what you want/need it to do. If you want that email to be conditional (example: "if this column's value is greater than this number" or "if this status column's value is approved"), then, yes, you would need a condition in that case.
What do you mean by "record id"? If you mean a value that's stored in a column/field in the item, you can use the "Get item" action to retrieve the selected item using the list item ID that's passed by the trigger.
@cvkealey I am using the 'manually triger a flow' triger, I want to start this flow from sharepoint using the button in a record. When the flow triggeres it should send also some information for example the title
Hi Chad, sorry how do you set your flow because when I try to run the flow and error tab appears, I’m sure it’s because I do not create the correct type of flow on P Automate
This method only works with two triggers from the SharePoint connector: "For a selected item" (in a SharePoint list) and "For a selected file" (in a SharePoint library).
should the flow be in the default environment as is the case for the out of the box button? I have followed the exact steps and the flow is triggered on "For a selected file" but does not respond to the click
Apparently, this only works with flows in the default environment (see powerusers.microsoft.com/t5/General-Power-Automate/Trigger-Flow-from-SPO-List-button-not-working-if-flow-sits-in/td-p/619570). I was not aware of that limitation and will update the video description accordingly. I tried adding the environment to the json in what should be the correct format, but it simply doesn't recognize it as valid JSON.
As far as I know, that's not possible. You can customize the flow launch panel to change the text that appears at the top and on the button to start it (see thechriskent.com/2019/05/02/customizing-the-flow-panel-with-list-formatting-actionparams/), but there's no way around the user needing to click that button to start the flow. I actually prefer this because it minimizes the risk of the flow being run unintentionally.
I would like to point to a flow in a different environment than Default one. Where can I set it, cause now it is trying to find the flow in Default env?
As noted in the video description, this method only works with flows in the default environment. There is no way to specify the environment in the JSON code.
@@cvkealey gotcha. What was/is tripping me up is I cannot find “For a selected file” trigger when creating a new flow from scratch. I ended up using a template that has that trigger.
@@martinnoah9716it's classified as an "Instant" trigger. So, when creating a flow from scratch, select New > Instant cloud flow, then scroll down and you should see "For a selected file" in the list.
Will this work only to trigger flows in default environment? I tried to trigger a flow in different environment. It is not working. Is it possible to pass the environment I'd?
I have not tried with a flow in another environment. The instructions (see second link in the video description) for getting the id of a solution aware flow seem to indicate that it should work for flows in a non-default environment.
I think this approach is not working anymore. You have to apply the trigger "When a http request is received" to your flow. It is a premium trigger but it works without premium for now 🤷🏻♂️.
@@Myjestic12 the new flow editor doesn't like the "for a selected item" or "for a selected file" triggers. If you use the classic editor, it works fine. Trust me, I set up four of these this week.
What does the Flow do? In one of your comments, you state the button sends the Id of the List item to the Flow and your Flow uses this information to send the email to the owner of the list item and also provide the List item's status?
The flow can do whatever you need it to do. By starting it "for a selected item", the ID of the item is automatically passed into the flow, so with that, you can get the full details of the item (using the Get item action) and do whatever you need it to do. In other words, this is just a means of launching any flow that uses the "for a selected item" trigger.
Why does the column need to be read-only calculated? The button seems to appears no matter what the column type was. Also is there any way to make the button work in detailed view?
The column doesn't NEED to be a calculated column, but the main reason for using that is to prevent it from appearing in the edit form for an item and minimize confusion. To give credit where due, I got this idea from Chris Kent: thechriskent.com/2018/08/29/list-formatting-quick-tip-format-only-columns/. I'm not sure what you mean by "detailed view"...can you clarify?
@@somo1ful That is correct...I'm seeing the same behavior. It also doesn't work in a tiled/gallery or board type view of the list. I suspect there's a workaround for this, but don't know what that is. I'll have to do some testing.
If you mean in the "view form" for the item, I have not found a reliable way to do that. If you use a text column to hold the formatting and that column has a value (that is, it's not blank), then the formatting will appear in the form, but will not function as intended (it just lets you edit the value in the column rather than opening the flow launch panel).
This will work for any flows that use the SharePoint triggers "For a selected item" or "For a selected file" and are connected to that particular list or library.
@@Rafal-Stasiuk if by "submitter" you mean the person who created the item or file, that would just be the "Created by" value for the item. That's a person type field, so it has properties of DisplayName and Email (as well as a few others, but those are the most useful). If you mean (in the case of a manually started flow) the person who initiated it, the trigger will output several "User " properties (e.g.: "User name" is the display name of the person who initiated the flow run).
Yes! There's an optional parameter (runFlowButtonText) that you can set to change the text displayed on the button. See thechriskent.com/2019/05/02/customizing-the-flow-panel-with-list-formatting-actionparams/ for details.
What trigger does the flow use? This method *only* works with instant triggers from the SharePoint connector ("For a selected item" in lists or "For a selected file" in libraries). If you're using one of those, make sure you've got the proper/complete flow ID.
@Ady-sk4tj what does the flow actually do? Recurring flows usually operate on multiple items in a list, while the "for a selected..." triggers operate on a single item. They're both useful in different ways.
Can't bypass the "Run flow" button. This is more to make the process of starting an instant flow easier to the end user, but not so easy that they'll do so accidentally. In fact, most such flows that I create have, in the description (which appears at the top of the launch panel) a warning of sorts. Something like: "NOTE: This flow will . If you DO NOT want to do this, click Cancel. If you do, click Run flow"
@@cvkealey Yeah, figured its by design behaviour of PA flows when running thru JSON format. I did a work around and use canvas app to fulfill my requirements.thanks btw.amazing content as always!
I discovered your channel recently. I watched several videos, very good work. Superb presentation that gives me clues about an upcoming project. A channel to follow!
Thanks Chad! Came across this video months ago and thought "cool, but when will i need this?".Sure enough, today I needed it!!! Keep it up!
As someone who is a BIG proponent of "instant" flows, this has become a huge selling point to users. Honestly, it's not that difficult to run those flows from the command bar or the item menu once you know how, but this eliminates that learning curve. Also, with a bit of creativity, you can have multiple icons/buttons to run different flows.
It is very helpful and handy way, I have used it and its quite popular in end user community. thanks Chad, have a good day
Hi Chad, it was easy, quick and to the point, thank you 👍👍
excellent Chad. Thanks a lot !
Thank you! Very helpful and easy to follow.
Hi Chad and many thanks for providing this tutorial. I am wondering if it‘s possible to present such buttons inside the list form. Background is a board based view where the button is not visible (and this is ok, i want to have clean/situation depending cards). But if the user clicks to open the form i would like to enable an „one click action“ to run a flow. Any hint if this is achieveable would be very appreciated.
Displaying the buttons on a card/gallery view is possible (just take the formatting code and replace it in the formatting for that view), but getting them to appear on the list form is (in my experience) more complicated. I've had a few cases where they just showed up there, but I've never been able to figure out why or make the formatting appear on a particular form. It's one of those things I keep on the back burner until I have some free time. I'm fairly certain I've seen Chris Kent demo that capability, but cannot find the video.
Hi i have an issue, other users can't click the button. if they do nothing happens. if i click the button i see a process working in the upper corner and the flow is´triggered as well.
Any ideas?
Have you added those users as ”Run only" users to the flow? Without that access, they can't initiate the flow. See
learn.microsoft.com/en-us/sharepoint/dev/business-apps/power-automate/guidance/manage-list-flows
@@cvkealey Ty vm it works now, do you know how to get the users displayname or upn who started the flow into the http request? perhaps in the json body somehow?
Yup...see this video: ua-cam.com/video/AGiv60AWCm4/v-deo.html
Got it TY vm!!! u are a life saver!
Hi Chad, is there any way to add a single global button at the top of the SP list , that can run a flow to create an email draft with in "ccn" all the users selected in the list?
I had this developed with JS in old sharepoint 2013, but the same code is no more allowed in my 365 Sharepoint list.
How could I add a similar flow via power automate now?
I'm not sure how to do that as Microsoft has locked down the UI to prevent that level of customization. The best workaround I can think of would be creating a checkbox column in the list like "run flow" and then create an instant flow that includes a "get items" action that will retrieve items from the list that have that box checked.
Thanks for the video, very useful for someone new to Sharepoint and PA! Are you able to pass the line items over to PA on the row you have 'clicked' the button for?
This method works with the "For a selected item" ( or file) trigger, which returns the id of the item or file. You then use a "Get item" or "Get file properties" action to get the details of that item/file.
hi, i want to ask. what if i already created the approval flow in power automate where when the user click save button in the sharepoint list form, the approval automatically start. but then, what will happend if i create this button? how to stop the auto approval flow and use thing only
It sounds like you used the "When an item is created" trigger. You would need to remove that and replace it with the "For a selected item" trigger.
🔥🔥🔥🔥🔥🔥 love this. Thanks!!
We have a few different workflows that we start this way (“For a selected item”). Is there a way to create a column but then have the button display a list of available workflow for the user to choose from? We are really liking the column approach, however, we would like to avoid having a column per workflow.
It is possible to show multiple buttons or links in the same column, each launching a different flow. The code below is from a task list where two different flows can be run. It might be possible to display a drop-down to select which flow, but that's beyond my abilities.
{
"$schema": "developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"style": {
"flex-direction": "column"
},
"children": [
{
"elmType": "button",
"customRowAction": {
"action": "executeFlow",
"actionParams": "{\"id\": \"66986db6-e468-4525-96f2-8c10085d93e2\"}"
},
"attributes": {
"class": "ms-font-m ms-fontColor-themePrimary ms-fontColor-themeDarker--hover"
},
"style": {
"border": "none",
"background-color": "transparent",
"cursor": "pointer",
"display": "=if(Number([$TasksGenerated]) == 0,'inherit','none')",
"padding-top": "6px"
},
"children": [
{
"elmType": "span",
"attributes": {
"iconName": "Trackers",
"class": "ms-font-xl"
},
"style": {
"padding-right": "6px"
}
},
{
"elmType": "span",
"txtContent": "Create tasks"
}
]
},
{
"elmType": "button",
"customRowAction": {
"action": "executeFlow",
"actionParams": "{\"id\": \"cfbb5367-58e8-4e89-8a70-35a4f95eb707\"}"
},
"attributes": {
"class": "ms-font-m ms-fontColor-themePrimary ms-fontColor-themeDarker--hover"
},
"style": {
"border": "none",
"background-color": "transparent",
"cursor": "pointer",
"display": "=if(Number([$TasksGenerated]) == 0,'none','inherit')"
},
"children": [
{
"elmType": "span",
"attributes": {
"iconName": "RecurringTask",
"class": "ms-font-xl"
},
"style": {
"padding-right": "6px",
"padding-top": "3px",
"padding-bottom": "6px"
}
},
{
"elmType": "span",
"txtContent": "Replace tasks"
}
]
}
]
}
Is it possible to visually ‘show’ when this button in the past has been pushed? This to avoid that another collegae push the button again.
You can add another column, like a date/time column, to record that the workflow has been started. If so, you can either just hide the icon/button, or show a different icon or message.
the flow starts as an automated cloub flow and "for a selected item" and immediately to send an email or do I need a condition?
This method works with Instant cloud flows using the "For a selected item" or "For a selected file" triggers. The flow could just immediately send an email if that's what you want/need it to do. If you want that email to be conditional (example: "if this column's value is greater than this number" or "if this status column's value is approved"), then, yes, you would need a condition in that case.
Is it possible to send data(a record id) to the flow when triggering the flow from sharepoint.
I only found the possibility to triger any flow using the identifier, but I don't see any possibility to send some data to the trigger.
What do you mean by "record id"? If you mean a value that's stored in a column/field in the item, you can use the "Get item" action to retrieve the selected item using the list item ID that's passed by the trigger.
@cvkealey I am using the 'manually triger a flow' triger, I want to start this flow from sharepoint using the button in a record. When the flow triggeres it should send also some information for example the title
I was trying to send some data with the action param from sharepoint, but the flow does not get the information
@lachmankrishen you need to use the "for a selected item" trigger.
Hi Chad, sorry how do you set your flow because when I try to run the flow and error tab appears, I’m sure it’s because I do not create the correct type of flow on P Automate
This method only works with two triggers from the SharePoint connector: "For a selected item" (in a SharePoint list) and "For a selected file" (in a SharePoint library).
Check the links in the video description for more details and information.
should the flow be in the default environment as is the case for the out of the box button?
I have followed the exact steps and the flow is triggered on "For a selected file" but does not respond to the click
P.S in my case I don't have a list but a file
Apparently, this only works with flows in the default environment (see powerusers.microsoft.com/t5/General-Power-Automate/Trigger-Flow-from-SPO-List-button-not-working-if-flow-sits-in/td-p/619570). I was not aware of that limitation and will update the video description accordingly. I tried adding the environment to the json in what should be the correct format, but it simply doesn't recognize it as valid JSON.
@@cvkealey thank you! Very useful.
Thank you. And what if we don't want user to clock the "Run Flow" but rather directly run it? Is there any action for that
As far as I know, that's not possible. You can customize the flow launch panel to change the text that appears at the top and on the button to start it (see thechriskent.com/2019/05/02/customizing-the-flow-panel-with-list-formatting-actionparams/), but there's no way around the user needing to click that button to start the flow. I actually prefer this because it minimizes the risk of the flow being run unintentionally.
@@cvkealey you are great! The link is exactly what I was looking for
I would like to point to a flow in a different environment than Default one.
Where can I set it, cause now it is trying to find the flow in Default env?
As noted in the video description, this method only works with flows in the default environment. There is no way to specify the environment in the JSON code.
Awesome idea and video. Any idea if this will work with a document library?
Yes, as long as your flow uses the For a selected file trigger.
@@cvkealey gotcha. What was/is tripping me up is I cannot find “For a selected file” trigger when creating a new flow from scratch. I ended up using a template that has that trigger.
@@martinnoah9716it's classified as an "Instant" trigger. So, when creating a flow from scratch, select New > Instant cloud flow, then scroll down and you should see "For a selected file" in the list.
Will this work only to trigger flows in default environment? I tried to trigger a flow in different environment. It is not working. Is it possible to pass the environment I'd?
I have not tried with a flow in another environment. The instructions (see second link in the video description) for getting the id of a solution aware flow seem to indicate that it should work for flows in a non-default environment.
I think this approach is not working anymore. You have to apply the trigger "When a http request is received" to your flow. It is a premium trigger but it works without premium for now 🤷🏻♂️.
@@Myjestic12 the new flow editor doesn't like the "for a selected item" or "for a selected file" triggers. If you use the classic editor, it works fine. Trust me, I set up four of these this week.
@@cvkealey I used the Flow Id from My Flow->Export-> Get flow identifier. And now iam able to trigger flows from different environment
@@mithunmohan6927 good to know!
What does the Flow do? In one of your comments, you state the button sends the Id of the List item to the Flow and your Flow uses this information to send the email to the owner of the list item and also provide the List item's status?
The flow can do whatever you need it to do. By starting it "for a selected item", the ID of the item is automatically passed into the flow, so with that, you can get the full details of the item (using the Get item action) and do whatever you need it to do.
In other words, this is just a means of launching any flow that uses the "for a selected item" trigger.
Why does the column need to be read-only calculated? The button seems to appears no matter what the column type was. Also is there any way to make the button work in detailed view?
The column doesn't NEED to be a calculated column, but the main reason for using that is to prevent it from appearing in the edit form for an item and minimize confusion. To give credit where due, I got this idea from Chris Kent: thechriskent.com/2018/08/29/list-formatting-quick-tip-format-only-columns/. I'm not sure what you mean by "detailed view"...can you clarify?
@@cvkealey oh ok thanks.
"Detailed view"/popup/edit form, wasn't sure what to call it but the button doesn't work there(?).
@@somo1ful That is correct...I'm seeing the same behavior. It also doesn't work in a tiled/gallery or board type view of the list. I suspect there's a workaround for this, but don't know what that is. I'll have to do some testing.
How do i add this button in the item? when you are in the list and press on a item?
If you mean in the "view form" for the item, I have not found a reliable way to do that. If you use a text column to hold the formatting and that column has a value (that is, it's not blank), then the formatting will appear in the form, but will not function as intended (it just lets you edit the value in the column rather than opening the flow launch panel).
That was a helpful video. Do you have a link to your flow? how is it built
This will work for any flows that use the SharePoint triggers "For a selected item" or "For a selected file" and are connected to that particular list or library.
@@cvkealey Do you have an example of a flow where you get submitter name from a sharepointlist?
@@Rafal-Stasiuk if by "submitter" you mean the person who created the item or file, that would just be the "Created by" value for the item. That's a person type field, so it has properties of DisplayName and Email (as well as a few others, but those are the most useful). If you mean (in the case of a manually started flow) the person who initiated it, the trigger will output several "User " properties (e.g.: "User name" is the display name of the person who initiated the flow run).
Can the run flow button be changed to say submitt?
Yes! There's an optional parameter (runFlowButtonText) that you can set to change the text displayed on the button. See thechriskent.com/2019/05/02/customizing-the-flow-panel-with-list-formatting-actionparams/ for details.
i did exactly the same thing but it says : ,,Couldn't start flow "name of my flow". Failed " any ideas ?
What trigger does the flow use? This method *only* works with instant triggers from the SharePoint connector ("For a selected item" in lists or "For a selected file" in libraries). If you're using one of those, make sure you've got the proper/complete flow ID.
@@cvkealey it is a reccurence
@@xAdy11 then you can't trigger it using this method.
@@cvkealey ok, thank you. i will try another trigger
@Ady-sk4tj what does the flow actually do? Recurring flows usually operate on multiple items in a list, while the "for a selected..." triggers operate on a single item. They're both useful in different ways.
Siiiiiiii🎉
How can we bypass the run flow button? Like the flow will just run automatically? Its just to streamline the process
Can't bypass the "Run flow" button. This is more to make the process of starting an instant flow easier to the end user, but not so easy that they'll do so accidentally. In fact, most such flows that I create have, in the description (which appears at the top of the launch panel) a warning of sorts. Something like: "NOTE: This flow will . If you DO NOT want to do this, click Cancel. If you do, click Run flow"
@@cvkealey Yeah, figured its by design behaviour of PA flows when running thru JSON format. I did a work around and use canvas app to fulfill my requirements.thanks btw.amazing content as always!