Score Cloudflare firewall bot threats and suggest manual block actions
Ready for 3.0What this workflow does
This workflow has 15 nodes and runs on a schedule (every 15 minutes) (plus 1 other trigger). It uses only n8n's built-in nodes. It also calls api.cloudflare.com over HTTP.
How it runs
Trigger: On a schedule (every 15 minutes) (plus 1 other trigger).
- Configuration (Code): runs custom JavaScript code
- Discover zones (HTTP Request): calls api.cloudflare.com (GET)
- Resolve zone list (Code): runs custom JavaScript code
- Build events query (Code): runs custom JavaScript code
- Fetch firewall events (HTTP Request): calls api.cloudflare.com (POST)
- Aggregate by IP (Code): runs custom JavaScript code
- Score offenders (Code): runs custom JavaScript code
- Route by recommendation (Switch): routes items into 2 branches
- Build block recommendations (Code): runs custom JavaScript code
- Format review queue (Code): runs custom JavaScript code
HTTP calls to: api.cloudflare.com
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (6)
- Schedule Trigger
n8n-nodes-base.scheduleTrigger - Manual Trigger
n8n-nodes-base.manualTrigger - Code
n8n-nodes-base.code - HTTP Request
n8n-nodes-base.httpRequest - Switch
n8n-nodes-base.switch - No Operation, do nothing
n8n-nodes-base.noOp
From the author
Quick overview This workflow runs on a schedule (or manually) to read Cloudflare firewall events via the Cloudflare GraphQL API, aggregate activity by client IP, and compute deterministic bot-risk scores with evidence-based signals, then routes results into…