Solution Export & Backup Scheduler
Scheduled flow triggers a Dataverse solution export via HTTP action, compresses the output, and writes it to Azure Blob Storage with a date-stamped path. Lightweight ALM safety net for teams without full pipelines.
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 scheduled cloud flow that performs an unattended backup of a Dataverse solution on a weekly cadence. Each Monday at 02:00 Eastern, the flow calls ExportSolutionAsync, waits for the export job to complete, downloads the resulting .zip, uploads it to an Azure Blob Storage container with a date-stamped filename, and sends a success notification email. All runtime values (org URL, solution name, storage account, container, recipient) are parameterized as environment variables so the flow can be repointed at any tenant without edits.
Use Case
Enterprise Power Platform tenants frequently need offsite, version-stamped copies of Dataverse solutions for compliance, disaster recovery, or build-archive purposes. The standard Solution Checker and PDT backups only cover platform-level exports — they do not produce per-solution snapshots on a schedule. This flow closes that gap with a fully managed, connector-driven pattern that requires no Azure Functions, no service principals, and no custom hosting.
Flow Architecture
Recurrence Weekly Backup
Schedule - RecurrenceWeekly, Monday 02:00 Eastern Standard Time (frequency: Week, interval: 1, weekDays: [Monday], hours: [2], minutes: [0]).
Init varDataverseOrgUrl
Initialize variableSeeds the Dataverse organization URL from environment variable flowlibs_DataverseOrgUrl.
Init varSolutionUniqueName
Initialize variableSeeds the target solution unique name from environment variable flowlibs_SolutionUniqueName.
Init varStorageAccountUrl
Initialize variableSeeds the destination blob storage account URL from environment variable flowlibs_BackupStorageAccountUrl.
Init varContainerName
Initialize variableSeeds the blob container name from environment variable flowlibs_BackupContainerName.
Init varRecipientEmail
Initialize variableSeeds the notification recipient address from environment variable flowlibs_BackupRecipientEmail.
Init varTimestamp
Initialize variableBuilds a sortable timestamp token via utcNow('yyyy-MM-dd-HHmm') for use in the backup filename.
Compose StorageAccountName
ComposeParses the storage account short name out of the full URL using split(split(varStorageAccountUrl,'//')[1],'.')[0].
Start Export Solution Async
Dataverse - PerformUnboundActionWithOrganizationCalls the ExportSolutionAsync unbound action against the target Dataverse organization, returning an ExportJobId for the queued export.
Environment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_DataverseOrgUrl | String | <configure> | Base URL of the target Dataverse organization (e.g. https://orgXXXXXXXX.api.crm.dynamics.com). Shared FlowLibs env var reused across multiple FlowLibs flows. |
| flowlibs_SolutionUniqueName | String | YourSolutionUniqueNameHere | The internal unique name of the Dataverse solution to back up. Must exist in the target environment. |
| flowlibs_BackupStorageAccountUrl | String | https://yourstorageaccount.blob.core.windows.net | Full URL of the Azure Storage account that hosts the backup container. The Compose step parses the account short name from this value. |
| flowlibs_BackupContainerName | String | solution-backups | Name of the blob container the .zip is written to. Must exist before the first run. |
| flowlibs_BackupRecipientEmail | String | admin@your-tenant.onmicrosoft.com | Mailbox that receives the success notification email after each run. |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| Microsoft Dataverse | shared_commondataserviceforapps | PerformUnboundActionWithOrganization (ExportSolutionAsync + DownloadSolutionExportData) |
| Azure Blob Storage | shared_azureblob | CreateFile_V2 (writes the solution .zip to the backup container) |
| Office 365 Outlook | shared_office365 | SendEmailV2 (success 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 environment variable current values after import
- Open the imported solution and update the five environment variable current values (not the defaults) on the Environment Variables page. flowlibs_SolutionUniqueName must point at a solution that actually exists in the target tenant, and flowlibs_BackupStorageAccountUrl must correspond to a storage account where the signed-in Azure Blob connection has write access to the configured container.
- Change the backup cadence
- Edit the Recurrence trigger directly. Defaults are frequency: Week, interval: 1, weekDays: [Monday], hours: [2], minutes: [0], timeZone: Eastern Standard Time. Adjust any of these to fit your maintenance window.
- Handle long-running exports
- If export jobs for large solutions exceed two minutes, either raise the Delay action to a longer duration or replace it with a Do-Until loop that polls the export job status (via the GetSolutionExportStatus action) until completion before downloading.
- Repoint the destination storage
- To send backups to a different storage account or container, update flowlibs_BackupStorageAccountUrl and flowlibs_BackupContainerName. The Compose StorageAccountName step automatically re-derives the account short name from the URL, so no edits to the flow definition are needed.
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.01Backup timestamp token
Produces a sortable timestamp used in the backup filename so files sort chronologically in the container.
EXPR.02Parse storage account short name from URL
Strips the https:// prefix and the .blob.core.windows.net suffix to yield just the account name for the Azure Blob dataset parameter.
EXPR.03Read ExportJobId from async response
Pulls the async export job id from the Dataverse action's structured response for the subsequent DownloadSolutionExportData call.
EXPR.04Decode base64 export payload to binary
Decodes the base64-encoded solution export payload into binary so it can be written to blob storage as a real .zip file.
Comments
Sign in to join the conversation.
Sign inNo comments yet. Be the first to share your experience with this flow.