A little-known Power Automate secret is that you can manually trigger a flow to run from a selected SharePoint List item by just clicking on a Hyperlink field. It almost sounds too good to be true, but all it takes is knowledge of the “For a selected item” SharePoint trigger and some custom JSON. This blog post will explore how to fully configure and use the “For a selected item” SharePoint trigger.

Demo Video

Detailed Configuration Steps

Power Automate Configurations

1. Create a new Instant Cloud Flow and select the “For a selected item” SharePoint trigger.

screenshot of For a selected item- SharePoint trigger selection

This is a manual trigger, which means that a user action will trigger the flow. In this case, the user action will be clicking on a Hyperlink field in a selected SharePoint List item.

2. Configure the trigger to point to the correct SharePoint Site and SharePoint List

Configure the trigger to point to the correct SharePoint Site and SharePoint List

The “For a selected item” trigger can even accept parameters. This allows the user to pass more information to the flow, outside of the information captured within the SharePoint List item itself. In this case, the Employee Code parameter is not captured by our SharePoint List Team Members in one of the fields, but it can still be passed directly to the flow run by the user.

3. Add desired flow actions

Add desired flow actions

For this flow, all I will be adding is a Compose action that prints the value of the Employee Code parameter.

SharePoint Configurations

1. Add a Hyperlink field to the SharePoint List

Add a Hyperlink field to the SharePoint List

I have added a Hyperlink field called Run Flow.

2. Configure the Hyperlink field’s custom JSON formatting

Select the Hyperlink field, select Column settings, then select Format this column

a. Select the Hyperlink field, select Column settings, then select Format this column

Select Advanced mode to expose the JSON editor

b. Select Advanced mode to expose the JSON editor.

c. Enter the following JSON into the editor, inputting your “For a selected item” flow’s Flow Identifier in place of “[FLOW_IDENTIFIER]”

JSON code:

Copy to Clipboard

d. To get your flow’s Flow Identifier, go to your flow’s Details page, select Export, then select Get flow identifier. Copy the flow identifier listed in the Get flow identifier pane, and insert it into the JSON code.

get your flow’s Flow Identifier

Copy the flow identifier listed in the Get flow identifier pane

An example of the JSON code with my flow’s Flow Identifier inserted is shown below:

Copy to Clipboard

Run the flow for a selected SharePoint item!

After completing the above steps, my SharePoint List now looks like this:

Run the flow for a selected SharePoint item1. To run the flow, select a SharePoint List item, then click the hyperlink text.

In my example, I will be clicking on the “Run the flow!” text for my selected list item.

The Run flow pane will appear on the right side of the screen.

Any input parameters specified in the flow’s trigger will appear in the Run flow pane. In my example, I inputted a value for the Employee Code parameter, which will be passed to the flow.

2. Click the Run flow button at the bottom of the Run flow pane to trigger the flow.

Click the Run flow button at the bottom of the Run flow pane

3. A pop-up will notify you that the flow run has started.

A pop-up will notify you that the flow run has started

Unlocking Power Automate’s Best Kept Secret Just Got Easier!

The “For a selected item” SharePoint trigger should be in everyone’s Power Automate toolbox. This trigger makes it easy for a user to interact SharePoint list items and initiate list item-specific business processes through Power Automate flows seamlessly, without having to navigate to any other screens.

Compass365: A Resource for Power Apps Development

If you need help with developing more complex or customized Power Apps for your business needs, you can rely on Compass365. We are a Microsoft Gold Partner that specializes in Power Apps consulting, development, and governance.

Compass365 can help you design, build, and deploy Power Apps solutions that meet your specific requirements and goals. Whether you need a simple component or a full-fledged app, Compass365 can provide you with the expertise and guidance to make your project a success. Compass365 can also help you integrate your Power Apps with other Microsoft services, such as SharePoint, Dynamics 365, Power Automate, and Power BI, to create a seamless and comprehensive digital experience for your users.

To learn more about Compass365 and how we can help you with your Power Apps projects, explore our Power Platform services or reach out directly to Cathy Ashbaugh, cashbaugh@compass365.com to schedule a complimentary consultation.

Subscribe

Join over 3,000 business and IT professionals who receive our monthly newsletter with the latest Microsoft 365 tips, news, and updates.

We do not share or sell your information and you can unsubscribe at any time.