Build your own CRM with an agent and Supabase
Let an AI agent build a small CRM in your own Supabase project. The five tables, the loop, seven rules, the exact prompt and one step not available yet.
Walid Boulanouar · · 5 min read
On this page
A CRM is a set of tables and a way to look at them. That is a job an agent handles well. It writes the schema, fills it with data and builds a dashboard on top. The part it cannot do alone is get the data, which is where looot comes in.
The setup is simple. Your own Supabase project is the memory. looot is the data. The agent connects them. Rows live in your project, and looot keeps none of them.
Why this works for marketing work
Marketers use agents like Claude Code for research, lists and reports. What goes wrong is that the work disappears into a chat. A table fixes that. Every lead, signal and note has a row, and you can filter, edit and come back next week.
The five tables
| Table | Holds |
|---|---|
| accounts | Companies: name, domain, industry, size |
| contacts | People: name, title, email, linked to an account |
| signals | Things that happened: a kind, a value, when first seen |
| runs | One row per job: rows added, rows changed |
| notes | Your own notes on an account |
Every table also carries four provenance columns: source, endpoint, cost_usd and fetched_at. When you see a row, you know where it came from, what it cost and how old it is.
The loop
The agent runs one loop: find, enrich, verify, upsert. It finds accounts, adds contact and company data, checks that emails are deliverable, and writes the result. Upsert means it matches on a natural key such as a domain, so a second run updates rows and does not create copies.
The seven rules
- Memory is your Supabase. Rows live in your project.
- Every row has a source, an endpoint, a cost and a fetch time.
- Upsert on a natural key. Running the pipeline twice makes no duplicates.
- Your edits stay. The agent never overwrites a column you edited.
- Price before any call over one cent. It shows the price and waits for your yes.
- A daily budget. It stops at the amount you set.
- A report on every run: rows added, rows changed and total cost.
Rules four to six are the safety rails. They stop the quiet failures: a hand edit lost, a loop that spends all afternoon, a result nobody can trace.
The prompt
This is the exact prompt from the build-your-own page. Replace the budget placeholder with your own number before you paste it. The first line sets the kind of thing you are building. Swap CRM for signal engine, ad tracker or lead list as needed.
Prompt for your agent
Seven-step build prompt
What to check after the first run
- Open the tables in Supabase and read ten rows. Are the provenance columns filled?
- Run the pipeline again. The row count should not double.
- Edit a column by hand, run again, and confirm your edit survived.
- Read the run report and compare the cost with your budget.
These four checks take ten minutes and catch most problems. If one fails, tell the agent which rule it broke and ask it to fix the pipeline, not just the rows.
Where to go next
Start with a small job. The local leads from Google Maps recipe fits the accounts and contacts tables well. For a signal table, look at hiring signal watch. To see how an agent reaches data providers through one connection, read what is an MCP server.
Questions
Keep reading
Scrape Google Maps for leads with an agent
How an agent builds a local lead list from Google Maps: search, details, website, email. The steps, a prompt to paste and what to check first.
Walid Boulanouar · · 5 min read
Can an AI agent replace Clay? What we checked and what it cannot do
We checked each job Clay does against the looot catalog. An agent covers the enrichment work. It does not give you a shared table or a native CRM sync.
Walid Boulanouar · · 4 min read
Generative engine optimization: what you can measure
Generative engine optimization (GEO) and answer engine optimization explained. What to measure, a page checklist, and how an agent runs the checks.
Walid Boulanouar · · 5 min read
Try it with the agent you already use
Start your workspace, top up, and paste one prompt into your agent.