Get Alerted When a Power Automate Flow Stops Running, Not Just When It Fails

Most flow monitoring answers one question: did a run fail? That misses the worst case, where the flow doesn't run at all. A trigger that stops firing creates no failed run, no error and no notification. The flow just sits there with an empty run history, and the first person to notice is usually a user asking why the booking confirmation, approval or sync never happened.

This week alone the community forum had three separate threads where triggers that had worked for over a year quietly stopped. None of those flows failed, so failure alerts were never going to catch them. What catches them is a check that looks for missing runs: a heartbeat.

In this post I walk through that check with a scheduled flow that reads the Flow Run table in Dataverse and alerts you when a flow hasn't run within the window you expect.

Know when a flow goes silent

How it works

For solution-aware cloud flows, Power Automate writes run history into Dataverse. Each run becomes a row in the Flow Run (flowrun) table, an elastic table that also powers the automation center. Each row includes the start and end time, the status (Success, Failed or Cancelled), the trigger type and the Workflow Id of the flow that ran.

Because the run history is a normal Dataverse table, you can query it with the Dataverse connector like any other table. The heartbeat flow does exactly that:

  1. A Recurrence trigger runs the check on a schedule.
  2. List rows on Flow Runs asks for runs of one specific flow that started within the last N hours.
  3. If zero rows come back, the flow sends an alert.

The check runs on its own schedule, so it doesn't depend on whatever event has gone quiet in the flow you're watching.

You can see the table in the maker portal under Tables > Flow Run. In my dev environment it's already full of runs from my solution flows:

The Flow Run elastic table in the Power Apps maker portal, showing recent run rows

Prerequisites

  • The flow you want to watch must be in a solution. Only solution cloud flows, with their definitions in Dataverse, get their run history stored in the Flow Run table. If the flow lives outside a solution, add it to one first.
  • Run history in Dataverse must be turned on. In the Power Platform admin center, go to Environments > your environment > Settings > Product > Features, and check Cloud flow run history in Dataverse. The FlowRun entity time to live can be 28 days (the default), 14 days, 7 days or Disabled. If it's disabled, the table stays empty and the heartbeat alerts every time.
  • The watched flow's owner needs read access to the Flow Run table. The system writes each run row and assigns it to the flow's primary owner. If that owner can't read the table, the row isn't stored.
  • The heartbeat flow's Dataverse connection must be able to read those rows. Flow Run is user owned, so normal security roles apply. If someone else owns the watched flow, the connection account needs Flow Run read access beyond its own records.

Step 1: Find the Workflow Id of the flow to watch

The filter needs the flow's Workflow Id. The easiest place to get it is the Flow Run table itself:

  1. Open Tables > Flow Run in the maker portal.
  2. In Flow Run columns and data, open the + more column picker and add Workflow and Workflow Id.
  3. Find a row where Workflow shows the flow you care about, and copy its Workflow Id.

If the flow has no rows at all, check the prerequisites above before you go further. An empty history for a flow you know has run is a finding in itself.

Step 2: Create the heartbeat flow

Create a scheduled cloud flow, ideally in the same solution. Set the Recurrence to match how often the watched flow normally runs. For a flow that fires many times a day, check every few hours. For a once-a-day flow, check once a day, after it should have run.

If the watched flow only runs on business days, use a weekly recurrence with Monday to Friday selected. Otherwise your Monday morning will start with a false alarm.

Step 3: Query Flow Runs for recent runs

Add the Dataverse List rows action and set:

  • Table name: Flow Runs
  • Select columns: name,starttime,status
  • Filter rows: the filter below
  • Row count: 1 (you only need to know if at least one run exists)
workflowid eq '00000000-0000-0000-0000-000000000000'
and starttime ge @{addHours(utcNow(), -24)}

Replace the GUID with the Workflow Id from step 1, and use a window wider than the normal gap between runs. If the flow usually runs every 2 hours, a 6 hour window gives it slack without hiding a real outage for long.

Step 4: Alert when nothing came back

Add a Condition that checks whether the result is empty:

length(outputs('List_rows')?['body/value'])
is equal to 0

In the True branch, send the alert wherever your team actually looks: an email with Send an email (V2), a Teams message, or a row in your support queue. Include the flow name and the window in the message so whoever reads it knows what to check without opening the heartbeat flow.

Leave the False branch empty. A healthy flow should produce no noise.

Step 5 (optional): Catch repeated failures too

Since you're already querying the table, a second List rows with this filter counts failures in the same window:

workflowid eq '00000000-0000-0000-0000-000000000000'
and status eq 'Failed'
and starttime ge @{addHours(utcNow(), -24)}

That gives you one daily message that covers both "it stopped running" and "it keeps failing", instead of a failure email per run.

Watching more than one flow

Once the pattern works for one flow, don't copy the heartbeat flow ten times. Keep a small list of watched flows instead, with the Workflow Id, a friendly name and the maximum expected gap in hours for each. Then loop over the list with Apply to each and run the same List rows and Condition inside the loop, using each item's gap in the addHours expression. Adding a flow to the watch list becomes a data change, not a flow change.

Gotchas

  • Don't trigger on the Flow Run table. It's tempting to use When a row is added, modified or deleted on Flow Runs, but Microsoft explicitly advises against it because every flow run creates more rows and you get an infinite loop. Polling on a schedule is the safe pattern.
  • The run history isn't 100 percent lossless. The data stream that writes Flow Run rows isn't transactional, so a small number of runs can go missing during temporary service issues. When the heartbeat fires, confirm in the flow's run history in Power Automate, which is the lossless view, before you escalate.
  • Check the Flow Event table when the alert looks wrong. When run history ingestion is paused, for example because the time to live is set to zero, storage capacity was reached or an owner has no role on the table, Dataverse writes a signal into the Flow Event table. If every flow suddenly looks dead at once, look there first.
  • Run history uses Dataverse database capacity. If storage is tight, lower the time to live to 14 or 7 days rather than disabling it. The heartbeat only needs the last day or so.
  • Shared flows count against the primary owner. Run rows belong to the primary owner, and shared Flow Run records aren't supported, so permission problems usually trace back to that owner.

Wrapping up

Failure alerts tell you when something broke loudly. A heartbeat tells you when something broke quietly, which is the case that hurts more because nobody looks until a customer complains. The Flow Run table turns that check into one scheduled flow with a single query and a condition.

If you build this or extend it with your own watch list, I'd like to see how you set it up. Come and share it with the 365Connect Community, where we swap patterns like this one every week.

References

Comments