Dataverse Table Row Count Growth Monitor
Daily scheduled flow queries row counts for key Dataverse tables and writes them to a growth-tracking table. When any table's growth rate projects it will exceed 80% of its storage allocation within 30 days, posts a Teams capacity warning to the admin channel with the table name, current count, and projected full date.
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 daily scheduled flow that monitors row counts across key Dataverse tables and projects future storage capacity. When any table's growth rate indicates it will exceed a configurable threshold (default 80%) within a projection window (default 30 days), the flow posts a formatted capacity warning to a Teams admin channel with table name, current count, usage percentage, growth rate, and projected breach date.
Use Case
Proactive storage governance — catch runaway table growth before it impacts org capacity limits, giving admins time to archive, clean up, or request additional storage.
The flow is ideal for teams that:
- IT admins responsible for Dataverse capacity and storage governance
- Teams managing large Dataverse tables (cases, accounts, contacts) at risk of hitting capacity limits
- Organizations that need proactive alerts before storage breaches impact users
- Admins who want a daily snapshot history for audit and trend analysis
Flow Architecture
Recurrence Daily 6AM
RecurrenceRuns once per day at 6:00 AM Eastern.
Initialize varMonitoredTables
Initialize variableComma-separated Dataverse table logical names, sourced from the flowlibs_DvMonitoredTables environment variable.
Initialize varGrowthTrackingTable
Initialize variableLogical name of the snapshot tracking table, sourced from the flowlibs_DvGrowthTrackingTable environment variable.
Initialize varStorageThresholdPct
Initialize variablePercentage threshold for alerting (e.g. 80), sourced from the flowlibs_DvStorageThresholdPct environment variable.
Initialize varProjectionDays
Initialize variableProjection window in days (e.g. 30), sourced from the flowlibs_DvProjectionDays environment variable.
Initialize varTeamsGroupId
Initialize variableTeams team ID for posting alerts, sourced from the flowlibs_AdminTeamsGroupId environment variable.
Initialize varTeamsChannelId
Initialize variableTeams channel ID for posting alerts, sourced from the flowlibs_AdminTeamsChannelId environment variable.
Initialize varAlertRows
Initialize variableAccumulator array used to collect tables that breach the configured threshold.
Initialize varMaxRowEstimate
Initialize variableEstimated max row capacity per table (configurable, default 500,000) used as the denominator for usage percentage calculations.
Environment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_DvMonitoredTables | String | account,contact,incident | Comma-separated list of Dataverse table logical names to monitor. |
| flowlibs_DvGrowthTrackingTable | String | flowlibs_dvrowcountsnapshot | Logical name of the custom Dataverse table for storing daily snapshots. |
| flowlibs_DvStorageThresholdPct | String | 80 | Percentage of estimated capacity that triggers an alert. |
| flowlibs_DvProjectionDays | String | 30 | Number of days used for the growth projection window. |
| flowlibs_AdminTeamsGroupId | String | <configure> | Teams team (group) ID for the admin channel — set this to your Teams group GUID. |
| flowlibs_AdminTeamsChannelId | String | <configure> | Teams channel ID for posting capacity warnings — set this to your channel ID. |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| Microsoft Dataverse | shared_commondataserviceforapps | ListRecords (FetchXML count + historical snapshots) CreateRecord (daily snapshot) |
| Microsoft Teams | shared_teams | PostMessageToConversation (capacity warning) |
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.
- Create the growth-tracking Dataverse table
- Create flowlibs_dvrowcountsnapshot (or your preferred name) with columns flowlibs_tablename (Single Line of Text) for the monitored table's logical name, flowlibs_rowcount (Whole Number) for the daily count, flowlibs_snapshotdate (Date and Time) for the timestamp, and a primary name column flowlibs_name for a descriptive label like 'account - 2026-04-12'.
- Update environment variable current values
- Set flowlibs_DvMonitoredTables to your comma-separated list of tables, flowlibs_DvGrowthTrackingTable to your tracking table's logical name, and flowlibs_AdminTeamsGroupId / flowlibs_AdminTeamsChannelId to your admin channel. Adjust flowlibs_DvStorageThresholdPct and flowlibs_DvProjectionDays as needed.
- Authorize connections
- Open the flow in the designer and authorize the Dataverse and Teams connections so the daily run can read counts, write snapshots, and post to the admin channel.
- Adjust varMaxRowEstimate
- The default is 500,000 rows. Edit the Initialize Variable action to match your org's per-table storage allocation so the usage percentage and projection math reflect your real capacity.
- Turn the flow on
- After the tracking table, env vars, and connections are in place, turn the flow on so the daily 6 AM run begins capturing snapshots.
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.01FetchXML aggregate count
Builds the dynamic FetchXML used by ListRecords to count rows in each monitored table; createdon is used because it exists on every Dataverse table.
EXPR.02Daily growth rate
Average daily growth derived from the historical snapshot window (default 14 days).
EXPR.03Days to threshold
Projects days until the table reaches the configured threshold percentage; returns 9999 when growth is flat or negative.
EXPR.04HTML table unwrap (Select to string)
Strips the JSON wrapping from a Select action so its rendered HTML rows can be concatenated into the Teams message body.
Comments
Sign in to join the conversation.
Sign inNo comments yet. Be the first to share your experience with this flow.