Blob Inbound File Processing Pipeline
When a file is uploaded to an inbound Blob container, the flow validates the format, parses CSV/JSON/XML, loads rows to a SQL staging table, moves the file to processed/failed containers, and notifies the owner in Teams. Turns a Blob drop-zone into a governed ETL intake.
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 turns an Azure Blob Storage drop-zone into a governed, auditable ETL intake. A polling trigger fires once per file dropped into the inbound container; the flow reads the file, validates its format (CSV / JSON / XML), parses it, loads each row into a SQL staging table, moves the original to a processed or failed container (copy then delete), and posts the outcome to a Teams channel. Every file is tagged with a correlation id stamped on every SQL row and the notification.
Why it matters: manual file loads are slow and error-prone. An automated, auditable intake keeps data flowing reliably from partners and systems, quarantines bad files for review, and gives operations a single source of truth for what landed and when.
Ships Off (Stopped).
Use Case
Partners and upstream systems drop data files (CSV/JSON/XML) into a Blob container. Those files must be validated, parsed, and loaded into a database automatically, with successful files archived, malformed files quarantined, and the owning team notified of each outcome.
Flow Architecture
When a File Is Added or Modified
Azure Blob - OnUpdatedFiles_V2Fires once per new/updated file in the inbound container (polling 5 min, splitOn).
Initialize Trace & Config
Initialize variableMints a correlation id and binds the storage account, processed/failed containers, SQL server/database/table, Teams ids, the rows-loaded counter, the status (Processed), and the file extension.
Read & Decode File
Azure Blob GetFileContentByPath_V2 + ComposeReads the file bytes and base64-decodes them to UTF-8 text.
Check Supported Format
ConditionExtension in (csv/json/xml)? Branches to load vs quarantine.
Load Rows to SQL (supported)
Compose + Apply to each -> SQL ExecutePassThroughNativeQuery_V2Builds data rows (CSV: split + drop header; JSON/XML: whole doc), then per row builds and runs a safe INSERT into the staging table and increments the counter.
Archive / Quarantine + Notify
Azure Blob CopyFile_V2/DeleteFile_V2 + TeamsMoves the file to processed (success) or failed (unsupported) via copy-then-delete, then posts file name, status, rows loaded, and correlation id to the owner channel.
Environment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_BlobStorageAccount | String | flowlibsdemostorage | Blob dataset (storage account) for the trigger and all blob ops. |
| flowlibs_InboundContainer | String | inbound | Drop-zone container/folder (trigger folderId). |
| flowlibs_ProcessedContainer | String | processed | Success archive container. |
| flowlibs_FailedContainer | String | failed | Quarantine container for invalid files. |
| flowlibs_SqlServerName | String | your-server.database.windows.net | SQL server (dataset path segment). |
| flowlibs_SqlDatabaseName | String | FlowLibsDemoDB | SQL database (dataset path segment). |
| flowlibs_TargetTable | String | [dbo].[InboundFileStaging] | Fully-qualified SQL staging table. |
| flowlibs_TeamsGroupId | String | <your-team-id> | Teams team for the notification. |
| flowlibs_TeamsChannelId | String | <your-channel-id> | Teams channel for the notification. |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| Azure Blob Storage | shared_azureblob | OnUpdatedFiles_V2 GetFileContentByPath_V2 CopyFile_V2 DeleteFile_V2 |
| SQL Server | shared_sql | ExecutePassThroughNativeQuery_V2 |
| 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.
- Schema validation
- Replace the extension check with validation against an expected schema contract (required CSV headers, a JSON schema) and quarantine on mismatch.
- Typed loads
- Swap the generic staging INSERT for a typed PostItem_V2 or a fully-typed INSERT once the source schema is fixed.
- Robust CSV parsing
- For files with quoted commas or embedded newlines, add a parsing routine or route through a dataflow.
- Idempotency
- Dedupe re-uploads by checking the staging table for the file name + hash before loading.
- Partner SLAs
- Pair with a scheduled expected-file watchdog that alerts when a partner's daily file is missing.
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.01File extension
Drives validation and parse mode.
EXPR.02Decode blob to text
UTF-8 text for parsing.
EXPR.03CSV rows (drop header, strip CR)
Splits to rows and drops the header.
EXPR.04Move destination
Processed-container path for the copy.
Comments
Sign in to join the conversation.
Sign inNo comments yet. Be the first to share your experience with this flow.