Google Sheets Threshold Alerting
On a schedule, the flow scans a Google Sheet's metric columns against configurable thresholds (low stock, over budget, KPI miss, expiring items), and for each breach posts a Teams alert and emails the owner with the row details. Turns a passive Google Sheet into an active monitoring source.
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
This flow turns a passive Google Sheet tracker into an active monitor. On a daily schedule it reads every row of a worksheet, compares a configurable numeric metric column against a threshold, and for each breaching row posts a Microsoft Teams alert and emails the row owner (with a fallback recipient).
Why it matters: Numbers sitting in a sheet don't notify anyone. Threshold scanning surfaces problems - low stock, over-budget spend, KPI misses, expiring items - early, without anyone watching the tab.
Status: Built via the FlowLibs API-first pipeline. Ships Off (demo). Going live requires only authorizing the three connections and setting the environment-variable values.
Use Case
A team tracks stock levels, budgets, or KPIs in a Google Sheet and wants automatic alerts whenever a value crosses a limit. Set the metric column, the threshold, and whether a breach is Below or Above the limit - the flow does the rest on a schedule.
Flow Architecture
Run Daily At 0700
Recurrence (Day/1, 07:00 UTC)Scan cadence.
Initialize Threshold
Initialize Variable (Float = 10)Numeric limit to compare against.
Initialize Comparison Direction
Initialize Variable (String = "Below")Breach direction: Below or Above.
Initialize Fallback Email
Initialize Variable (String)Recipient when a row has no owner.
Initialize Metric Column Name
Initialize Variable (flowlibs_MetricColumn)Column header holding the metric.
Initialize Owner Column Name
Initialize Variable (flowlibs_OwnerColumn)Column header holding the owner email.
Initialize Breach Count
Initialize Variable (Integer = 0)Running tally of breaches.
Get Rows From Google Sheet
Google Sheets GetItemsReads all rows from the worksheet.
Apply to each Row
Foreach (concurrency = 1)Iterates each row.
Parse Metric Value
ComposeSafely converts the metric cell to a number (blank becomes 0).
Check If Metric Breaches Threshold
Condition (If)True on Below+under or Above+over.
Environment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_GSheetId | String | <configure> | Google Sheet spreadsheet (file) ID. |
| flowlibs_GSheetTab | String | Sheet1 | Worksheet / tab name. |
| flowlibs_MetricColumn | String | Stock | Header name of the numeric metric column. |
| flowlibs_OwnerColumn | String | Owner | Header name of the owner-email column. |
| flowlibs_TeamsGroupId | String | <your-team-id> | Target Teams team/group ID. |
| flowlibs_TeamsChannelId | String | <your-channel-id> | Target Teams channel ID. |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| Google Sheets | shared_googlesheet | GetItems |
| Microsoft Teams | shared_teams | PostMessageToConversation |
| Office 365 Outlook | shared_office365 | SendEmailV2 |
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.
- Multi-rule scanning
- Duplicate the metric column / threshold / comparison set to monitor several columns in one pass (e.g. low stock and over budget).
- Digest mode
- Instead of per-row alerts, collect breaches into an array and send one summary Teams message / email using the breach count.
- De-duplication
- Write a last-alerted timestamp back to the sheet (Google Sheets PatchItem) so the same breach isn't re-alerted every day.
- Faster cadence
- Change the Recurrence to hourly or every 15 minutes for fast-moving inventory.
- Severity routing
- Branch on how far the value is past the threshold to escalate (e.g. email manager when stock hits zero).
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.01Safe metric parse
Converts the metric cell to a number, treating blank as 0.
EXPR.02Breach test
True when the value breaches in the configured direction.
EXPR.03Owner-or-fallback recipient
Uses the row owner, falling back to the configured fallback email.
EXPR.04Dynamic column read by name
Reads a row cell whose header is supplied by an environment variable.
Customize & download
Generate a ready-to-import copy of this solution with your environment-variable values baked in — available on Base, Pro, or Team.
Upgrade to customize
Comments
Sign in to join the conversation.
Sign inNo comments yet. Be the first to share your experience with this flow.