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

Blueprint files + how to compare with the solution

All the files and import instructions: the Blueprint files page.

For every task you will find four layers here: an animated click simulation, an illustrated step-by-step guide (a marked screenshot for every step + "what to click and what to type" instructions), the final result and a table of common problems.

โ„น๏ธ How do you import a Blueprint into Make?
  1. Open a new scenario: Scenarios โ†’ Create a new scenario.
  2. Click โ‹ฏ (More) in the bottom bar โ†’ Import Blueprint.
  3. Choose a JSON file you saved (Export Blueprint) and click Save.
  4. Modules that need a connection will be marked โ€” open each one and choose your connection.
  5. A Blueprint does not include passwords or keys โ€” you always create the connections again.

Solution to Part A โ€” multiple-choice questions

  1. What characterizes a data store?
    โœ… A small table inside Make with a key and a data structure
    For state and dedupe.
  2. A linked record in Airtable:
    โœ… A relation between records in different tables
    Like a foreign key.
  3. Which query returns a total per stage?
    โœ… SELECT stage, SUM(value) FROM deals GROUP BY stage
    GROUP BY.
  4. Where do you keep a Supabase service_role key?
    โœ… In a connection / Keychain
    A key with full permissions!
  5. RETURNING id in an INSERT:
    โœ… Returns the new record's id
    Useful for an API response.
  6. When do you move from Sheets to a DB?
    โœ… When there is a lot of data, relations, and parallel work
    Scale and integrity.
  7. Check the existence of a record returns:
    โœ… Whether a key exists (Boolean)
    For checking duplicates.
  8. Airtable Search Records with a formula:
    โœ… Filters on Airtable's side
    Saves downloading.

Solution to task 1: A data store as memory

The solution in four layers: a click simulation (the cursor shows what to click, what to type and in which order), an illustrated guide for every step, the written steps and a simulation of the result.

๐Ÿ“ธ The illustrated guide โ€” step by step, click by click

For every step: a screenshot of the (simulated) Make editor with the click spot marked, and below it exactly what to click and what to type. You can work from here next to an open Make window.

  1. 1
    Data structure
    Data stores โ†’ Add data store โ†’ Data structure: Add โ†’ fields.
    Marked screenshot โ€” step 1: Data structure
    ๐Ÿ“ธ Step 1 โ€” the red ring marks where to click
    1. Open eu2.make.com/datastores in your browser (the โ€œData storesโ€ screen).
    2. On the screen you will see: Add data store ยท Name: leads_seen ยท Data structure: email (Text) ยท count (Number) ยท firstSeen (Date)
    3. Click the Add button.
  2. 2
    In the scenario
    After the clean-up: Data store โ†’ Get a record (key: email).
    Marked screenshot โ€” step 2: In the scenario
    ๐Ÿ“ธ Step 2 โ€” the red ring marks where to click
    1. Click the + (the big circle in the middle, or the half-circle to the right of the last module).
    2. In the search box type Data store and click the Data store app.
    3. In the list of actions choose Get a record.
    4. In the Data store field type: leads_seen
    5. In the Key field map (drag from the panel or type): {{email}}
    6. Click OK (or Save) to close the module window.
  3. 3
    Filter
    count Does not exist.
    Marked screenshot โ€” step 3: Filter
    ๐Ÿ“ธ Step 3.1 โ€” the red ring marks where to click
    Marked screenshot โ€” step 3: Filter
    ๐Ÿ“ธ Step 3.2 โ€” the red ring marks where to click
    1. Click the + (the big circle in the middle, or the half-circle to the right of the last module).
    2. In the search box type Tools and click the Tools app.
    3. In the list of actions choose Compose a string.
    4. In the Text field map (drag from the panel or type): New lead: {{email}}
    5. Click OK (or Save) to close the module window.
    6. Click the ๐Ÿ”ง icon on the line between the last two modules โ†’ Set up a filter.
    7. In the Label field type: New.
    8. In Condition set: count ยท Basic: Does not exist (pick the field from the panel, the operator from the list, and type a value).
    9. Click OK โ€” a funnel icon appears on the line.
  4. 4
    Update
    Add/replace a record: key email, count = ifempty(โ€ฆ)+1, firstSeen = ifempty(โ€ฆ; now).
    Marked screenshot โ€” step 4: Update
    ๐Ÿ“ธ Step 4.1 โ€” the red ring marks where to click
    Marked screenshot โ€” step 4: Update
    ๐Ÿ“ธ Step 4.2 โ€” the red ring marks where to click
    1. Click the + (the big circle in the middle, or the half-circle to the right of the last module).
    2. In the search box type Data store and click the Data store app.
    3. In the list of actions choose Add/replace a record.
    4. In the Key field map (drag from the panel or type): {{email}}
    5. In the count field map (drag from the panel or type): {{ifempty(2.count; 0) + 1}}
    6. In the firstSeen field map (drag from the panel or type): {{ifempty(2.firstSeen; now)}}
    7. Click OK (or Save) to close the module window.
    8. Click โ–ถ Run once at the bottom left.
    9. When the run ends, bubbles with numbers appear above the modules. Click the bubble of the last module and check the Output.
    10. The output should look roughly like this:
      {
       "key": "dana@acme.co.il",
       "count": 1
      }

