Module: 3/5
Lesson: 8/7
Exercises:
Module 3 | Exercises

Build the Inbox Triage Workflow (New)

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:

  1. Set up your email trigger.
  2. In Make or n8n, add a "watch email" or similar trigger
  3. Configure it to monitor a Gmail label, a dedicated inbox, or your entire inbox
  4. Test the trigger by sending yourself a test email and confirming the workflow runs

  5. Configure the AI module.

  6. Add an OpenAI or Anthropic module
  7. Use the same API key from Exercise 1
  8. 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] } ```

  1. 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:
  2. Does the classification match reality?
  3. Is the summary accurate?
  4. Is the JSON valid?
  5. Adjust the prompt if you see problems

  6. Parse the JSON. In your workflow, add a step to parse the AI's JSON output. Most platforms have a "JSON parser" module.

  7. Input: the AI step's output
  8. Output: separate fields: classification, summary, confidence

  9. Set up the Google Sheet.

  10. Create a Google Sheet with these columns:
    • A: Date
    • B: Sender (email address)
    • C: Subject
    • D: Classification
    • E: Summary
    • F: Confidence
  11. In your workflow, add a "Google Sheets" module that writes to this sheet
  12. Map the fields: sender, subject, classification, summary, confidence to the corresponding columns

  13. Test the complete workflow.

  14. Forward 5-10 real emails to your trigger inbox
  15. Let the workflow run
  16. Check the Google Sheet: are the rows populated correctly?
  17. Check the classifications: do they match reality? If not, adjust the prompt

  18. Iterate on the prompt (required).

  19. Run the workflow 10 times with different real emails
  20. Find at least 2 cases where the classification or summary was wrong
  21. Document those cases: what was the email about, what did the AI output, what should it have output
  22. Adjust the system prompt to handle those cases better
  23. Run 10 more times and verify improvement

  24. Document what you learned. Write:

  25. The final system prompt you settled on
  26. The two cases where you had to adjust the prompt (include: original output, desired output, what you changed in the prompt)
  27. 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


🔒

This lesson is premium

Get full access to AI Workflows — all modules, all lessons, lifetime access.

Already purchased? Sign in to restore access.