Exercise 2: Build the Inbox Triage Workflow (New)
Objective: Build a new workflow from scratch that automatically classifies incoming emails and writes the results to a Google Sheet.
What this workflow does: - Trigger: every time an email arrives in a specific inbox or with a specific label - AI step: classifies the email as one of four categories (action-required, FYI, marketing, spam) and writes a one-sentence summary - Downstream: write the classification, summary, and metadata to a Google Sheet - Result: you have a living log of your email intelligence
Steps:
- Set up your email trigger.
- In Make or n8n, add a "watch email" or similar trigger
- Configure it to monitor a Gmail label, a dedicated inbox, or your entire inbox
-
Test the trigger by sending yourself a test email and confirming the workflow runs
-
Configure the AI module.
- Add an OpenAI or Anthropic module
- Use the same API key from Exercise 1
- Write this system prompt:
``` You are an email triage assistant. Your job is to read an email and: 1. Classify it into exactly one of four categories: action-required, FYI, marketing, spam 2. Write a one-sentence summary of the email
Categories: - action-required: the email asks you to do something, respond, decide, approve, or attend - FYI: informational, no response needed, but relevant to you - marketing: promotional content, newsletters, ads (unless from a personal contact) - spam: irrelevant, unsolicited bulk email, or clearly unwanted
Rules for summary: - Exactly one sentence - No more than 150 characters - Focus on the key point only - Exclude greetings and pleasantries - No quotation marks
Output format: Return ONLY this JSON: { "classification": "[one of the four categories]", "summary": "[one sentence summary]", "confidence": [0.0 to 1.0] } ```
- Test the AI step with 5-10 real emails (forward some old emails to your trigger inbox or manually test with hardcoded email content). Run the workflow 5-10 times. Check:
- Does the classification match reality?
- Is the summary accurate?
- Is the JSON valid?
-
Adjust the prompt if you see problems
-
Parse the JSON. In your workflow, add a step to parse the AI's JSON output. Most platforms have a "JSON parser" module.
- Input: the AI step's output
-
Output: separate fields:
classification,summary,confidence -
Set up the Google Sheet.
- Create a Google Sheet with these columns:
- A: Date
- B: Sender (email address)
- C: Subject
- D: Classification
- E: Summary
- F: Confidence
- In your workflow, add a "Google Sheets" module that writes to this sheet
-
Map the fields: sender, subject, classification, summary, confidence to the corresponding columns
-
Test the complete workflow.
- Forward 5-10 real emails to your trigger inbox
- Let the workflow run
- Check the Google Sheet: are the rows populated correctly?
-
Check the classifications: do they match reality? If not, adjust the prompt
-
Iterate on the prompt (required).
- Run the workflow 10 times with different real emails
- Find at least 2 cases where the classification or summary was wrong
- Document those cases: what was the email about, what did the AI output, what should it have output
- Adjust the system prompt to handle those cases better
-
Run 10 more times and verify improvement
-
Document what you learned. Write:
- The final system prompt you settled on
- The two cases where you had to adjust the prompt (include: original output, desired output, what you changed in the prompt)
- One paragraph describing what you learned from the prompt iteration
Success criteria: - The workflow runs without errors - Emails trigger the workflow consistently - The AI-generated JSON is valid and parsed correctly - Data is written to the Google Sheet accurately - You've iterated at least twice based on real failures - You have a Google Sheet with at least 10 email classifications