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

In one sentence

Students build a Google-based CRM with an upsert, an HTML email, Drive folders and Calendar meetings.

Preparation before the session

Time plan

  1. 00:00โ€“00:15 Review: the leads API
  2. 00:15โ€“00:35 Connecting Google: OAuth and permissions
  3. 00:35โ€“01:15 Google Sheets in depth + upsert
  4. 01:15โ€“01:30 โ˜• Break
  5. 01:30โ€“01:55 Gmail: HTML emails
  6. 01:55โ€“02:15 Drive and Calendar
  7. 02:15โ€“02:50 Building together: a Google-based CRM
  8. 02:50โ€“03:00 Summary and practice

Lecture parts and activity type

PartActivity type
Connecting GoogleDemo
Google Sheets as a databaseExplanation
The upsert pattern โ€” without duplicatesBuilding together
Gmail โ€” formatted emailsDemo
Google Drive and CalendarDemo
Building together: a Google-based CRMBuilding together

The 3 messages that must get across

  1. A search that found nothing = 0 bundles.
  2. An upsert in every CRM.
  3. A service account for connections.

Questions for class discussion

  • Where in your organization is there a "sheet everyone edits"?
  • When is Sheets no longer enough?
  • What's the risk in connecting Drive with full permission?

Live demo script

Connect Google and build a CRM sheet

  1. Sheet โ€” Create a sheet and write the headers in row 1.
  2. Connection โ€” Google Sheets โ†’ Add a Row โ†’ Add connection โ†’ Sign in โ†’ tick everything.
  3. Add โ€” Spreadsheet: Course CRM, Sheet: Sheet1, Table contains headers: Yes โ†’ fill in the fields โ†’ Run once.
  4. Search โ€” Search Rows โ†’ Filter: email = ronit@acme.co.il โ†’ Run once โ†’ in the bubble: Row number.

An upsert that doesn't break

  1. Input โ€” Set multiple variables with a lead (or a webhook from session 4).
  2. Search โ€” Google Sheets โ†’ Search Rows, filter email, Limit 1.
  3. Aggregator โ€” Flow Control โ†’ Array aggregator, Source module: Search Rows, fields: Row number, email.
  4. Router โ€” Route 1 filter length > 0 โ†’ Update a Row; route 2 fallback โ†’ Add a Row.
  5. Test โ€” Run once twice with the same email, and once with a new email.

An HTML welcome email

  1. Module โ€” On the new route: Gmail โ†’ Send an email โ†’ connection.
  2. Fields โ€” To: {{email}}, Subject: Welcome {{name}} ๐Ÿ‘‹.
  3. HTML โ€” Paste the template from the lecture and map the fields.
  4. Test โ€” Run once with your own email.

Problems students will run into

ProblemQuick fix
Access blocked / This app is blockedA Workspace account with a policy โ€” an admin needs to approve, or use a private account.
The columns don't appearTable contains headers: No โ€” change to Yes and Refresh.
The scenario stops after SearchYou forgot the aggregator.
Update updates the wrong rowRow number is mapped from the wrong place โ€” check in the bubble.
Still duplicatesSpaces/capital letters in the email โ€” lower(trim()) both in the search and when saving.
The layout is brokenA <style> block was stripped โ€” use inline CSS.
Insufficient permissionThe send permission wasn't approved in the connection โ€” Reauthorize.
The meeting is at 12:00The time zone wasn't stated.
Folder not foundThe parent folder was chosen from another account.

Tips from the classroom

  • The Gmail connection is the main sticking point โ€” prepare the instructions in advance.
  • Demonstrate on purpose an empty search that stops the scenario.
  • Have every student test "the same email twice".

Adapting to different levels

For students who struggle: Sheets only, without Drive/Calendar.

For fast students: Template + PDF + the availability challenge.

Answer key โ€” multiple-choice questions

Students see the answers in shuffled order, so the key gives the wording of the right answer.

#Right answer
1The names in the first row (headers)
2An Array aggregator after the search and a length check
3Bulk Add Rows
4Create an OAuth client in Google Cloud per Make's instructions
5Docs โ†’ Create a Document from a Template
6Gmail removes some style tags
7A dedicated service account
8The time zone / a full date

Homework

  1. A full CRM with 3 test leads.
  2. Preparing for session 6: create an Invoices sheet with 10 rows: client, email, amount, due (DD/MM/YYYY), paid (yes/no).