Session 8 / 15๐Ÿ”Žืขื‘

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

  1. Understand when to move from Sheets to a database.
  2. Use Make's data stores and data structures for keeping state.
  3. Work with Airtable: tables, links, search and upsert.
  4. Know basic SQL (SELECT, INSERT, UPDATE, GROUP BY).
  5. Connect Make to Supabase/Postgres and run safe queries.
  6. Build an API for creating and fetching deals.
  7. Produce a daily pipeline report from the database.

Session agenda (3 hours)

  1. 00:00โ€“00:15 Review + the midterm exam
  2. 00:15โ€“00:40 Why a database? Sheets vs. a DB
  3. 00:40โ€“01:05 Make's data stores
  4. 01:05โ€“01:20 โ˜• Break
  5. 01:20โ€“01:45 Airtable
  6. 01:45โ€“02:15 A little SQL + Supabase
  7. 02:15โ€“02:50 Building together: a mini-CRM
  8. 02:50โ€“03:00 Summary and practice

What to prepare for this session

Data stores (in Make)

Built in. The Free plan has a small storage quota.

Airtable

https://airtable.com (opens in a new window)
A database with a spreadsheet interface. A free plan.

Supabase

https://supabase.com (opens in a new window)
Managed Postgres in the cloud. A free plan.

SQL Editor

Inside Supabase โ€” for running queries.

Sheets vs. a database

Google SheetsData store (Make)AirtablePostgres (Supabase)
ScaleThousands of rowsSmall โ€” state and configurationTens of thousandsMillions
Data typesWeak โ€” anything can be textData structureStrong + files + linksVery strong + constraints
SearchSlow, a simple filterBy key / filterFormulaFull SQL
Relations between tablesManualNoneLinked recordsForeign keys + JOIN
Working in parallelA risk of overwritesOKGoodExcellent (transactions)
SuitsReports, MVPDedupe, counters, state between runsA team CRM, contentSystems, 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.

Data 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.

ModuleUse
Add/replace a recordAn upsert by key โ€” the most useful
Get a recordFetch by key
Search recordsSearch by a filter
Update a recordUpdate fields (optionally Insert missing)
Delete a record / Delete all recordsDelete
Check the existence of a recordWhether a key exists
Count recordsCount
๐Ÿ”

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.

Airtable โ€” 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.

A 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;

Make + Supabase / Postgres

WayAdvantageWatch out
The Supabase appCreate/Update/Search rows in the interface โ€” without SQLHandy for simple actions
PostgreSQL โ†’ Execute a queryFull SQL: JOIN, GROUP BYA connection with Host/Port/User/Password (Supabase's connection pooler)
HTTP to Supabase's REST APIFull flexibility, RPC for functionsThe 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.

Building together: a mini-CRM

  1. Supabase: create the deals table from the SQL above.
  2. Scenario 1 โ€” a POST webhook: auth โ†’ validation โ†’ INSERT with parameters โ†’ Response 201 with the id.
  3. Scenario 2 โ€” a GET webhook ?email=: SELECT โ†’ Response 200 / 404.
  4. 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.