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

What we learn today โ€” a short video

โšก By the end of the session you will know

  • AI excels at classification, extraction, writing and summarizing โ€” not at calculations and facts.
  • Make AI Toolkit / OpenAI / Claude / Gemini; Credits by usage.
  • A prompt for automation: structured, a closed list, "don't make it up", JSON.
  • Structured output + Parse JSON + validation + a draft, not a send.
  • We built a smart inbox.

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 9: The inbox that reads itself

80 emails a day: quote requests, suppliers, complaints, spam. Now AI comes in: every email is classified, the lead's details are extracted into structured fields, and a reply draft is written in Maya's style โ€” which she only approves.

๐Ÿงต 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 what a language model can and can't do in automation.
  2. Know the AI providers in Make and the Make AI Toolkit.
  3. Write a structured prompt: role, task, context, format, examples.
  4. Get structured JSON output and map it (structured output / Parse JSON).
  5. Calculate costs: tokens, Credits and choosing a model.
  6. Handle errors and unexpected AI responses.
  7. Build a smart inbox that classifies, extracts and drafts.

Session agenda (3 hours)

  1. 00:00โ€“00:15 Review: the mini-CRM
  2. 00:15โ€“00:40 What AI does well in automation (and what not)
  3. 00:40โ€“01:05 Providers and modules in Make
  4. 01:05โ€“01:20 โ˜• Break
  5. 01:20โ€“01:50 Prompt engineering for automation
  6. 01:50โ€“02:15 Structured output, costs and errors
  7. 02:15โ€“02:50 Building together: Smart Inbox
  8. 02:50โ€“03:00 Summary and practice

What to prepare for this session

Make AI Provider

Make's built-in AI provider โ€” no external key, you pay in Credits.

An OpenAI / Anthropic / Gemini key

https://platform.openai.com (opens in a new window)
For a custom connection (on paid plans with some modules).

Gmail with sample emails

10 emails: leads, support, spam, invoices.

The provider's playground

https://console.anthropic.com (opens in a new window)
For testing prompts before putting them into Make.

What does AI do well in automation?

๐Ÿท๏ธ

Classification

An email โ†’ lead / support / invoice / spam. A review โ†’ positive / negative.
๐Ÿ”Ž

Extraction

A name, a phone, a budget from free text. Data from an invoice.
โœ๏ธ

Writing

A draft reply, a call summary, a social post.
๐ŸŒ

Translation and normalization

Hebrew โ†” English, spelling fixes, a consistent format.
๐Ÿ“

Summarizing

A long email thread โ†’ 3 lines.
๐Ÿงญ

Decisions under uncertainty

Is it urgent? Who should get it?
โŒ Where AI fails
  • Precise calculations (use functions)
  • Facts you didn't give it (it makes them up)
  • Irreversible decisions without control
  • A consistent format โ€” without instructions and checks
โœ… How to cope
  • AI extracts, Make calculates
  • Give it context (RAG โ€” session 11)
  • Human-in-the-loop: a draft and not a send
  • Structured JSON output + validation

Providers and modules in Make

OptionWhat it isWhen
Make AI Toolkit / Make AI ProviderReady Make modules (classify, extract, summarize, translate, Ask anything). No key neededA quick start, every plan
OpenAI (ChatGPT)Generate a response / completion, Transcribe, Images, EmbeddingsWhen you want a specific model or advanced capabilities
Anthropic ClaudeCreate a prompt / messageLong text, multilingual, complex instructions
Google Gemini AIGenerate contentDocuments and images, the Google ecosystem
HTTP to any APIAny other providerLocal models / small providers
๐Ÿ’ฐ AI uses Credits by usageUnlike a regular module (one Credit), Make's AI modules use Credits by actual tokens. With your own key โ€” you pay the provider directly by tokens, and Make a Credit for the action. The input (prompt + email) is usually the big part: shorten emails (HTML to text, cutting signatures).
Choosing a modelWhen
A small, fast model (Haiku / mini / Flash)Classification, simple extraction, high volumes
A mid-size model (Sonnet / a mainstream GPT)Writing, complex extraction, high-quality multilingual text
A large / reasoning modelComplex decisions, analyzing long documents

