New to Kestra?
Use blueprints to kickstart your first workflows.
Gate report distribution on a completed Power BI refresh with Kestra. Distribute only after the refresh succeeds and alert Slack when it is withheld.
Never distribute stale or half-refreshed reports. Sending a report while its dataset is mid-refresh, or after a refresh silently failed, is worse than sending nothing: recipients act on wrong numbers. This blueprint makes the refresh itself the gate. io.kestra.plugin.powerbi.RefreshGroupDataset runs with wait: true, so the flow only reaches the distribution step when Power BI has confirmed a completed refresh; a failed refresh stops the flow before anything leaves.
refresh_dataset (io.kestra.plugin.powerbi.RefreshGroupDataset) authenticates with the Azure AD service principal and triggers the refresh, polling every 10 seconds for up to 30 minutes. Because wait: true, a refresh that ends in a failed state fails the task, and Kestra's sequential execution means nothing after it runs. The gate needs no explicit condition, task failure is the gate.distribute_report (io.kestra.plugin.core.log.Log) stands in for the real distribution, for example a report export to PDF, an email send, or a subflow call that fans out to several recipient lists. It only ever executes on top of a verified refresh.notify records the successful send in Slack together with the refresh status, giving an audit trail that every distributed report sat on fresh data.errors block tells the team the gate closed: the refresh failed and distribution was deliberately withheld.Power BI subscriptions send on a schedule regardless of whether the last refresh worked. Kestra sequences the two operations with a verified wait in between, so ordering is guaranteed rather than assumed, the withheld case is alerted rather than silent, and every send is auditable against the refresh that preceded it.
groupId) and dataset id (datasetId) of the model behind the report.AZURE_TENANT_ID: Azure AD tenant id.AZURE_CLIENT_ID: Azure AD application (client) id.AZURE_CLIENT_SECRET: Azure AD client secret.SLACK_WEBHOOK_URL: Slack incoming webhook URL.groupId and datasetId with your workspace and dataset ids.distribute_report for your real export or email step.io.kestra.plugin.core.flow.Subflow, so one gated refresh feeds several recipient-specific distribution flows.