5 Ways to start a Flow for a SharePoint item

What is Power Automate (previously known as Flow)?

Power Automate is an office 365 application that allows you to automate repetitive tasks and business processes by creating a flow.

The basic components of a flow (an automated process) are:

  • Trigger: An action that causes the flow to start. Every flow must have a trigger.
  • Action: The steps or actions to perform
  • Conditions: Applies logic to your flow so actions only execute when appropriate. Conditions are not always needed in your flow.

Here we will look at 5 ways to start a flow on a SharePoint item.

1. Automated Flows – Flows that are automatically trigger after an event such as when an item is created, modified or deleted. These flows will run automatically when an item in SharePoint is created, modified or deleted – depending on which trigger is used in the flow.

2. Scheduled Flows – These flows run on a schedule (like a timer job). These flows can be schedule to run as often as every second to as infrequent as every month.

In a SharePoint context, I usually use it to gather SharePoint items that meet a specific criteria and then perform actions on them.
Example: Every Monday, get all Task items that are due this week and send an email to the assigned to person.

Instant Flows – Flows that are triggered manually by a user. There are several ways to manually trigger a flow for a SharePoint item. There are several ways to manually start a flow on a SharePoint item.

3. Button Flows – This allows you to manually trigger a flow from the Power Automate mobile app. Each button flow, creates a button in the app that you can click to trigger a flow.

Instant flows allow you to require input fields that the user is required to fill out when they trigger the flow. You can gather information and then perform an action based on the data.

Example: Create an incident report from a button in flow. The user inputs details about the incident and then the flow creates a list item in SharePoint.

4. Instant Flow from the SharePoint List Ribbon – When you use the SharePoint trigger, For selected item, the flow using that trigger will automatically displays in the flow drop down menu. Select the item that you want to the flow on, then select the flow from the drop down menu.

Whenever you have a list with a date column, the Set a reminder flow template automatically pops up in the drop down menu for you to create a reminder flow on an item.

5. Instant flow using JSON Formatting – JSON formatting allows you to format a single SharePoint column or an entire SharePoint view. See examples here. Using JSON formatting, you can format a column so that it displays as a link that will trigger your flow when clicked.

Steps:

  • Create a column – the column type does not matter as the JSON formatting will overwrite the field data.
  • Once the column is created, select the column header drop down menu then select Format this column.
  • Add the code below to the right hand panel and replace the text FLOW-ID with your flow’s ID.
    You can get the flow ID, by navigating to your flow and then editing the flow. The ID is the last segment of the URL after /flows/
{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
  "elmType": "span",
  "style": {
    "color": "#0078d7"
  },
  "children": [
    {
      "elmType": "span",
      "attributes": {
        "iconName": "Flow"
      }
    },
    {
      "elmType": "button",
      "style": {
        "border": "none",
        "background-color": "transparent",
        "color": "#0078d7",
        "cursor": "pointer"
      },
      "txtContent": "Start the flow",
      "customRowAction": {
        "action": "executeFlow",
        "actionParams": "{\"id\": \"FLOW-ID\"}"
      }
    }
  ]
}