ADO Build Duration Trend Monitor
Triggered on build pipeline completion. Logs build duration to a tracking list and calculates a rolling 14-day average. When a build takes 50%+ longer than the rolling average, posts a Teams alert to the DevOps channel flagging potential build degradation with pipeline name, duration, and trend comparison. Sends a weekly Outlook trend report.
Provided as-is, without warranty of any kind. Review and test each pattern in a non-production environment before deploying it to live automations. See our Terms.
Overview
A scheduled daily flow that monitors Azure DevOps build pipeline durations, logs them to a SharePoint tracking list, calculates a 14-day rolling average, and alerts the DevOps team when any build takes 50%+ longer than the average. Sends a weekly trend report every Monday via Outlook.
Use Case
Build pipelines degrade silently over time — a test suite grows, a dependency mirror slows down, or a cache expires. Without trend monitoring, teams don't notice until builds block the sprint. This flow provides early warning by comparing each build's duration against the historical baseline and alerting when performance degrades beyond a configurable threshold.
Flow Architecture
Recurrence Daily Build Check
RecurrenceRuns daily at 7:00 AM EST to kick off the build duration trend check.
Init varAdoOrganization
Initialize VariableLoads the ADO organization name from the flowlibs_AdoOrganization environment variable.
Init varAdoProject
Initialize VariableLoads the ADO project name from the flowlibs_AdoProject environment variable.
Init varSharePointSiteURL
Initialize VariableLoads the SharePoint site URL from the flowlibs_SharePointSiteURL environment variable.
Init varBuildDurationListId
Initialize VariableLoads the Build Duration Tracker SharePoint list GUID from the flowlibs_BuildDurationListId environment variable.
Init varTeamsGroupId
Initialize VariableLoads the Teams group ID from the flowlibs_TeamsGroupId environment variable.
Init varTeamsChannelId
Initialize VariableLoads the Teams channel ID from the flowlibs_TeamsChannelId environment variable.
Init varAlertEmailRecipient
Initialize VariableLoads the alert email recipient from the flowlibs_AlertEmailRecipient environment variable.
Init varThresholdPercent
Initialize VariableConfigurable threshold percentage (default 50) — a build that exceeds the rolling average by this percent triggers an alert.
Environment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_AdoOrganization | String | your-org | Azure DevOps organization name. |
| flowlibs_AdoProject | String | FlowLibs | Azure DevOps project name. |
| flowlibs_SharePointSiteURL | String | https://your-tenant.sharepoint.com | Root SharePoint site that hosts the Build Duration Tracker list. |
| flowlibs_BuildDurationListId | String | 05a2f452-a866-4e88-8efb-1414e5d34d0a | GUID of the SharePoint list used to log per-build durations. |
| flowlibs_TeamsGroupId | String | — | Microsoft Teams group ID that owns the DevOps alert channel. |
| flowlibs_TeamsChannelId | String | — | Microsoft Teams channel ID for posting degradation alerts. |
| flowlibs_AlertEmailRecipient | String | alerts@yourcompany.com | Email address that receives the weekly Outlook trend report. |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| Azure DevOps | shared_visualstudioteamservices | HttpRequest (Fetches build pipeline data) |
| SharePoint Online | shared_sharepointonline | CreateItem (Logs build durations) GetItems (Queries 14-day historical data) |
| Microsoft Teams | shared_teams | PostMessage (Posts degradation alerts to the DevOps channel) |
| Office 365 Outlook | shared_office365 | SendEmailV2 (Sends the weekly trend report) |
Note — All connections are referenced as solution connection references; the flow is portable between environments as long as a connection is mapped at import time.
Customization Guide
Almost every realistic variant of this flow can be implemented by changing environment variable values. A few cases require small edits inside the flow definition — those are called out explicitly below.
- Deploy in your environment
- Import the solution into the target environment, configure connection references for ADO, SharePoint, Teams, and Outlook, update each environment variable, and turn on the flow.
- Adjust the alert threshold
- Edit the Init_varThresholdPercent action — default is 50, meaning a build 50% above the rolling average triggers an alert. Lower for stricter monitoring, raise for less noise.
- Change the report schedule
- Modify the Recurrence trigger for different run times, or change dayOfWeek(utcNow()) = 1 in the weekly report condition to a different day (0=Sunday, 6=Saturday).
Key Expressions
The flow is intentionally light on Power Fx / WDL gymnastics — the heaviest expressions are the branch-name concatenation and the approval outcome check. They are listed below in the order they appear in the flow.
EXPR.01Build duration in minutes
Converts the difference between finishTime and startTime from .NET ticks to minutes.
EXPR.02ADO minTime — last 24 hours
Used as the minTime query parameter on the Azure DevOps builds API.
EXPR.03SharePoint filter — 14-day window
Filters Get items to records from the last 14 days for the rolling average.
EXPR.04Threshold ceiling from rolling average
(1 + threshold%) × rolling average. Any recent build that exceeds this triggers the Teams alert.
EXPR.05Monday check for weekly report
True only on Mondays — gates the weekly Outlook trend report.
Comments
Sign in to join the conversation.
Sign inNo comments yet. Be the first to share your experience with this flow.