Product

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

TableHolds
accountsCompanies: name, domain, industry, size
contactsPeople: name, title, email, linked to an account
signalsThings that happened: a kind, a value, when first seen
runsOne row per job: rows added, rows changed
notesYour 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

  1. Memory is your Supabase. Rows live in your project.
  2. Every row has a source, an endpoint, a cost and a fetch time.
  3. Upsert on a natural key. Running the pipeline twice makes no duplicates.
  4. Your edits stay. The agent never overwrites a column you edited.
  5. Price before any call over one cent. It shows the price and waits for your yes.
  6. A daily budget. It stops at the amount you set.
  7. 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

Seven-step build prompt
You are building my CRM. Use looot for all data and my Supabase for memory. 1. Setup: set up https://looot.ai/skill.md, then connect my Supabase. 2. Create tables: accounts, contacts, signals, runs, notes. Every row stores source, looot endpoint, cost_usd, fetched_at. 3. Pipeline: find, enrich, verify, upsert. Upsert on a natural key. Never overwrite columns I edited. 4. Before any call that costs more than $0.01, show me the price and wait. Stop at my daily budget of $[X]. 5. Watch loop: re-run each signal on a schedule, write only what changed, and tell me the diff. 6. UI: build a small dashboard over these tables (list, filters, row detail, run history). 7. Report each run: rows added, rows changed, total cost.

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.

Open the build kit

Questions

Yes. Give the agent a Supabase project and looot for data. It creates the tables, fills them through endpoints billed per call and builds a small dashboard.

ShareXLinkedInEmail
Product

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

Try it with the agent you already use

Start your workspace, top up, and paste one prompt into your agent.