DEVOPS

Purge Cloudflare cache tags when CMS content is published

Triggered by a content-publish webhook, maps the published entry to its Cloudflare cache tags and purges by tag so only affected pages clear, then logs the event for audit.

CategoryDevOps
Enginesim
Difficultyintermediate
Triggerwebhook
Steps5
Setup~15 min

How it runs

The automated pipeline, trigger to output.

  • TriggerCMS publish HTTP webhookHTTP webhook
  • LogicDerive cache tags from published entry
  • ActionCloudflare purge-by-tagCloudflareCloudflare
  • LogicConfirm purge succeeded
  • OutputWrite purge audit row to PostgresPostgreSQLPostgres

What it does

When an editor publishes or updates content, this workflow purges Cloudflare by cache tag rather than by URL, so every page that embeds that content (lists, related-content blocks, the entry page itself) clears in a single call. It then writes an audit record of what was purged and by whom.

When to use it

Use it when content updates are decoupled from code deploys and the same entry appears across many cached pages. Cache tags let one edit invalidate exactly the right surface area without listing URLs by hand or purging the whole zone.

How it works

  1. 1An HTTP webhook receives the CMS publish event with the entry ID and type.
  2. 2A logic step derives the Cloudflare cache tags for that entry (for example `post-123`, `author-7`, `tag-listing`).
  3. 3Cloudflare purge-by-tag clears every page carrying those tags.
  4. 4A logic check confirms the purge response succeeded.
  5. 5A Postgres insert records the entry, tags purged, editor, and timestamp for the audit log.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect HTTP webhookTrigger any URL on agent actions.
  2. 2
    Connect CloudflareWorkers, Pages, R2, KV — the edge stack.
  3. 3
    Connect PostgresAny Postgres URL — query, write, migrate.
  4. 4
    Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
  5. 5
    Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
  6. 6
    Test, then turn it onRun once against a sample, confirm the output, then enable the trigger.

Run this workflow in your colony.

14-day trial. No DevOps. No Sales call. Provisioned in under a minute.