All About Power Automate Triggers

Power Automate flows are used to automate or perform a set of actions with minimum human intervention.

There will always be a specific situation or condition that needs to be met before we want the flow to start its execution.

They are the opposite of a Do Until loop.

Setting up this condition is the first step in creating any flow and are called as Triggers.

Power Automate triggers are covered during our Power Automate training courses if you would like more detailed help with them.

 

What is a Trigger in Power Automate?

 A trigger in Power Automate is an event which starts the execution of a flow.

It is mandatory to have a trigger as the first step of a flow, followed by at least one action.

There are lots of connectors available in Power Automate, each of which provides built-in triggers.

Example:

  1. Some of the triggers provided by Office 365 Outlook connector are
    a. When a new email arrives (V3) – Flow execution starts when a new email arrives.
    b. When a new event is created (V3) – Flow execution starts when an event is created in the calendar.
  2. Some of the triggers provided by SharePoint connector are
    a. When a new item is created – Flow execution starts when a new item is created in the list.
    b. When an item is deleted – Flow execution starts when an item is deleted.

The above examples are a small subset of triggers provided by the respective connectors.

 

The Three Different Types of Triggers

 There are three different types of flows which can be created based on the type of trigger.

  1. Automatic Triggers:
    These triggers trigger automatic cloud flows. are triggered automatically when an event occurs.
    Example: When a new file is uploaded to a specific location in OneDrive.
  2. Manual Triggers:
    These triggers are used to trigger Instant Cloud Flows. These are the flows which are triggered manually with the click of a button or from a mobile phone. 
    Example: Sending an email on clicking a submit button in Power App.
  3. Scheduled Triggers:
    These triggers are used to trigger Scheduled Cloud Flows. These flows are triggered according to a pre-set schedule. We can configure the flow to run at a specific time on a specific day and also set the frequency of the flow execution.
    Example: Send birthday wishes.

 

A Simple Example of a Trigger in Action

 We will now try to understand more about triggers with a simple example for each type.

 

1. Creating an Automatically Triggered Flow in Power Automate

Let’s look a simple scenario of employee expense reimbursement in an organization.

We enter the expense details in a SharePoint list and integrate it with Power Automate to send out notification emails to the Accounts department.

We create an Automated cloud flow because we want the Accounts team to be notified whenever there is a request for reimbursement. So, in this case, the expense claim request is the trigger.

  1. Let us first create a list in SharePoint called ExpenseClaim to submit an expense request.

Steps on how to create a SharePoint list can be found here – /news-tips/sharepoint-lists/

The expense request list consists of the following columns

a. Title – Title for the request.

b. Amount – Expense amount.

c. Expense type – It can be one of the following – Travel, Food, Accommodation.

d. Approval Status – Status can be one of the below values:

    • Submitted – When a new request is submitted by the employee
    • Approved – When the manager approves the request. It is then sent to the Accounts team for releasing the payment.
    • Rejected – When the request is rejected by the manager.
    • Closed – When the payment is released by the accounts team.

 

  1. Next, create an Automated Cloud flow. Click on New flow and select Automated Cloud flow.

create an Automated cloud flow. image 1

  1. Enter the Flow Name, select When an item is created or modified of SharePoint connector. Click on Create.

create an Automated cloud flow. image 2

  1. In the trigger, select the Site Address which contains the ExpenseClaim list and the ListName.

create an Automated cloud flow. image 3

  1. Click on New step.

create an Automated cloud flow. image 4

  1. Click on Office 365 Outlook under the Standard tab.

create an Automated cloud flow. image 5

  1. Select Send an email (V2) under Actions tab.

create an Automated cloud flow. image 6

  1. Enter the Email Address to whom the notifications have to be sent in the To field. Enter the subject as Expense Claim Request. In the body, enter text as shown below. Formatting can be done using the tool pane.

create an Automated cloud flow. image 7

  1. Now let us assign dynamic values from the SharePoint item next to Title, Amount and Status.
    Place cursor after Title:. Select Title under Dynamic Content as shown below.

create an Automated cloud flow. image 8

Similarly, select Amount and Approval Status Value.

create an Automated cloud flow. image 9

  1. Click on Save.

create an Automated cloud flow. image 10

 

Testing the flow

Let us test the flow now.

  1. Click on Test. Select Manually and click on Test button.