๐Ÿ› ๏ธ Common problems and how to fix them

SymptomFix
Get a record stops when there is no recordIn the settings: make sure the module returns an empty bundle, or use Check the existence.
The key doesn't matchCapital letters/spaces.

Solution to task 2: An Airtable CRM

The solution in four layers: a click simulation (the cursor shows what to click, what to type and in which order), an illustrated guide for every step, the written steps and a simulation of the result.

๐Ÿ“ธ The illustrated guide โ€” step by step, click by click

For every step: a screenshot of the (simulated) Make editor with the click spot marked, and below it exactly what to click and what to type. You can work from here next to an open Make window.

  1. 1
    Base
    Contacts (Name, Email, Company), Deals (Name, Contact โŸถ link, Stage, Value).
    Marked screenshot โ€” step 1: Base
    ๐Ÿ“ธ Step 1 โ€” the red ring marks where to click
    1. Open airtable.com in your browser (the โ€œCRM Baseโ€ screen).
    2. On the screen you will see: Contacts: Name ยท Email ยท Company ยท Deals: Name ยท Contact (link) ยท Stage ยท Value
  2. 2
    Token
    airtable.com/create/tokens โ†’ scopes data.records:read/write, schema.bases:read โ†’ Base.
    Marked screenshot โ€” step 2: Token
    ๐Ÿ“ธ Step 2 โ€” the red ring marks where to click
    1. Open airtable.com/create/tokens in your browser (the โ€œCreate personal access tokenโ€ screen).
    2. On the screen you will see: Scopes: data.records:read ยท data.records:write ยท schema.bases:read ยท Access: CRM Base
    3. Click the Create token button.
  3. 3
    Upsert
    Airtable โ†’ Upsert a Record (or Search โ†’ Router โ†’ Create/Update).
    Marked screenshot โ€” step 3: Upsert
    ๐Ÿ“ธ Step 3.1 โ€” the red ring marks where to click
    Marked screenshot โ€” step 3: Upsert
    ๐Ÿ“ธ Step 3.2 โ€” the red ring marks where to click
    1. In the left menu click Scenarios โ†’ + Create a new scenario.
    2. Click the scenario name at the top left (New scenario) and type: S08 - Airtable.
    3. Click the + (the big circle in the middle, or the half-circle to the right of the last module).
    4. In the search box type Airtable and click the Airtable app.
    5. In the list of actions choose Upsert a Record.
    6. In the Base field type: CRM
    7. In the Table field type: Contacts
    8. In the Fields to merge on field type: Email
    9. Click OK (or Save) to close the module window.
  4. 4
    Deal
    Airtable โ†’ Create a Record โ†’ Contact: an array with the id.
    Marked screenshot โ€” step 4: Deal
    ๐Ÿ“ธ Step 4.1 โ€” the red ring marks where to click
    Marked screenshot โ€” step 4: Deal
    ๐Ÿ“ธ Step 4.2 โ€” the red ring marks where to click
    1. Click the + (the big circle in the middle, or the half-circle to the right of the last module).
    2. In the search box type Airtable and click the Airtable app.
    3. In the list of actions choose Create a Record.
    4. In the Table field type: Deals
    5. In the Contact field map (drag from the panel or type): {{1.id}}
    6. In the Stage field type: Proposal
    7. In the Value field type: 18000
    8. Click OK (or Save) to close the module window.
    9. Click โ–ถ Run once at the bottom left.
    10. When the run ends, bubbles with numbers appear above the modules. Click the bubble of the last module and check the Output.
    11. The output should look roughly like this:
      {
       "id": "recA1b2โ€ฆ",
       "fields": {
        "Stage": "Proposal"
       }
      }

