๐ฌWhat we learn today โ a short video
โก By the end of the session you will know
- Sheets for an MVP, a data store for state, Airtable for a team, Postgres for a system.
- Data store: key + data structure; Add/replace = upsert.
- Basic SQL: CREATE, INSERT, SELECT, GROUP BY.
- Parameters against SQL injection; keys only in a connection.
- We built a mini-CRM with an API and a pipeline report.
A silent video of about half a minute: the session topic, the learning goals (also listed in the next section) and the scenario we build today.
๐The story of Etz va'Or (Wood & Light) โ Chapter 8: The data grows up
The sheet has reached 4,000 rows and is starting to slow down. Time for a real database: a Mini-CRM on Supabase with an API to create and fetch โ and a daily Pipeline report that shows where every deal is stuck.
๐งต One story across the whole course: every session solves a real problem for the business. At the end โ a complete system.
๐ฏSession goals
- Understand when to move from Sheets to a database.
- Use Make's data stores and data structures for keeping state.
- Work with Airtable: tables, links, search and upsert.
- Know basic SQL (SELECT, INSERT, UPDATE, GROUP BY).
- Connect Make to Supabase/Postgres and run safe queries.
- Build an API for creating and fetching deals.
- Produce a daily pipeline report from the database.
๐๏ธSession agenda (3 hours)
- 00:00โ00:15 Review + the midterm exam
- 00:15โ00:40 Why a database? Sheets vs. a DB
- 00:40โ01:05 Make's data stores
- 01:05โ01:20 โ Break
- 01:20โ01:45 Airtable
- 01:45โ02:15 A little SQL + Supabase
- 02:15โ02:50 Building together: a mini-CRM
- 02:50โ03:00 Summary and practice
1Sheets vs. a database
| Google Sheets | Data store (Make) | Airtable | Postgres (Supabase) |
|---|
| Scale | Thousands of rows | Small โ state and configuration | Tens of thousands | Millions |
| Data types | Weak โ anything can be text | Data structure | Strong + files + links | Very strong + constraints |
| Search | Slow, a simple filter | By key / filter | Formula | Full SQL |
| Relations between tables | Manual | None | Linked records | Foreign keys + JOIN |
| Working in parallel | A risk of overwrites | OK | Good | Excellent (transactions) |
| Suits | Reports, MVP | Dedupe, counters, state between runs | A team CRM, content | Systems, APIs, analytics |
๐ก The ruleSheets when people edit and look. A data store when only Make needs to remember something. Airtable when a non-technical team needs a friendly CRM. Postgres when it starts to become a system.
2Data stores and data structures
A data store is a small table that lives inside Make. Each record has a unique key and fields by a data structure. We already used it in the challenges โ now in depth.
| Module | Use |
|---|
| Add/replace a record | An upsert by key โ the most useful |
| Get a record | Fetch by key |
| Search records | Search by a filter |
| Update a record | Update fields (optionally Insert missing) |
| Delete a record / Delete all records | Delete |
| Check the existence of a record | Whether a key exists |
| Count records | Count |
๐
Preventing duplicates
Key = email. Check existence before processing.
๐ข
Counters
Invoice numbering, round-robin between agents.
๐ง
Memory between runs
The last value, when an alert was sent.
โ ๏ธ Not a data warehouseData stores have a storage quota by plan. Don't keep a long history in them โ that's what Sheets/Airtable/Postgres are for.
3Airtable โ a CRM people love
- Base = a database, Table = a table, Field types: Single select, Currency, Date, Linked record, Attachment.
- Linked records: a deal linked to a contact โ instead of copying a name.
- In Make: Airtable โ Create / Update / Search Records / Upsert (upsert by merge fields), and Watch Records.
- The connection: a Personal Access Token with the right scopes (data.records:read/write, schema.bases:read) โ or OAuth.
โน๏ธ Formula in a searchAirtable Search Records takes a filter formula in Airtable's language: AND({{Stage}}='proposal', {{Value}}>20000). That saves downloading the whole table.
4A little SQL
-- a deals table
create table deals (
id bigint generated always as identity primary key,
contact text not null,
email text not null,
company text,
stage text default 'lead' check (stage in ('lead','meeting','proposal','won','lost')),
value numeric default 0,
owner text,
created_at timestamptz default now(),
updated_at timestamptz default now()
);
-- insert
insert into deals (contact, email, company, value) values ('Ronit Levi','ronit@acme.co.il','Acme',45000);
-- select
select * from deals where stage = 'proposal' order by value desc limit 10;
-- a pipeline report
select stage, count(*) as deals, sum(value) as total
from deals where stage not in ('won','lost')
group by stage order by total desc;
5Make + Supabase / Postgres
| Way | Advantage | Watch out |
|---|
| The Supabase app | Create/Update/Search rows in the interface โ without SQL | Handy for simple actions |
| PostgreSQL โ Execute a query | Full SQL: JOIN, GROUP BY | A connection with Host/Port/User/Password (Supabase's connection pooler) |
| HTTP to Supabase's REST API | Full flexibility, RPC for functions | The service_role key only in a connection/Keychain! |
๐ SQL injectionNever concatenate user input into SQL: where email = '{{{{1.email}}}}' โ someone will send ' or 1=1 --. Use the query module's parameters ($1, $2) or the built-in modules that encode values themselves.
6Building together: a mini-CRM
- Supabase: create the deals table from the SQL above.
- Scenario 1 โ a POST webhook: auth โ validation โ INSERT with parameters โ Response 201 with the id.
- Scenario 2 โ a GET webhook ?email=: SELECT โ Response 200 / 404.
- Scenario 3 โ a daily report: SELECT โฆ GROUP BY โ Text aggregator โ Telegram.
๐งชLab: simulations and examples
Three ways to see today's material in action: the scenario canvas runs the session's scenario like Make does (with a Credits count), the race compares manual work with automation, and the function playground shows real mapping examples.
๐ก Why in this order?Normalise before saving โ otherwise the same customer is stored twice with a different phone format.
๐ขA real-world case study
"Academy Plus" โ a college for adults. 5,000 registrations a year, and the registration sheet started to collapse, with overwrites between advisers. They moved to Supabase: students, courses, enrollments tables with relations. Make receives forms, updates via SQL, and feeds Airtable (a view for the advisers) and the management report. Result: zero overwrites, reports built in a second instead of minutes, and the ability to ask questions like "how many registrations from Google completed a course".
โFrequently asked questions
Is Supabase completely free?
There is a free plan with limits (a project is paused after long inactivity). For production โ a paid plan.
Airtable or Supabase?
Airtable when non-technical people work in the table every day. Supabase when it's an engine behind a system. You can have both โ the DB as the source of truth and Airtable as a view.
Does a data store cost Credits?
Every data store action is a module โ a Credit.
How do I back up?
Supabase backs up automatically (by plan); Airtable โ snapshots; data store โ export.
โ๏ธQuick understanding check
โก๏ธWhat now?
You finished the lecture! Go to the practice page โ multiple-choice questions and tasks that build A mini-CRM on Supabase/Postgres: an API for creating and fetching + a daily pipeline report. Stuck? The help guide breaks every task into steps. Only after you have tried, peek at the full solution.