Testing the flow. image 1

  1. Let us create a new expense request in the list as this is our trigger. Click on New in the ExpenseClaim list in SharePoint.

Testing the flow. image 2

  1. Enter Title, ExpenseType, Amount and ApprovalStatus as shown below. Click on Save.

Testing the flow. image 3

  1. As soon as you click on Save, the flow starts running.

Testing the flow. image 4

  1. The recipient will receive an email as shown below with the details of the Expense claim request created.

Testing the flow. image 5

  1. Let us modify the Amount and see what happens. Navigate to the list, click on the radio button next to the item and click on Edit.

Testing the flow. image 6

  1. Update the Amount value and click on Save.

Testing the flow. image 7

  1. Within a few minutes, the recipient will receive another email with the updated details.

Testing the flow. image 8

This way, whenever the item is modified, the flow is triggered automatically and the recipient receives an email with the updated details.

 

Trigger Settings

Assume that we want the email notification to be sent only when the status changes to Approved as the Accounts Team can reimburse the expense amount only after it is approved by the Manager. Let’s see how we can configure the trigger to accommodate this change.

  1. Open the flow in edit mode. Click on the ellipsis icon and click on Settings.

Trigger Settings. image 1

  1. You can see that there many options available.
    Note: Every trigger of every connector will have different setting options, which are applicable to that specific trigger. It could be different from the options seen here depending on the selected trigger.Let us now add a condition. Click on Add under Trigger Conditions.

Trigger Settings. image 2

  1. Enter the below formula –
    @equals(triggerOutputs()?[‘body/ApprovalStatus/Value’], ‘Approved’).Click on Done.

Trigger Settings. image 3

The formula verifies if the ApprovalStatus is equal to Approved. The flow will be triggered only if this condition evaluates to true.

  1. To test if this additional setting works, let us modify the Amount once again. Navigate to the list and edit the Amount.

Trigger Settings. image 4

  1. The recipient will not receive any email when the item is modified.
  2. Let us now change the ApprovalStatus to Approved. Navigate to the list item and update the ApprovalStatus to Approved. Click on Save.

Trigger Settings. image 5

  1. Now, the recipient receives an email. So, the Accounts team will receive email notifications only when they have to take an action i.e.; when the request is first approved by the Manager.

Trigger Settings. image 6

To conclude, even though any update to the item should have triggered the flow, it does not. This is because we had configured an additional trigger setting.

The flow triggers only when this additional condition also evaluates to true.

 

2. Creating an Instant or Manually Triggered Flow in Power Automate

Lets now look at the other types of trigger.

In this example, we will use Power Automate flow to capture user messages or responses from a Teams chat and store it in SharePoint.

  1. First, we will create a simple SharePoint list called Responses with 2 columns – Title and Response. We will store the user’s name in the Title column and their response in the Response column.

  1. Next, create an Instant Cloud Flow – Click on Instant Cloud Flow under New Flow.

Creating an Instant or Manually Triggered Flow in Power Automate. image 1

  1. Enter the Flow Name, select For a selected message (V2), click on Create.

Creating an Instant or Manually Triggered Flow in Power Automate. image 2

  1. Click on New step.

Creating an Instant or Manually Triggered Flow in Power Automate. image 3

  1. Click on Sharepoint under the Standard tab. Click on Create Item under Actions tab.

Creating an Instant or Manually Triggered Flow in Power Automate. image 4

  1. Select Site Address which contains the Responses list and select the List Name.

Creating an Instant or Manually Triggered Flow in Power Automate. image 5

  1. For Title, let us store the name of the user who sent the message. Click on Dynamic Content and select Sender User Display Name.

Creating an Instant or Manually Triggered Flow in Power Automate. image 6

  1. Similarly, for the Response field, select Message Content under Dynamic Content.

Creating an Instant or Manually Triggered Flow in Power Automate. image 7

  1. Click on Save.

Creating an Instant or Manually Triggered Flow in Power Automate. image 8

 

Testing the flow

Now that our flow is ready, let us open Teams. Consider that we are planning for a team outing and would like to know how many are willing to join.

  1. Send a message as shown below.

Testing the flow image 1

  1. Add a few Yes/ No replies to the post by clicking on Reply.

Testing the flow image 2

  1. For any one reply, click on ellipsis icon and then More Actions.

Testing the flow image 3

  1. We can see that the name of Power Automate flow we created CaptureResponses is visible. Click on the flow name. Here, by clicking on the flow name, we are manually triggering the flow.