๐Ÿ› ๏ธ Common problems and how to fix them

SymptomFix
INVALID_MULTIPLE_CHOICE_OPTIONSA Stage value that doesn't exist in the single select.
403The token wasn't given access to this base.

Solution to task 3: Supabase + an API

The solution in four layers: a click simulation (the cursor shows what to click, what to type and in which order), an illustrated guide for every step, the written steps and a simulation of the result.

๐Ÿ“ธ The illustrated guide โ€” step by step, click by click

For every step: a screenshot of the (simulated) Make editor with the click spot marked, and below it exactly what to click and what to type. You can work from here next to an open Make window.

  1. 1
    Table
    Supabase โ†’ SQL Editor โ†’ CREATE TABLE.
    Marked screenshot โ€” step 1: Table
    ๐Ÿ“ธ Step 1 โ€” the red ring marks where to click
    1. Open supabase.com/dashboard/project/โ€ฆ/sql in your browser (the โ€œSQL Editorโ€ screen).
    2. On the screen you will see: create table deals (id bigserial primary key, email text, title text, value numeric, stage text, created_at timestamptz default now());
    3. Click the Run button.
  2. 2
    Connection
    PostgreSQL โ†’ Execute a query โ†’ Add connection (Database details โ†’ Connection string).
    Marked screenshot โ€” step 2: Connection
    ๐Ÿ“ธ Step 2.1 โ€” the red ring marks where to click
    Marked screenshot โ€” step 2: Connection
    ๐Ÿ“ธ Step 2.2 โ€” the red ring marks where to click
    1. In the left menu click Scenarios โ†’ + Create a new scenario.
    2. Click the scenario name at the top left (New scenario) and type: S08 - CRM API.
    3. Click the + (the big circle in the middle, or the half-circle to the right of the last module).
    4. In the search box type PostgreSQL and click the PostgreSQL app.
    5. In the list of actions choose Execute a query.
    6. Keep the defaults.
    7. Click OK (or Save) to close the module window.
    8. In the PostgreSQL module click Add next to the Connection field โ†’ Create a connection.
    9. Fill in: Host ยท Port 5432 ยท Database postgres ยท User ยท Password, and confirm (Save / Sign in with Google, etc.).
  3. 3
    POST
    Webhook โ†’ auth โ†’ Execute a query with parameters โ†’ Create JSON โ†’ 201.
    Marked screenshot โ€” step 3: POST
    ๐Ÿ“ธ Step 3.1 โ€” the red ring marks where to click
    Marked screenshot โ€” step 3: POST
    ๐Ÿ“ธ Step 3.2 โ€” the red ring marks where to click
    1. Click the + (the big circle in the middle, or the half-circle to the right of the last module).
    2. In the search box type Webhooks and click the Webhooks app.
    3. In the list of actions choose Custom webhook.
    4. In the Webhook field type: POST /deal
    5. Click OK (or Save) to close the module window.
    6. Click the ๐Ÿ”ง icon on the line between the last two modules โ†’ Set up a filter.
    7. In the Label field type: Valid key.
    8. In Condition set: x-api-key ยท Equal to ยท โ€ฆ (pick the field from the panel, the operator from the list, and type a value).
    9. Click OK โ€” a funnel icon appears on the line.
    10. Click module number 1 to open its settings.
    11. In the Query field type: insert into deals (email,title,value,stage) values ($1,$2,$3,$4) returning id
    12. In the Parameters field map (drag from the panel or type): {{email}}, {{title}}, {{value}}, {{stage}}
    13. Click OK.
    14. Click the + (the big circle in the middle, or the half-circle to the right of the last module).
    15. In the search box type JSON and click the JSON app.
    16. In the list of actions choose Create JSON.
    17. In the id field map (drag from the panel or type): {{id}}
    18. Click OK (or Save) to close the module window.
    19. Click the + (the big circle in the middle, or the half-circle to the right of the last module).
    20. In the search box type Webhooks and click the Webhooks app.
    21. In the list of actions choose Webhook response.
    22. In the Status field type: 201
    23. Click OK (or Save) to close the module window.
  4. 4
    GET
    Webhook โ†’ select * from deals where email = $1 โ†’ Array aggregator โ†’ Router 200/404.
    Marked screenshot โ€” step 4: GET
    ๐Ÿ“ธ Step 4.1 โ€” the red ring marks where to click
    Marked screenshot โ€” step 4: GET
    ๐Ÿ“ธ Step 4.2 โ€” the red ring marks where to click
    1. In the left menu click Scenarios โ†’ + Create a new scenario.
    2. Click the scenario name at the top left (New scenario) and type: S08 - GET deals.
    3. Click the + (the big circle in the middle, or the half-circle to the right of the last module).
    4. In the search box type Webhooks and click the Webhooks app.
    5. In the list of actions choose Custom webhook.
    6. Keep the defaults.
    7. Click OK (or Save) to close the module window.
    8. Click the + (the big circle in the middle, or the half-circle to the right of the last module).
    9. In the search box type PostgreSQL and click the PostgreSQL app.
    10. In the list of actions choose Execute a query.
    11. In the Query field type: select * from deals where email = $1
    12. Click OK (or Save) to close the module window.
    13. Click the + (the big circle in the middle, or the half-circle to the right of the last module).
    14. In the search box type Flow Control and click the Flow Control app.
    15. In the list of actions choose Array aggregator.
    16. Keep the defaults.
    17. Click OK (or Save) to close the module window.
    18. Click the + (the big circle in the middle, or the half-circle to the right of the last module).
    19. In the search box type Flow Control and click the Flow Control app.
    20. In the list of actions choose Router.
    21. Keep the defaults.
    22. Click OK (or Save) to close the module window.
    23. Click the small + coming out of the Router (to its right) to open a new route.
    24. In the search box type Webhooks and click the Webhooks app.
    25. In the list of actions choose Webhook response.
    26. In the Status field type: 200
    27. Click OK (or Save) to close the module window.
    28. Click the small + coming out of the Router (to its right) to open a new route.
    29. In the search box type Webhooks and click the Webhooks app.
    30. In the list of actions choose Webhook response.
    31. In the Status field type: 404
    32. Click OK (or Save) to close the module window.
    33. Click the ๐Ÿ”ง on the line of the last route โ†’ Set up a filter.
    34. Type Fallback as the Label, and tick Fallback route: Yes.
    35. Click OK โ€” this route runs only when no other route matched.

