AI Agents8 min readUpdated 2026-06-29
Cloudflare D1 + OpenAI in n8n: The Playbook
Combine Cloudflare D1 with OpenAI in n8n for classification, drafting and enrichment at scale.
Key takeaways
- Classify + draft + enrich + summarize.
- Human-in-loop for writes.
- Right-size the model per task.
- Cache repeated prompts.
Cloudflare D1 + OpenAI is the most-requested combo we see. This playbook covers the four workflow shapes teams actually ship with them.
Classify
Every new Cloudflare D1 record → LLM classifier → tag write-back. Cheap, fast, transformative.
Draft
LLM drafts a next action; human approves; workflow writes back to Cloudflare D1. Keeps humans in the loop.
Enrich
LLM extracts structured fields from unstructured Cloudflare D1 notes. Populate CRM fields you never had time to fill.
Summarize
Nightly summary of Cloudflare D1 activity, delivered to Slack. Ops leaders start their day informed.
Frequently asked questions
- Which model?
- GPT-4o-mini for classify/enrich; GPT-4o for drafting when quality matters.
- Cost per record?
- Fractions of a cent for classify; a few cents for drafting.
- Prompt store?
- Postgres or Notion — version prompts like code.
- Guardrails?
- Approval step + structured-output schema. Always.