# The Facebook Lead Engine — A Build Guide for Cleaning Companies

**Run Facebook lead ads, capture the leads automatically, and text every lead an
instant price quote, without lifting a finger after setup.**

This guide takes you from zero to a live, automated lead engine. It is written so you
can either **read it and do it yourself**, or **hand it to an AI assistant** (Claude,
ChatGPT, etc.) and have it do the technical parts while you make the business decisions.

It is built from a real, running system: **NeatNow**, a Calgary cleaning company. Every
price, targeting choice, and creative rule you see is what NeatNow actually uses, shown as
a worked example. Wherever a number or setting is specific to NeatNow, you will see a
`🔧 Customize` callout telling you what to swap for your own business.

> **A note on what we are, and are not, expert in.** We built and run this engine, and we are
> confident about the setup: the accounts, the lead form, the pricing logic, the Cloudflare
> worker, the deployment, and the monitoring. We are happy to share exactly how all of it works.
> We are **not** a marketing agency. The creative, offer, and targeting choices in here are just
> what worked for one Calgary cleaning business, shared as experience, not as expert advice.
> Test your own, and trust your own results.

---

## What you will have built

A lead-filler on Facebook taps your ad, fills a short form (name, phone, home size,
service type), and **within seconds gets a text message with their price** — while you get
a notification with their details. No manual quoting, no "let me get back to you," no lead
going cold while you sleep.

```
  ┌─────────────┐     fills      ┌──────────────────┐
  │  Facebook   │──── form ─────▶│  Meta Lead Form  │
  │  Lead Ad    │                │  (Instant Form)  │
  └─────────────┘                └────────┬─────────┘
                                          │ "new lead" webhook
                                          ▼
                              ┌───────────────────────┐
                              │   Your Cloudflare      │
                              │   Worker (the engine)  │
                              │  • fetch lead details  │
                              │  • compute the price   │
                              └───────┬─────────┬──────┘
                                      │         │
                   auto-quote SMS ◀───┘         └───▶ owner alert SMS
                   to the LEAD                        to YOU
                   "Hi Sara, your move-out            "🧹 NEW FB LEAD:
                    clean is $525 + GST…"              Sara, 2BR, Ad: 123…"
                                      │
                                      └───▶ backup copy saved (email/Formspree)
```

That is the whole scope of this guide. It **stops at the automated quote**.

---

## Where this guide stops (scope)

**In scope — the lead engine:**

1. The accounts you need (Meta, Cloudflare, an SMS provider)
2. Building the Facebook lead form
3. The pricing logic that turns a form answer into a quote
4. The worker that ties it together and sends the texts
5. Creating and targeting the Facebook ad
6. Going live, testing, and monitoring it

**Out of scope (on purpose):** what happens *after* the quote text is yours to handle. This
guide does **not** cover follow-up sequences, a booking/CRM system, drip messaging, or any
"reply to me for approval" operator tooling. Once the lead has their price and you have their
details, **you follow up and close them manually** (call, text, email — your call). Keeping
the scope here is deliberate: this is the highest-leverage, most-automatable slice, and it is
simple enough to stand up in a weekend.

---

## What it costs to run

The infrastructure is nearly free; your real cost is ad spend, which you control.

| Piece | Cost | Notes |
|---|---|---|
| Cloudflare Worker (the engine) | **$0** | [Free tier](https://developers.cloudflare.com/workers/platform/pricing/) = 100,000 requests/day, far more than a small business will ever use |
| SMS provider (Quo, formerly OpenPhone, in this example) | **Monthly subscription** + **usage-based message credit** | A business phone line you likely want anyway; cost scales with how many texts you send. [Quo pricing](https://www.quo.com/pricing) |
| Lead backup (Formspree) | **$0** | [Free plan](https://help.formspree.io/hc/en-us/articles/47605896654227-Account-limits) (50 submissions/mo); optional |
| Facebook ad spend | **Your budget** | NeatNow ran two ad sets at ~$10–20/day each |

So beyond ad spend, your only running cost is the SMS provider: a **monthly subscription**
plus **usage-based message credits** that scale with how many texts you send (the full cost
breakdown, and a gotcha worth knowing, is in [04-the-worker.md](04-the-worker.md)). The
worker itself is effectively free.

---

## Before you start (prerequisites)

You will need to create or already have:

- [ ] A **Facebook Page** for your business (not just a personal profile)
- [ ] A **Meta Business Manager** account (free; this is where ads and the lead form live)
- [ ] A **Cloudflare** account (free; hosts the engine)
- [ ] An **SMS provider with an API** (this guide uses Quo, formerly OpenPhone; any with a send-message API works)
- [ ] A way to **pay for ads** (a card on your Meta ad account)
- [ ] *(Optional)* A **developer or AI assistant** to deploy the worker — you do not need to know how to code, but the worker step involves running a few commands

No website or custom domain is required. The engine runs on a free Cloudflare URL.

---

## How to use this guide

**Read it in order, 01 → 06.** Each numbered file is one stage and builds on the last. The
appendices are reference material you dip into when a stage points you there.

**If you are handing this to an AI:** give it this whole folder. Tell it your business
details (city, prices, service types) up front, then work through the files with it. The
`🔧 Customize` callouts are exactly the decisions it should ask you about. The reference
worker code in Appendix A is complete enough for an AI to deploy without any other source.

---

## File index

| File | What it covers |
|---|---|
| [`01-foundations.md`](01-foundations.md) | The accounts to create and how they fit together |
| [`02-lead-form.md`](02-lead-form.md) | Building the Facebook lead form (the questions that drive the quote) |
| [`03-pricing-engine.md`](03-pricing-engine.md) | The logic that turns a form answer into a dollar quote |
| [`04-the-worker.md`](04-the-worker.md) | Deploying the engine on Cloudflare (the load-bearing token gotcha lives here) |
| [`05-facebook-ad.md`](05-facebook-ad.md) | Creating, targeting, and writing the Facebook ad (Ads Manager) |
| [`06-go-live-and-monitor.md`](06-go-live-and-monitor.md) | Testing it end-to-end, monitoring, and judging whether it's working |
| [`appendix-A-reference-worker.md`](appendix-A-reference-worker.md) | The full, ready-to-adapt worker code |
| [`appendix-B-meta-api-path.md`](appendix-B-meta-api-path.md) | Creating the ad via the Marketing API instead of the UI (for AI-driven setup) |
| [`appendix-C-troubleshooting.md`](appendix-C-troubleshooting.md) | When leads stop arriving: the diagnosis playbook |
| [`appendix-D-visual-walkthrough.md`](appendix-D-visual-walkthrough.md) | Dated screenshots of the System User token setup screens (from 01/04); the Ads Manager steps in 05 are text-only |

---

**Last fact-checked: 2026-07-09.** External products (Meta, Cloudflare, Quo) change their UIs and
pricing; verify against their official docs before relying on any step.

---

*Built and field-tested by NeatNow Cleaning (Calgary). Shared as-is for fellow operators.*
