What this workflow does
This workflow checks a Gmail inbox every minute for new emails sent to special email aliases. It reads only unprocessed emails and uses AI to turn each email into clear tasks and summaries. Then it sends these tasks to a Notion database as new pages automatically, saving time and stopping mistakes.
The goal is to help users stop copying and pasting email content manually. They get organized tasks in Notion without lifting a finger.
Who should use this workflow
This is for people who get many important emails daily and need to track tasks from them easily. It helps project managers, team leads, or anyone using Gmail and Notion for work management.
Users who want less manual work and fast task creation from emails will find this very useful.
Tools and services used
- Gmail: To receive and label emails automatically.
- Airtable: To store and manage routes linking email aliases to Notion databases.
- Notion API: To create pages in specified Notion databases.
- OpenAI GPT-4: To analyze emails and generate tasks and summaries.
- n8n workflow automation: To connect all these services and automate the process.
How this workflow works: Inputs, Processing, and Outputs
Inputs
- New incoming emails in Gmail inbox.
- Email aliases with plus-addressing to identify routing.
- API credentials for Gmail, Airtable, Notion, and OpenAI.
Processing steps
- The workflow checks Gmail every 60 seconds for new emails.
- It filters out emails already marked as processed or error to avoid duplicates.
- It extracts a route ID from the email recipient address using plus-addressing.
- Using the route ID, it fetches route details from Airtable including Notion database info.
- If the route is inactive, the workflow stops processing that email.
- It sends the email text to OpenAI GPT-4 using LangChain Agent prompts to create an actionable task with title, description, and bullet points.
- Separately, it asks GPT-4 to generate a detailed summary and metadata (sender, subject, date).
- A JavaScript code node formats the AI results into JSON blocks compatible with Notion page content.
- It sends an HTTP request to Notion API with the formatted content to create a new page.
- If the page is created successfully, the workflow marks the email as processed in Gmail.
- If there is an error (permission issue, bad config), the route is deactivated in Airtable and a notification email is sent to inform about the problem.
Output
- New task pages created automatically inside Notion databases.
- Gmail emails are labeled “Processed” or “Error” to track status.
- Error notifications sent to original email senders if a route fails.
Beginner step-by-step: How to use this workflow in n8n
Step 1: Import the workflow
- Download the workflow file using the Download button on this page.
- Open the n8n editor.
- Click “Import from File” and select the downloaded workflow file to load it.
Step 2: Add credentials and update settings
- Add your Gmail account OAuth2 credentials in the Gmail Trigger node.
- Set your Airtable API key and base/table names in the Airtable nodes.
- Add your Notion API key/token and update database URLs in the appropriate nodes.
- Enter your OpenAI API Key in the OpenAI nodes.
- Update Gmail label IDs for “Processed” and “Error” inside the Globals node. You can get label IDs by running the “Get all labels” node once.
Step 3: Test the workflow
- Send a test email using a plus-address alias matching one of your Airtable routes.
- Run the workflow manually in n8n to check if it triggers and creates a Notion page.
- Check your Notion database for the new page and Gmail inbox for label changes.
Step 4: Activate for production
- When tests work, activate the Gmail Trigger node for continuous polling.
- Monitor the workflow runs in n8n dashboard. Watch labels in Gmail and entries in Notion.
- Consider self-host n8n if preferred for full control or higher email volumes.
Customization ideas
- Change AI model settings in OpenAI nodes for different tone or detail.
- Add more fields extracted from emails like links or CC addresses.
- Extend Airtable routes for many email aliases and databases.
- Modify error handling to send repeated warnings instead of deactivating routes.
- Enhance task formatting to include images, tags, or checklist items.
Handling common issues
- “No active route anymore” message: This means the route ID from email alias is missing or inactive in Airtable. Check route IDs and activate them.
- Notion page not created and route deactivated: Usually caused by bad API token or wrong database URL. Verify API keys and URLs carefully.
- Duplicate Notion pages: Happens if Gmail labels are wrong or not applied. Confirm label IDs in Globals node and filtering logic.
Summary of benefits and results
✓ Save time by automating email task creation.
✓ Get clear actionable tasks and summaries using AI.
✓ Avoid missing information thanks to automatic labeling.
→ Create organized Notion pages directly from emails.
→ Improve workflow accuracy and reduce human errors.
