Environment Storage Capacity Alert
Scheduled flow checks storage usage across all environments via Power Platform for Admins V2. When any environment exceeds 80% capacity, posts a Teams adaptive card to the admin channel with drill-down details.
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 monitors Power Platform environment storage capacity across your tenant. It runs on a weekday schedule, retrieves tenant-wide capacity details via the Power Platform for Admins V2 connector, identifies any environments that exceed a configurable storage threshold (default 80%), and alerts administrators via both a Teams channel message and a detailed HTML email.
Use Case
Power Platform administrators need visibility into environment storage consumption before it becomes a problem. When environments approach their allocated storage limits, performance degrades, imports fail, and users experience errors. This flow provides proactive daily monitoring so admins can take action (archive data, increase allocation, or clean up unused records) before hitting hard limits.
Flow Architecture
Recurrence - Daily Morning
RecurrenceFires Monday through Friday at 8:00 AM Eastern. Configurable schedule via the trigger settings.
Init varTeamsGroupId
Initialize variableHydrates the Teams Group ID from the flowlibs_TeamsGroupId environment variable.
Init varTeamsChannelId
Initialize variableHydrates the Teams Channel ID from the flowlibs_TeamsChannelId environment variable.
Init varStorageThreshold
Initialize variableConverts the flowlibs_StorageCapacityThresholdPct string env var to an integer for comparison (default: 80).
Init varAdminEmail
Initialize variableHydrates the admin recipient email from flowlibs_AdminAlertRecipientEmail.
Get Tenant Capacity Details
Power Platform for Admins V2 - GetTenantCapacityDetailsCalls the Power Platform for Admins V2 connector's GetTenantCapacityDetails operation to retrieve storage capacity data for the entire tenant, broken down by environment.
Parse Capacity Response
Parse JSONParses the JSON response to extract the environmentCapacities array containing each environment's name, used storage (MB), allocated storage (MB), and usage percentage.
Filter Environments Over Threshold
Filter arrayFilters the array to only environments where storageUsedPercentage is greater than or equal to the threshold variable.
Check If Any Environment Over Threshold
If conditionEnvironment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_TeamsGroupId | String | <configure> | The M365 Group ID for the Teams team containing the admin alert channel. |
| flowlibs_TeamsChannelId | String | <configure> | The Channel ID within the Teams team for posting alerts. |
| flowlibs_StorageCapacityThresholdPct | String | 80 | The percentage threshold (0-100) that triggers an alert. |
| flowlibs_AdminAlertRecipientEmail | String | admin@contoso.com | Email address or distribution list for the detailed capacity report. |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| Power Platform for Admins V2 | shared_powerplatformadminv2 | GetTenantCapacityDetails (retrieves storage capacity per environment) |
| Microsoft Teams | shared_teams | PostMessageToConversation (posts alert to admin channel) |
| Office 365 Outlook | shared_office365 | SendEmailV2 (sends detailed HTML capacity 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.
- Update Environment Variables
- After importing the solution, navigate to the solution in make.powerautomate.com, open each environment variable, and set the Current Value for your tenant (Teams Group/Channel IDs, threshold percentage, admin email).
- Authorize Connections
- Open the flow in the designer, click on each connector action that shows 'Add an authorized connection', and sign in with an account that has Power Platform admin privileges.
- Adjust the Schedule
- The default is weekday mornings at 8:00 AM Eastern. Modify the Recurrence trigger to change frequency, days, or time zone.
- Change the Threshold
- Set flowlibs_StorageCapacityThresholdPct to any value 0-100. Lower values catch issues earlier; higher values reduce alert noise.
- Add Recipients
- Change flowlibs_AdminAlertRecipientEmail to a distribution list or semicolon-separated email addresses for broader notification.
- Turn On
- Once configured, toggle the flow from Off to On.
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.01Threshold conversion
Converts the string env var to integer for comparison.
EXPR.02Filter condition
Identifies environments over the threshold.
EXPR.03Alert count in subject
Dynamic count of breaching environments for the alert subject line.
EXPR.04HTML table composition
Uses concat() with Select output and join() to build an HTML table of environment capacity details.
Comments
Sign in to join the conversation.
Sign inNo comments yet. Be the first to share your experience with this flow.