HttpFunction icon
Publish icon
CreateRun icon
TeamsIncomingWebhook icon
Trigger icon

Chain Blob Storage, an Azure Function, Service Bus, and Data Factory

Trigger on a new Azure Blob, transform it with an Azure Function, publish to Service Bus, then run a Data Factory pipeline, all in one Kestra execution.

Categories
CloudInfrastructure

Stop stitching Logic Apps between every pair of Azure services. This blueprint reacts to a new file landing in Blob Storage, calls an Azure Function to validate and reshape it, publishes the result to a Service Bus queue for any downstream subscriber, and kicks off a Data Factory pipeline for the heavier processing, all as one Kestra execution. It closes a real gap in Azure orchestration: Blob events, Functions, Service Bus, and Data Factory each have their own trigger and monitoring surface, so chaining all four today usually means a Logic App or a Function whose only job is to call the next service.

How it works

  • io.kestra.plugin.azure.storage.blob.Trigger polls the incoming container under the orders/ prefix every PT1M and moves processed files to archive/orders/ so they are not reprocessed.
  • io.kestra.plugin.azure.function.HttpFunction calls an Azure Function (TransformOrder) over HTTP with the blob's container and name, and returns the transformed payload.
  • io.kestra.plugin.azure.servicebus.Publish sends the transformed payload to the orders-transformed Service Bus queue as JSON, so any number of downstream subscribers can pick it up independently of this flow.
  • io.kestra.plugin.azure.datafactory.CreateRun triggers the process_transformed_orders Data Factory pipeline and waits for it to reach a terminal state by default.
  • io.kestra.plugin.microsoft365.teams.TeamsIncomingWebhook posts the blob name and the Data Factory run ID to a Teams channel via an Adaptive Card.

What you get

  • One execution ID spanning Blob, Functions, Service Bus, and Data Factory.
  • Per-step retries, so a transient Function timeout does not restart the whole chain.
  • Fan-out to Service Bus subscribers without adding subscriber-specific logic to this flow.
  • Full lineage from the source file to the Data Factory run ID.

Who it's for

  • Platform teams replacing a Logic App or glue Function with a single declarative flow.
  • Data engineers who need one audit trail across storage, compute, and messaging.
  • Teams standardizing how services get wired together across an Azure estate.

Why orchestrate this with Kestra

Native Blob events, Function bindings, and Data Factory triggers each stop at their own boundary; getting all four services to work as one pipeline today means a Logic App connector for every hop, each with its own retry settings and no shared execution history. Kestra treats the whole chain as one flow: retries are per task, the Service Bus publish and the Data Factory run share the same execution ID as the original blob event, and the Teams notification reports on the outcome of the entire chain, not just the last hop.

Prerequisites

  • A Storage account with an incoming container.
  • An Azure Function App with a TransformOrder HTTP-triggered function.
  • A Service Bus namespace with an orders-transformed queue.
  • A Data Factory with a process_transformed_orders pipeline.
  • A Microsoft Teams incoming webhook.

Secrets

  • AZURE_STORAGE_ACCOUNT, AZURE_CONNECTION_STRING: Blob Storage account and connection string.
  • AZURE_FUNCTION_APP, AZURE_FUNCTION_CODE: Function App name and function key.
  • AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET: Service principal used for Service Bus and Data Factory.
  • AZURE_SUBSCRIPTION_ID, AZURE_RESOURCE_GROUP, ADF_FACTORY_NAME: Data Factory location.
  • TEAMS_WEBHOOK: Microsoft Teams incoming webhook URL.

Quick start

  1. Add the secrets above to your Kestra namespace.
  2. Point the blob_landed trigger at your storage account and container.
  3. Set the Function URL, Service Bus queue name, and Data Factory pipeline to match your resources.
  4. Drop a file into orders/ and confirm it flows through Function, Service Bus, and Data Factory.

How to extend

  • Add an io.kestra.plugin.core.flow.If after transform to branch on validation failures before publishing.
  • Swap TeamsIncomingWebhook for Slack or PagerDuty depending on which channel owns Azure alerts.
  • Add a second Service Bus topic subscription for a different consumer team.
  • Chain the Data Factory output into a Microsoft Fabric pipeline for further Lakehouse processing.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.