Prompt engineering for automation

A prompt in automation is different from a chat: nobody will read the answer and correct it โ€” it goes straight to the next module. So it needs to be precise, predictable and structured.

[System / Instructions]
You classify incoming emails for an automation company.
The task: classify one email and extract details.

Categories (choose exactly one):
- lead      โ€” an inquiry from a potential customer
- support   โ€” an existing customer with a problem
- invoice   โ€” an invoice or a payment
- spam      โ€” advertising, phishing, irrelevant
- other     โ€” everything else

Rules:
- Don't make up details. A field that doesn't appear โ€” null.
- Phone in +972 format.
- budget as a number in ILS (60 thousand โ†’ 60000).
- reply: a short draft reply, in the first person, in a warm and professional tone. Only if category = lead or support.

Return JSON only, with no extra text, in the structure:
{"category":"", "urgency":"low|medium|high", "sentiment":"", "lead":{"name":null,"company":null,"phone":null,"budget":null,"seats":null,"timeline":null}, "summary":"", "reply":""}

[User]
From: {{1.from}}
Subject: {{1.subject}}
Content:
{{substring(1.text; 0; 4000)}}
PartWhy
Role + taskFocuses the model
A closed list of categoriesSo the Router works โ€” no "Lead" and "lead " and "leads"
"Don't make it up" rulesReduces hallucinations
An exact formatMakes Parse JSON possible
Shortening the inputSaves tokens and Credits
Examples (few-shot)Improves consistency in hard cases

Structured output โ€” JSON you can map

Three ways, from best to less good:

  1. Structured output / JSON schema in the module (when the provider and the module support it) โ€” the model is bound to the structure.
  2. Response format: JSON + Parse JSON with a data structure.
  3. An instruction in the text + Parse JSON โ€” and be ready for an error.
โš ๏ธ AI sometimes wraps in ```jsonEven when you say "JSON only", some models add ```json. Before Parse JSON: {{{{replace(replace(result; "```json"; emptystring); "```"; emptystring)}}}} โ€” or use structured output.

Validation after AI

  • Filter: category is in the allowed list.
  • An error handler on Parse JSON โ†’ Resume with category = "other".
  • Check the phone with a regex even if AI returned it.
  • Human-in-the-loop: a draft in Gmail, not a send.

Smart Inbox โ€” the architecture

๐Ÿ’ก Start with classification onlyFirst week: classification and labels only. Check 50 emails by hand โ€” how many were right? Only after that add extraction and drafts. That's how you build trust in the system.

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?

Clean and shorten before the AI (fewer tokens), and route only once there's a structured category.

A real-world case study

"Levinson Law Office". The info@ inbox got about 80 emails a day: existing clients, new inquiries, court notices and spam. A secretary sorted them manually for about two hours every morning. A smart inbox with Claude: classification into 6 categories, extracting the case number from court notices (regex + AI), drafts for new inquiries. Accuracy after two weeks of calibration: about 95%. Result: the secretary approves drafts in 20 minutes instead of two hours, and no court notice was forgotten.

Frequently asked questions

Is the clients' data sent to OpenAI?

Yes, to the provider you chose. Check the provider's data policy (use in training, storage region), and consider masking sensitive details before sending.

Why not send the reply automatically?

AI is sometimes wrong. A draft + human approval = speed + safety. When the accuracy is proven in a certain category โ€” you can automate only that one.

How much does it cost?

An email of about 500 words + the prompt โ‰ˆ 1,500 tokens. On a small model โ€” fractions of a cent; on a big model โ€” a few cents. 80 emails a day = a few dollars a month.

Make AI Toolkit or OpenAI?

The Toolkit is quick to start and works on every plan. Your own provider gives control over the model and sometimes a lower cost at volume.

Quick understanding check

What now?

You finished the lecture! Go to the practice page โ€” multiple-choice questions and tasks that build Smart Inbox: Gmail โ†’ AI classification โ†’ extracting lead details โ†’ a draft reply โ†’ labeling. Stuck? The help guide breaks every task into steps. Only after you have tried, peek at the full solution.