Environment Inventory Weekly Digest
Scheduled weekly flow that lists all environments via Power Platform for Admins V2, enriches with owner info from Office 365 Users, and delivers a formatted HTML digest email to admins.
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 provides IT Admins with a weekly email digest of all Power Platform environments in the tenant. It queries the Power Platform for Admins V2 connector to enumerate every environment, builds a formatted HTML table with key metadata (name, SKU/type, creator, creation date, and management state), and emails the report via Office 365 Outlook.
Use Case
COE admins and IT governance teams need visibility into environment sprawl — new environments spun up by makers, sandbox environments left abandoned, and production environments approaching limits. This weekly digest replaces manual PPAC checks with an automated email landing in the admin's inbox every Monday morning.
Flow Architecture
Weekly Recurrence
RecurrenceFires every Monday at 8:00 AM EST.
Initialize varAdminEmail
InitializeVariableReads the flowlibs_AdminEmailAddress environment variable into a string variable.
Initialize varHtmlRows
InitializeVariableEmpty string used to accumulate the HTML table rows built inside the loop.
Initialize varEnvironmentCount
InitializeVariableInteger counter starting at 0; incremented once per environment.
List All Environments
OpenApiConnectionCalls Power Platform for Admins V2 ListEnvironmentsForUser (api-version 2021-04-01) to enumerate every environment in the tenant.
Loop Through Environments
ForeachFor each environment in body.value from List All Environments: increments the environment counter, builds an HTML table row (displayName, environmentSku, createdBy, createdTime, management state) via Compose, and appends that row to varHtmlRows.
Compose Full Email Body
ComposeWraps the accumulated rows in a styled HTML table with a header, timestamp, and total environment count.
Send Digest Email
OpenApiConnectionOffice 365 Outlook SendEmailV2 sends the composed HTML digest to the address stored in varAdminEmail.
Environment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_AdminEmailAddress | String | admin@yourcompany.com | Recipient of the weekly digest email. Set this to the mailbox (or distribution list) that should receive the environment inventory report. |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| Power Platform for Admins V2 | shared_powerplatformadminv2 | ListEnvironmentsForUser (Enumerates every environment in the tenant) |
| Office 365 Outlook | shared_office365 | SendEmailV2 (Sends the HTML digest email) |
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.
- Change recipient
- Update the flowlibs_AdminEmailAddress environment variable current value in the solution to point at a different mailbox or distribution list.
- Change schedule
- Edit the Weekly Recurrence trigger to adjust the frequency, day of week, and time of day at which the digest is sent.
- Add columns
- Modify the Build HTML Table Row compose action to include additional environment properties such as linkedEnvironmentMetadata or retentionPeriod.
- Filter environments
- Add a Condition or Filter Array after List All Environments to exclude sandbox or developer environments by SKU type before they are rendered into the digest.
- Add CC/BCC
- Modify the Send Digest Email action to include additional recipients on the CC or BCC lines for broader distribution.
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.01HTML table row builder
Used inside the Loop Through Environments foreach to assemble one HTML <tr> per environment, coalescing missing displayName values to 'N/A'.
EXPR.02Dynamic email subject
Builds the Send Digest Email subject line so it includes today's date and the total environment count.
EXPR.03Environment variable reference
Used in Initialize varAdminEmail to read the current value of the flowlibs_AdminEmailAddress environment variable.
Comments
Sign in to join the conversation.
Sign inNo comments yet. Be the first to share your experience with this flow.