Trigger Workflows from Emails
The outcome: After this challenge, every email hitting your inbox will automatically flow into n8n for processing. No more manually checking, sorting, or forwarding - your inbox becomes a data stream you can automate.
Why this matters: Email is still the #1 business communication channel. Companies spend thousands on help desk software that does exactly this - capture and route emails. You're building the foundation for your own AI-powered email system.
The Gmail Trigger node polls your inbox and fires whenever new emails arrive. You'll extract the essential fields needed for the classification and routing you'll build in later challenges.
Before you start: You'll need Gmail OAuth credentials set up in n8n. Follow the official n8n guide if you haven't done this yet.
What you'll learn:
- Gmail Trigger - automatically detect new emails
- Email data structure - what fields are available (sender, subject, body, ID)
- Edit Fields node - extract and reshape data for downstream processing
Your Task
- 1Copy the exercise below
- 2Paste into your n8n editor (Ctrl+V)
- 3Solve it — use hints if you get stuck
- 4Check the solution when done
Set up email capture for your support inbox:
- Add a Gmail Trigger node configured to poll every minute
- Add an Edit Fields node to extract:
- Sender's email address
- Subject line
- Email body text
- Email ID (for later actions)
Test it: Send yourself a test email and check that the workflow triggers and extracts the fields correctly.
Expected output: A clean object with sender, subject, body, and id fields.
Hint: If some fields are missing in the output, check the Gmail Trigger node options.
Get the exercise workflow
Create a free account to copy exercises into your n8n editor.