Budget Threshold Exceeded Alert
When a budget line item in Excel exceeds a threshold, push-notify the finance lead with the category, amount, and overage percentage.
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
FlowLibs - Budget Threshold Exceeded Alert is a scheduled cloud flow that scans an Excel Online budget table once a day, computes overage percent for each line item, and — for any line item whose actual spend exceeds the configured threshold over its budgeted amount — push-notifies the finance lead with the category, amount, and overage percent and emails a styled HTML breakdown to the same recipient. End-to-end first-party connector design: Excel Online (Business) for the data read, Notifications (shared_flowpush) for the mobile push, Office 365 Outlook for the email channel. Zero HTTP fallback, zero inline fixtures.
Use Case
Finance teams own multi-line budgets that drift over the course of the fiscal year. Catching overage early — before month-end close — turns a reconciliation surprise into a same-day decision. This flow runs every morning at 09:00 ET, reads the live budget worksheet, and only fires the alert path for line items past the configured flowlibs_BudgetOveragePercent threshold (default 10%). The mobile push gives the finance lead immediate awareness; the email gives them an audit trail and a deep link back to the dashboard.
Flow Architecture
Trigger
Recurrence (built-in)Daily, 09:00 Eastern Standard Time.
Init_varExcelDriveId
InitializeVariable (string)Hydrates the `flowlibs_BudgetExcelDriveId` env var.
Init_varExcelFileId
InitializeVariable (string)Hydrates the `flowlibs_BudgetExcelFileId` env var.
Init_varExcelTableName
InitializeVariable (string)Hydrates the `flowlibs_BudgetExcelTableName` env var.
Init_varBudgetOveragePercent
InitializeVariable (string)Hydrates the `flowlibs_BudgetOveragePercent` env var (default `"10"`).
Init_varFinanceLeadEmail
InitializeVariable (string)Hydrates the `flowlibs_FinanceLeadEmail` env var.
Init_varBudgetDashboardUrl
InitializeVariable (string)Hydrates the `flowlibs_BudgetDashboardUrl` env var.
Init_varOverageCount
InitializeVariable (integer)Counter for the downstream summary.
Init_varAlertHtmlRows
InitializeVariable (string)HTML row accumulator used to build the audit-table fragment.
List_Budget_Rows_From_Excel
Excel Online (Business) GetItemsReads every row of the configured budget table.
Environment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_BudgetExcelDriveId | String | <configure> | OneDrive/SharePoint drive identifier where the budget workbook lives. Set per tenant. |
| flowlibs_BudgetExcelFileId | String | <configure> | Workbook file identifier inside the drive. Set per tenant. |
| flowlibs_BudgetExcelTableName | String | <configure> | Excel table name to scan (e.g. `BudgetTable`). |
| flowlibs_BudgetOveragePercent | String | 10 | Overage percent threshold that triggers an alert (default `10` = 10% over budget). |
| flowlibs_FinanceLeadEmail | String | you@yourcompany.com | Email address of the finance lead to push-notify and email. |
| flowlibs_BudgetDashboardUrl | String | https://your-tenant.sharepoint.com | Dashboard URL the push notification deep-links to. |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| Excel Online (Business) | shared_excelonlinebusiness | GetItems (List rows present in a table) |
| Notifications | shared_flowpush | SendNotification (Mobile push to the Power Automate app) |
| 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.
- Alternate threshold logic
- Replace Compose_Overage_Percent with a different formula (e.g., absolute dollar overage) and update Check_If_Over_Budget accordingly. Keep the env var so the threshold remains configurable.
- Multi-channel routing
- Add Teams PostMessageToConversation after Send_Email_To_Finance_Lead to broadcast to a finance Teams channel. Add flowlibs_TeamsGroupId and flowlibs_TeamsChannelId env vars (commonly reused across the FlowLibs catalog).
- Approval workflow
- Wrap the True branch in Approvals.StartAndWaitForAnApproval so the finance lead can acknowledge or escalate the overage before the alert email is sent — useful for high-dollar overages where a second pair of eyes is required.
- Run-history visibility
- Append a final Compose action after the For Each that emits concat('Scanned ', length(body('List_Budget_Rows_From_Excel')?['value']), ' line items, ', variables('varOverageCount'), ' over threshold.') so the run history pane shows the daily summary at a glance.
- Multiple budgets
- For an org with multiple budgets (department-scoped), duplicate the solution and bind each copy to a different drive/file/table via env vars. Same flow body, different inputs.
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.01Overage percent (null-safe, divide-by-zero guarded)
Computes overage percent with null-safe `coalesce` calls and a divide-by-zero guard against the Budgeted column.
EXPR.02Threshold check (If condition)
The If predicate inside `Check_If_Over_Budget` — compares the computed overage percent to the configured threshold.
EXPR.03Push notification text
Single-line plain-text body for the mobile push; the deep link is supplied via the separate `notificationLink/uri` parameter.
Comments
Sign in to join the conversation.
Sign inNo comments yet. Be the first to share your experience with this flow.