Deploy your site, Worker scheduler, KV content store, and GHL email automation — all in one Cloudflare account. No Netlify required.
~20 min setupFree infrastructureCloudflare-native
Why Cloudflare-only beats Netlify + Cloudflare
Your Worker and site share the same KV store — insights.html updates the instant content publishes, no redeploy needed. Everything lives in one account, one dashboard. Cloudflare Pages is faster globally on the free tier, and you eliminate the build hook dependency entirely.
CF Account
Pages Deploy
KV + Worker
GHL Connect
Content Engine
Test & Go Live
✓ All steps checked — system is ready to go live
Architecture Overview
One account. Three components.
You only ever touch the Content Engine. Everything else runs automatically inside Cloudflare.
Full stack data flow
Content EngineBrowser • you approve here
→
CF Worker + KVRuns 24/7 • 8am daily cron
→→
CF Pages Siteinsights.html reads KV live
GoHighLevelEmail → attorney contacts
Key advantage: The Insights page fetches posts from your Worker URL on every page load, reading directly from KV. New content is live within seconds of publishing — no redeploy, no cache busting, no waiting.
Feature
Cloudflare only (this guide)
Netlify + Cloudflare (old)
Site hosting
CF Pages — free, global CDN
Netlify free tier
Insights page update
Instant via KV read
30–60s redeploy
Scheduler
CF Worker — same account
CF Worker (separate account)
Build hook needed?
No
Yes — required
Accounts needed
1
2
Monthly cost
$0
$0
Step 01 • ~3 minutes
Create your Cloudflare account
One account covers everything: Pages for site hosting, Workers for the scheduler, and KV for content storage.
1
Sign up at cloudflare.com
Go to cloudflare.com → Sign Up. Free account. No credit card required for Pages, Workers, or KV on the free tier.
2
Install Node.js if you don’t have it
Download from nodejs.org → LTS version. Required for Wrangler CLI. Skip if already installed.
3
Install Wrangler and log in
Open Terminal (Mac) or Command Prompt (Windows):
npm install -g wrangler
wrangler login
# A browser window opens — sign in with your Cloudflare account# Terminal confirms: "Successfully logged in"
Step 02 • ~3 minutes
Deploy site to Cloudflare Pages
Cloudflare Pages hosts your MAIC site. Direct upload — no build step, no Git required. Just drag and drop the zip.
Before uploading: Remove netlify.toml from the zip — it’s not needed and Cloudflare ignores it anyway. The _headers and _redirects files are already Cloudflare-formatted and should stay.
Click Upload assets → name your project (e.g. maic-site) → drag in the MAIC deploy zip or extracted folder → Deploy site
3
Note your Pages URL and verify
After deploy you’ll get maic-site.pages.dev. Visit it and confirm all pages load including /insights.html and /content-engine.html.
4
Add your custom domain (when ready)
Pages → your project → Custom Domains → Add domain. Point your DNS there. Free SSL included automatically.
Future deploys: Workers & Pages → your project → Deployments → Upload. Drag in the new zip. Takes about 10 seconds.
Step 03 • ~7 minutes
Create KV store and deploy the Worker
The KV namespace is your content database. The Worker writes to it when publishing. Your Insights page reads from it live — no rebuild ever needed.
1
Create the KV namespace
Run in Terminal from any directory:
wrangler kv:namespace create "MAIC_STORE"
# Output: { binding = "MAIC_STORE", id = "abc123def456..." }# Copy that ID — you need it in the next step
2
Create your Worker project folder
Create a folder called maic-scheduler on your computer. Copy scheduler-worker.js from the MAIC deploy package into it. Then create a wrangler.toml file with the content below — paste your KV ID where indicated.
cd maic-scheduler
wrangler deploy
# You'll see:# Deployed maic-scheduler# https://patient-resonance-a7c8.drsadov.workers.dev## Copy that URL — paste into Content Engine Settings → Cloudflare Worker URL
4
Add your GHL API key as a Worker secret
From the maic-scheduler folder:
wrangler secret put GHL_KEY
# Paste your GHL API key when prompted, press Enter# CF Pages deploy hook is NOT needed — KV updates are instant
5
Verify Worker is live
Visit https://patient-resonance-a7c8.drsadov.workers.dev/health — should return {"status":"live"}
6
Bind KV to your Pages site
Cloudflare Dashboard → Workers & Pages → your Pages project → Settings → Functions → KV namespace bindings → Add binding: Variable name:MAIC_STORE KV namespace: select the one you created
This is what lets insights.html read posts live from the same KV your Worker writes to.
How live KV reads work: When an attorney visits insights.html, the page fetches /posts from your Worker URL. The Worker reads MAIC_STORE and returns the posts as JSON. New content appears within seconds of the Worker publishing it — no deploys, no waiting.
Step 04 • ~5 minutes
Connect GoHighLevel
Get your GHL API key and tag your attorney contacts. The Worker emails this list on each scheduled send.
1
Get your GHL API key
In GHL: Settings → Integrations → API Keys → Create API Key → Name: MAIC Content Engine → Copy key
2
Tag your attorney contacts in GHL
Contacts → select your PI attorney contacts → Add Tag → name it exactly attorney-list. The Worker emails all contacts with this tag on each send.
3
(Recommended) Set up a GHL Workflow trigger
GHL Automation → New Workflow → Trigger: Inbound Webhook → Action: Send Email to your attorney-list smart list. Copy the webhook URL then run:
wrangler kv:key put --binding MAIC_STORE "ghl_workflow_webhook" "YOUR_GHL_WEBHOOK_URL"
# Worker will POST to this URL on each scheduled send# GHL handles delivery, unsubscribe compliance, templating
Why a Workflow instead of direct API? GHL’s direct email API requires managing individual contact IDs. A Workflow trigger is a single POST from the Worker — GHL handles all delivery, rate limiting, and CAN-SPAM compliance on its end. More reliable and easier to update the email template later.
Step 05 • ~2 minutes
Configure Content Engine settings
Paste all keys into the Content Engine sidebar. One-time setup — stored in localStorage on your device.
1
Open Content Engine on your live CF Pages site
Navigate to https://maic-site.pages.dev/content-engine.html
2
Fill in all fields in the sidebar settings (bottom left)
Anthropic API Key — from console.anthropic.com GHL API Key — from GHL settings GHL Contact Tag — attorney-list CF Pages Deploy Hook — leave blank (not needed) Cloudflare Worker URL — https://patient-resonance-a7c8.drsadov.workers.dev
3
Click Save All Settings
Keys are stored in your browser’s localStorage and never leave your device except when making API calls to their respective services.
Step 06 • ~3 minutes
Test end-to-end and go live
Run one test piece through the full pipeline before queuing real content.
1
Test Worker health check
Visit https://patient-resonance-a7c8.drsadov.workers.dev/health — should return {"status":"live","worker":"maic-scheduler"}
2
Generate a test piece
Content Engine → Topic → Content → enter any subject → Generate → Add to Queue → set today’s date → destination: Site only → Add to Queue
3
Approve and fire manually
Approval Dashboard → Approve → Fire Now → confirm
4
Verify on Insights page
Visit https://maic-site.pages.dev/insights.html — your test post appears within seconds. No redeploy needed.
5
Test the daily cron manually
Cloudflare Dashboard → Workers & Pages → maic-scheduler → Triggers → click “Trigger now”. Check the real-time log output to confirm it runs clean.
You’re live. Generate Monday, approve Monday, Cloudflare handles every send at 8am. 15 minutes of work per week.
Operating Guide
Weekly rhythm
The entire weekly workflow once deployed.
Mon
Generate — ~10 min
Content Engine → run 3–5 pieces using any mode → Add each to Queue with dates Mon–Fri. Set destination per piece (site + email, site only, or email only).
Mon
Review & approve — ~5 min
Approval Dashboard → read each draft → click Approve. That’s your only required action for the week.
Auto
Cloudflare runs the rest — 0 min
8am daily: Worker fires approved items due that day → KV updated (Insights page live instantly) → GHL email to attorney list. You do nothing. Attorneys receive a brief. Site stays current.