New to Kestra?
Use blueprints to kickstart your first workflows.
Mirror Kestra flows to Git safely. Generate a dry-run diff, notify your team, pause for human approval, then push the reviewed flows to the repo.
Push your Kestra flows to a Git repository without ever committing an unreviewed change. This blueprint mirrors flows from a namespace to a Git repo using a safe two-phase pattern: it generates a dry-run diff, alerts your team in Microsoft Teams, pauses for a human to inspect exactly what will change, then performs the real push only after approval. It solves the classic GitOps problem where automated flow exports silently overwrite or delete definitions in your Git mirror, giving you human-in-the-loop control over your source of truth.
dry_run task (io.kestra.plugin.git.PushFlows with dryRun: true) computes the diff between the flows in sourceNamespace and the main branch of your repository under the _flows directory, including child namespaces, without writing anything.notify_review task (io.kestra.plugin.microsoft365.teams.TeamsIncomingWebhook) posts an adaptive card to Teams announcing that a diff is waiting, with the namespace and execution id.review task (io.kestra.plugin.core.flow.Pause) suspends the execution for up to approval_timeout (default PT1H) so a person can inspect the diff.push task (io.kestra.plugin.git.PushFlows with dryRun: false) commits and pushes the flows with a timestamped commitMessage.nightly_export schedule trigger (io.kestra.plugin.core.trigger.Schedule, cron 0 18 * * *, disabled by default) runs the reviewed export every evening.Git itself has no scheduler, no approval gate, and no notion of orchestrated steps. Kestra adds event and schedule triggers, a built-in Pause for human approval, retries on transient failures, full execution lineage over every export, and a declarative YAML definition you can version alongside the flows themselves. The dry-run-then-push pattern, the Teams alert, and the timed approval window are things a bare git push or a cron job simply cannot coordinate.
GIT_USERNAME: Git HTTP username.GIT_TOKEN: Git HTTP token or password with write access to the repository.TEAMS_WEBHOOK_URL: Microsoft Teams incoming webhook URL for the review notification.GIT_USERNAME, GIT_TOKEN, and TEAMS_WEBHOOK_URL as secrets in your Kestra namespace.repository and source_namespace inputs at your repo and namespace.review Pause to push.nightly_export trigger to run the reviewed export on a schedule.gitDirectory, or set includeChildNamespaces: false to scope a single namespace.review Pause for a fully unattended export once you trust the diff.