Testing the flow image 4

  1. The following message is displayed.

Testing the flow image 5

  1. Let us now check the SharePoint list Responses. The user’s name and the response are successfully captured in the list.

Testing the flow image 6

In this way, we can capture all the users’ responses from Teams Chat to SharePoint list by manually triggering the flow on each user response.

 

3. Creating a Scheduled Flow in Power Automate

We will move on to the next type of flow – the scheduled flow. For this, let us send out a simple Hello email from Power Automate every 1 hour just to demonstrate how we can configure a scheduled flow.

  1. Click on Scheduled Cloud Flow under New Flow.

Creating a Scheduled Flow in Power Automate. image 1

  1. Enter a flow name. Click on Create for the time being as we can configure the schedule in detail in the next screen.

Creating a Scheduled Flow in Power Automate. image 2

  1. Under Recurrence, Click on Show Advanced Options.

Creating a Scheduled Flow in Power Automate. image 2

  1. Change the frequency to Hour.

Creating a Scheduled Flow in Power Automate. image 3

Select the appropriate TimeZone. If we want the flow to be scheduled to run after a specific day and time, we can set the value in StartTime.

Note: We can also set other frequencies such as Day, Week, Month and specify which days in particular we want the flow to run. Additionally, we can also configure a specific time in terms of hours and minutes.

  1. Next, we will add an action to send email. Click on New Step.

Creating a Scheduled Flow in Power Automate. image 4

  1. Click on Office 365 Outlook under the Standard tab.

Creating a Scheduled Flow in Power Automate. image 5

  1. Select Send an email (V2) under Actions tab.

Creating a Scheduled Flow in Power Automate. image 6

  1. Enter To field, Subject and Body as shown below.

Creating a Scheduled Flow in Power Automate. image 7

  1. Click on Save.

Creating a Scheduled Flow in Power Automate. image 8

  1. The recipient will start receiving emails every hour as scheduled.

Creating a Scheduled Flow in Power Automate. image 9

In this case, we can conclude that the flows are triggered based on a schedule that we have configured.

 

Troubleshooting Triggers in Power Automate

This section describes some of the commonly faced issues and how we can troubleshoot them.

  1. Flow did not work as expected – Power Automate provides details of the flows which ran in the past 28 days in the 28-Day History section. Click on All Runs.

Troubleshooting Triggers in Power Automate. image 1

By default, the Start time, duration for which the flow ran and the status of whether the flow run was successful or not is displayed. Here we can click on individual flow run and verify step by step if the outcome of every action is as expected.

We can also add additional columns by clicking on the Edit Columns link and then selecting the required columns. Finally, click on Save.

Troubleshooting Triggers in Power Automate. image 2

Troubleshooting Triggers in Power Automate. image 3

Alternately, we can also verify the complete sequence of actions by testing it manually.

a. In the edit flow screen, click on Test. Select Manually and click on Test so that the flow execution starts.

Troubleshooting Triggers in Power Automate. image 4

b. If prompted, for example, in case of an instant flow, click on Run flow button and then click on Done.

Troubleshooting Triggers in Power Automate. image 5

c. In case of automatically triggered flows, perform the trigger action to start the manual testing after        step a.

  1. Broken connection – In scenarios such as after a password change activity, some of the connections used in the flow might get broken.

a. To verify, click on Data, then click on Connections.

b. Check if any of the connections used in the failed flow are broken. If yes, click on Fix connection.

Troubleshooting Triggers in Power Automate. image 6

c. Enter credentials in the popup screen to fix the connection.

  1. Flow not getting triggered – Check if any additional trigger settings are configured. As we have seen in one of our examples, there might be additional condition(s) which are setup. Verify the condition and cross check if the trigger condition was met.

 

Conclusion

A trigger is the most important step when you are creating a Power Automate flow.

It is essential to correctly identify the type of trigger to be used based on your specific situation.

Hopefully from this article, the concept of Power Automate Triggers, different triggering options available and an understanding of when to use which trigger is clear.

About Ben Richardson

Ben is a director of Acuity Training which he has been running for over 10 years.


He is a Natural Sciences graduate from the University of Cambridge and a qualified accountant with the ICAEW.


He previously worked as a venture capitalist and banker and so had extensive experience with Excel from building financial models before moving to learn SQL, Microsoft Power BI and other technologies more recently.