New to Kestra?
Use blueprints to kickstart your first workflows.
Automatically purge the Cloudflare zone cache when a deployment goes healthy, verify the site serves fresh content, and notify Slack, with Kestra.
Stale CDN cache is the silent failure of an otherwise green deployment: the release ships, health checks pass, yet users keep hitting old HTML, JavaScript, and assets served from Cloudflare edge nodes. This blueprint closes that gap by turning a deploy-healthy event into an automatic Cloudflare cache purge, a fresh-content verification, and a Slack notification, so the cache is invalidated the instant a new release is live instead of waiting on TTL expiry or a manual purge.
io.kestra.plugin.core.trigger.Webhook trigger named deploy_healthy listens for an HTTP call from your CD system (for example Argo CD reporting Healthy). The webhook is guarded by a secret key.purge_cache task (io.kestra.plugin.cloudflare.cache.Purge) purges the entire zone with purgeAll: true for the zoneId passed in, using an apiToken injected through pluginDefaults.verify_site task (io.kestra.plugin.core.http.Request) issues a GET against verify_url to confirm the site is serving after the purge.notify task (io.kestra.plugin.slack.notifications.SlackIncomingWebhook) posts a message reporting the purged zone and the HTTP status code returned by the verification probe.outputs.verify_site.code confirming the site responds post-purge.Cloudflare itself has no concept of "a deployment just finished," so its cache only clears on TTL or a manual API call. Kestra bridges that gap with an event-driven Webhook trigger, automatic retries on transient API failures, full execution lineage and logs for every purge, and a declarative YAML definition you version alongside your infrastructure. The purge, verification, and notification become one observable, replayable pipeline rather than a fragile post-deploy script.
A CD system (Argo CD, GitHub Actions, GitLab CI, or similar) able to POST to the Kestra webhook URL when a deploy reaches a healthy state, and a Cloudflare zone.
CLOUDFLARE_API_TOKEN: Cloudflare API token with cache purge permission.CLOUDFLARE_PURGE_WEBHOOK_KEY: secret key that guards the webhook trigger.SLACK_WEBHOOK_URL: Slack incoming webhook URL for notifications.zone_id and verify_url in the webhook body, or run the flow manually to test.purgeAll: true with file or tag based purges for surgical invalidation.outputs.verify_site.code is not 200.