SECOPS
Rotate Cloudflare API tokens on a schedule with audit logging
On a recurring schedule, mints fresh Cloudflare API tokens, revokes the prior ones after a grace window, and records every rotation to a Postgres audit table.
How it runs
The automated pipeline, trigger to output.
- TriggerScheduled rotation interval fires
- ActionCreate new scoped Cloudflare tokenCloudflare
- ActionWrite rotation event to Postgres audit tablePostgres
- LogicWait for grace window and confirm new token active
- ActionRevoke previous Cloudflare tokenCloudflare
- OutputPost rotation summary to SlackSlack
What it does
Runs a scheduled rotation of your Cloudflare API tokens. It creates a new scoped token, distributes it, then revokes the previous token after a grace period so in-flight requests do not break. Every step is written to an immutable audit table so you can prove rotation cadence during compliance reviews.
When to use it
Use it when you have long-lived Cloudflare tokens that should be cycled every 30, 60, or 90 days for SOC 2 or internal policy. Manual rotation gets skipped and forgotten; this enforces the cadence and leaves a paper trail.
How it works
- 1A schedule trigger fires at your chosen rotation interval.
- 2The flow calls Cloudflare to create a new token with the same scopes as the current one.
- 3It writes the new token reference and timestamp into a Postgres audit table.
- 4A logic step waits for the grace window, then confirms the new token is in active use.
- 5It revokes the old Cloudflare token.
- 6It posts a rotation summary to Slack for the on-call engineer.
Set it up
What you configure once, before turning it on.
- 1Connect CloudflareWorkers, Pages, R2, KV — the edge stack.
- 2Connect PostgresAny Postgres URL — query, write, migrate.
- 3Connect SlackChannels, DMs, threads, mentions.
- 4Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
- 5Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
- 6Test, then turn it onRun once against a sample, confirm the output, then enable the trigger.
More SecOps workflows
Post-Revocation Verification and Audit Logging
After a key is revoked, it confirms the old credential actually fails, verifies the replacement works.
Page on-call when a WAF rule mass-blocks legitimate traffic
On demand or every few minutes, it detects a single Cloudflare WAF rule suddenly blocking a broad spread of ASNs and paths (a likely false-positive storm).
PII Content Scan on New Dropbox External Share
When a file gets an external Dropbox link, it reads the file content, uses an AI classifier to detect PII or secrets.
Compile a weekly WAF tuning review with trends to Confluence
Every week an agent rolls up Cloudflare WAF block clusters by rule and ASN, compares them to prior weeks for trend direction.
Sensitive Dropbox Link Owner Remediation Loop
When a newly created Dropbox shared link points to a sensitive file, this workflow DMs the file owner, gives them a deadline to justify or revoke it.
GitLab Push Secret Detection to Block and History Purge
On a GitLab push that contains a detected secret, it revokes the exposed credential, opens a tracking issue with git-history purge instructions.
Run it inside a business
This workflow drops into a full company template. Import the org, and this is one of the playbooks its agents run.

Run this workflow in your colony.
14-day trial. No DevOps. No Sales call. Provisioned in under a minute.
