Solution Import Approval Gate
Triggered on Dataverse solution import event to production environments. Pauses the import and routes an Approvals request to the COE lead with solution name, version, component count, and requesting user. On rejection, rolls back and notifies the developer. On approval, completes import and posts a Teams changelog.
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
The Solution Import Approval Gate is an Advanced-level governance flow that acts as a post-import checkpoint for Dataverse solution deployments. When a new solution is imported into the target environment, this flow automatically triggers, gathers solution metadata (name, version, component count, importing user), and routes a formal approval request to the COE lead. On approval, a changelog notification is posted to Teams. On rejection, the imported solution is automatically deleted and the developer receives an email with the rejection reason and guidance for resubmission.
Use Case
Organizations with multiple makers deploying solutions to shared or production environments need a governance mechanism to prevent unauthorized or untested solutions from persisting. This flow provides that gate — every solution import is reviewed before it remains in the environment. It enforces the principle that no solution should exist in production without explicit COE approval, and gives the COE lead full context (solution name, version, component count, who imported it) to make an informed decision.
Flow Architecture
When a Solution Is Imported
Dataverse SubscribeWebhookTriggerWebhook trigger fires when a new solution record is created in the `solution` entity (scope: Organization). Captures all solution imports across the environment.
5x Parallel Initialize Variable
Initialize variable (parallel branches)Binds environment variables to runtime variables: varTeamsGroupId ← flowlibs_TeamsGroupId; varTeamsChannelId ← flowlibs_TeamsChannelId; varCOELeadEmail ← flowlibs_COELeadEmail; varAdminEmail ← flowlibs_AdminNotificationEmail; varTargetEnvironment ← flowlibs_TargetEnvironmentName.
Get Solution Component Count
Dataverse ListRecordsLists records on the `solutioncomponents` entity, filtered by `_solutionid_value eq '{solutionId}'` from the trigger. Returns all components in the imported solution for counting.
Compose Approval Details
ComposeBuilds a styled HTML summary table with Solution Name, Unique Name, Version, Component Count, Imported By (user GUID), Import Date, and Environment Name. Used as the body of the approval request.
Start Import Approval
Approvals StartAndWaitForAnApprovalBasic approval type assigned to the COE Lead email. Includes the HTML details from the Compose step and sets the requestor to the admin email. The flow pauses here until the COE lead responds.
Check Approval Outcome
If conditionEvaluates whether `outcome == 'Approve'` on the approval response.
- Post Approved Changelog to Teams — Posts a styled HTML table to the configured Teams channel with solution name, version, component count, and who approved it. Serves as a deployment changelog.
Environment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_TeamsGroupId | String | <configure> | Teams group (team) ID where the approved changelog is posted. Replace with your governance Teams group GUID. |
| flowlibs_TeamsChannelId | String | <configure> | Teams channel ID within the configured group where the changelog is posted. |
| flowlibs_COELeadEmail | String | you@yourcompany.com | Email of the person who approves or rejects solution imports. |
| flowlibs_AdminNotificationEmail | String | admin@contoso.com | Recipient for rejection notification emails — typically the developer/admin who imported the solution. |
| flowlibs_TargetEnvironmentName | String | <your-tenant-id> | Display name (or environment ID) of the target environment, used for context in approval and changelog messages. |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| Microsoft Dataverse | shared_commondataserviceforapps | SubscribeWebhookTrigger (trigger — webhook on solution entity) ListRecords (component count) DeleteRecord (rollback on rejection) |
| Approvals | shared_approvals | StartAndWaitForAnApproval (COE gate) |
| Microsoft Teams | shared_teams | PostMessageToConversation (approved changelog) |
| Office 365 Outlook | shared_office365 | SendEmailV2 (rejection notification) |
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.
- Set Teams channel
- Update flowlibs_TeamsGroupId and flowlibs_TeamsChannelId to your governance Teams group and channel.
- Set COE Lead
- Update flowlibs_COELeadEmail to the person who should approve/reject solution imports.
- Set notification recipient
- Update flowlibs_AdminNotificationEmail to the team or individual who should receive rejection notices.
- Authorize connections
- Open the flow in the designer and authorize all four connections (Dataverse, Approvals, Teams, Outlook).
- Turn on
- Toggle the flow from Off to On — it will begin monitoring solution imports immediately.
- Scope control
- The Dataverse trigger scope is Organization-wide. To limit to specific publishers or solution prefixes, add a Condition action after the trigger to filter by uniquename prefix.
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.01Component count
Counts solution components returned by ListRecords.
EXPR.02Approval outcome check
Compared to the literal 'Approve' inside the If condition.
EXPR.03Null-safe field access
Prevents null reference on solution fields.
EXPR.04Rejection comments
Extracts approver feedback for the rejection email.
Comments
Sign in to join the conversation.
Sign inNo comments yet. Be the first to share your experience with this flow.