New to Kestra?
Use blueprints to kickstart your first workflows.
Purge exactly one piece of content from the Fastly edge with Kestra. Soft-purge a surrogate key on content updates and post the purge ID to Discord.
The reflex fix for "the article still shows the old headline" is purging the entire site, which trades one stale page for a cold cache and an origin traffic spike. Fastly's surrogate keys make that unnecessary: tag every cached response with a key derived from its content ID, and an update can invalidate exactly the objects that changed. This blueprint wraps that pattern in a flow a CMS can call: io.kestra.plugin.fastly.purge.Key soft-purges the single surrogate key for the changed content, and Discord gets the purge ID as a receipt. Editors get instant updates at the edge, the rest of the cache stays warm, and origin never notices.
service_id and the content_key, the surrogate key the CMS stamps on the content's responses through the Surrogate-Key header.purge_content (io.kestra.plugin.fastly.purge.Key) purges that one key with soft: true, marking the tagged objects stale so the edge revalidates them on the next request instead of dropping them outright.notify (io.kestra.plugin.discord.DiscordIncomingWebhook) posts the purge status and id outputs to the content channel, so every invalidation has a receipt.errors block posts a distinct Discord alert when the purge fails, because an editor who believes an update is live when it is not will publish on top of stale content.A CMS webhook that calls the Fastly API directly is invisible: no retry when the API blips, no record of what was purged when, no alert when it fails. Kestra makes each purge an execution with inputs, outputs, retries, and history, and the flow becomes the single place where purge behavior lives, swap soft for hard purge or add a verification probe without touching the CMS.
Surrogate-Key headers derived from content IDs.FASTLY_API_TOKEN: Fastly API token with purge scope.DISCORD_WEBHOOK_URL: Discord incoming webhook URL.service_id and a surrogate key you know is cached, then confirm the Discord receipt.io.kestra.plugin.core.trigger.Webhook trigger so the CMS fires the purge directly with the key in the request body.io.kestra.plugin.fastly.purge.Keys, for example the article plus its section index.io.kestra.plugin.core.http.Request against the content URL to verify the new version is served.