๐ŸŽฌ The final result โ€” run the simulation

๐Ÿ› ๏ธ Common problems and how to fix them

SymptomFix
connection refused / timeoutWrong host/port or SSL off.
permission denied for tableThe connection's user has no permissions โ€” use postgres or set up GRANT.

Solution to task 4: A daily pipeline report

The solution in four layers: a click simulation (the cursor shows what to click, what to type and in which order), an illustrated guide for every step, the written steps and a simulation of the result.

๐Ÿ“ธ The illustrated guide โ€” step by step, click by click

For every step: a screenshot of the (simulated) Make editor with the click spot marked, and below it exactly what to click and what to type. You can work from here next to an open Make window.

  1. 1
    Trigger
    Every day 08:00.
    Marked screenshot โ€” step 1: Trigger
    ๐Ÿ“ธ Step 1.1 โ€” the red ring marks where to click
    Marked screenshot โ€” step 1: Trigger
    ๐Ÿ“ธ Step 1.2 โ€” the red ring marks where to click
    1. In the left menu click Scenarios โ†’ + Create a new scenario.
    2. Click the scenario name at the top left (New scenario) and type: S08 - Daily Pipeline.
    3. Click the clock ๐Ÿ•’ in the bottom bar (next to the ON/OFF switch).
    4. In the schedule settings choose: Every day ยท 08:00 and click OK.
  2. 2
    Query
    Execute a query: GROUP BY.
    Marked screenshot โ€” step 2: Query
    ๐Ÿ“ธ Step 2 โ€” the red ring marks where to click
    1. Click the + (the big circle in the middle, or the half-circle to the right of the last module).
    2. In the search box type PostgreSQL and click the PostgreSQL app.
    3. In the list of actions choose Execute a query.
    4. In the Query field type: select stage, count(*) deals, sum(value) total from deals group by stage
    5. Click OK (or Save) to close the module window.
  3. 3
    Text
    Text aggregator: {{stage}}: {{deals}} ยท ILS {{formatNumber(total;0;".";",")}}.
    Marked screenshot โ€” step 3: Text
    ๐Ÿ“ธ Step 3 โ€” the red ring marks where to click
    1. Click the + (the big circle in the middle, or the half-circle to the right of the last module).
    2. In the search box type Tools and click the Tools app.
    3. In the list of actions choose Text aggregator.
    4. In the Text field map (drag from the panel or type): {{stage}}: {{deals}} ยท โ‚ช{{formatNumber(total;0;".";",")}}
    5. Click OK (or Save) to close the module window.
  4. 4
    Stuck
    A second query โ†’ Text aggregator โ†’ the same message.
    Marked screenshot โ€” step 4: Stuck
    ๐Ÿ“ธ Step 4.1 โ€” the red ring marks where to click
    Marked screenshot โ€” step 4: Stuck
    ๐Ÿ“ธ Step 4.2 โ€” the red ring marks where to click
    1. Click the + (the big circle in the middle, or the half-circle to the right of the last module).
    2. In the search box type PostgreSQL and click the PostgreSQL app.
    3. In the list of actions choose Execute a query.
    4. In the Query field type: select โ€ฆ where updated_at < now() - interval '14 days'
    5. Click OK (or Save) to close the module window.
    6. Click the + (the big circle in the middle, or the half-circle to the right of the last module).
    7. In the search box type Tools and click the Tools app.
    8. In the list of actions choose Text aggregator.
    9. Keep the defaults.
    10. Click OK (or Save) to close the module window.
    11. Click the + (the big circle in the middle, or the half-circle to the right of the last module).
    12. In the search box type Telegram Bot and click the Telegram Bot app.
    13. In the list of actions choose Send a Text Message or a Reply.
    14. Keep the defaults.
    15. Click OK (or Save) to close the module window.
    16. Click โ–ถ Run once at the bottom left.
    17. When the run ends, bubbles with numbers appear above the modules. Click the bubble of the last module and check the Output.
    18. The output should look roughly like this:
      {
       "text": "proposal: 4 ยท โ‚ช72,000\nwon: 2 ยท โ‚ช56,000"
      }

๐Ÿ› ๏ธ Common problems and how to fix them

SymptomFix
Telegram was sent 4 timesThe Text aggregator is missing.
total arrives as textPostgres numeric โ€” parseNumber.

Solution to the bonus challenge

A source / last_synced_at field: when you update from one side, mark source = make and last_synced_at = now. On the other side โ€” a filter that ignores changes whose updated_at โ‰ค last_synced_at + a few seconds. Without it, every update "bounces" the other side forever.