Data Factory Trigger from Business Event
When a business event occurs — a Dataverse record reaches a state, a file arrives, or an approval completes — the flow starts the right Azure Data Factory pipeline with parameters, waits for completion, and writes results back to the originating record. Bridges business processes to data 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
This flow bridges business processes to data pipelines in Azure Data Factory. When a business event occurs — a Dataverse record reaches a state, a file arrives, or an approval completes — it starts the right pipeline with parameters, waits for completion, and writes results back to the originating record. Data pipelines are usually time-triggered and disconnected from business events; event-driven runs make data processing responsive to what the business is actually doing.
Use Case
A business action (for example month-end close, or a new dataset being approved) needs to kick off a data pipeline and have its outcome reflected back on the record that started it. The event-to-pipeline map lets one flow route many event types to the right pipeline without logic changes.
Flow Architecture
When Business Event Occurs
Dataverse / Approvals / file triggerFires on a Dataverse record state change, an approval completion, or a file arrival.
Build Parameters
ComposeAssembles the pipeline run inputs from the business context.
Run Pipeline & Wait
Azure Data Factory - CreateRunStarts the mapped pipeline via CreateRun and polls GetPipelineRun until the run completes.
Write Back Result
Dataverse - UpdateRecordWrites the run result/status back onto the originating record.
Environment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_EventPipelineMap | String | {"<event>":"<pipelineName>"} | JSON map of business event key to Data Factory pipeline name. |
| flowlibs_DataFactoryName | String | REPLACE_WITH_DATA_FACTORY | Azure Data Factory instance that owns the pipelines. |
| flowlibs_ResultField | String | flowlibs_runresult | Dataverse column the pipeline result/status is written back to. |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| Azure Data Factory | shared_azuredatafactory | CreateRun GetPipelineRun |
| Microsoft Dataverse | shared_commondataserviceforapps | UpdateRecord |
| Microsoft Teams | shared_teams | PostMessageToConversation |
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.
- Idempotency
- Guard against duplicate runs per event (e.g. a processed flag or a run key) so the same business event does not start the pipeline twice.
- Timeout
- Handle long-running pipelines with a polling timeout and a failure branch so the record is not left in a pending state.
- Result detail
- Store richer pipeline output such as row counts or output paths alongside the status for downstream reporting.
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.01Pipeline lookup
Resolves the pipeline name for the current event from the JSON map env var.
Comments
Sign in to join the conversation.
Sign inNo comments yet. Be the first to share your experience with this flow.