Tutorial: build a small CRM
In this tutorial you build a customer relationship manager with companies, contacts and deals, a sales pipeline, a lead form and a revenue dashboard. Time: about 30 minutes. No code needed.
Step 1 – Create the database
- Sidebar → + New → Database, name it
CRM. - Rename the first table to
Companies. - Set up its fields:
| Field | Type | Options |
|---|---|---|
| Name | Single line text | primary field |
| Website | URL | |
| Industry | Single select | Software, Retail, Health, Logistics |
| Country | Single select | United States, Germany, Netherlands |
Add three or four companies.
Step 2 – Contacts and deals
Create a Contacts table:
| Field | Type |
|---|---|
| Name | Single line text |
| Phone | Phone number |
| Company | Link to table → Companies |
Create a Deals table:
| Field | Type | Options |
|---|---|---|
| Title | Single line text | |
| Company | Link to table → Companies | |
| Contact | Link to table → Contacts | |
| Stage | Single select | Lead, Qualified, Proposal, Won, Lost |
| Amount | Number | 2 decimals, prefix € |
| Expected close | Date | |
| Owner | Collaborator |
Notice that Companies now has Contacts and Deals fields automatically:
link fields always work in both directions.
Step 3 – Computed fields
In Companies add:
- Open pipeline – Rollup of
Deals→Amountwithsum, or a formula:sum(filter(lookup('Deals', 'Amount'), lookup('Deals', 'Stage') != 'Won')). - Deals count – a Count field on
Deals.
In Deals add a formula field Days to close:
date_diff('dd', today(), field('Expected close'))
Step 4 – A pipeline board
- In
Dealscreate a Kanban view namedPipeline, stacked byStage. - Show
Company,AmountandOwneron the cards. - Drag cards between columns as deals progress.
Add a Grid view My open deals with the filters Owner is me and Stage
is not Won and Stage is not Lost, sorted by Expected close.
Step 5 – A lead form
- In
Dealscreate a Form viewRequest a quote. - Add
Title,CompanyandAmountand write friendly labels. - Set
Stageto be pre-filled withLeadusing a hidden field (?prefill_Stage=Lead&hide_Stage). - Share view and put the link on your website.
Step 6 – A revenue dashboard
- + New → Dashboard named
Sales. - Add a Summary widget:
Deals,Amount,sum, using a view filtered on Stage = Won. - Add a Chart widget:
Deals, seriessum of Amount, grouped byStage.
Step 7 – Notify the team
- + New → Automation named
CRM alerts. - Trigger: Rows are updated in
Deals. - Add a Router with the condition Stage is Won.
- In that branch add Send an email (or a Slack message) with the subject
Deal won:+ the deal title and the amount in the body. - Test run, then Publish.
Where to go next
- Let an AI agent keep the CRM tidy: Connect an agent.
- Publish a monthly revenue page: Reports.