Automate Your Email Workflow with n8n, Gmail, and Airtable

Managing emails manually can be time-consuming and error-prone, especially when you’re tracking tasks, leads, or support tickets. Fortunately, with n8n, Gmail, and Airtable, you can create a powerful automation workflow to classify, store, and manage emails automatically. In this blog, we’ll walk you through a step-by-step setup.
Why Automate Your Email Workflow?
Save time: Automatically process incoming emails without manual copying or sorting.
Reduce errors: Avoid missing important emails or misplacing data.
Centralized data: Store all email information in Airtable for reporting, analysis, or task tracking.
Scalable: Add AI classification, notifications, or other integrations easily in the future.
Tools You’ll Need
n8n – Workflow automation platform
Gmail – Email source
Airtable – Cloud-based database to store email records
Step 1: Prepare Your Airtable Base
Create a new Workspace (optional) in Airtable.
Create a Base called
Email Automation.Create a Table named
Email Logswith the following fields:
| Field | Type |
|---|---|
| Subject | Single line text |
| Body | Long text |
| Status | Single select (e.g., New, Processed) |
| Date | Date |
Step 2: Generate Airtable API Token
Go to Airtable tokens
Click Create Token and name it
n8n IntegrationEnable scopes:
data.records:readanddata.records:writeandschema.bases:readGive access to the
Email AutomationbaseCopy the token — you’ll use it in n8n.
Step 3: Set Up n8n Workflow
3.1 Create a Workflow
Login to n8n and click New Workflow
Rename it:
Email Automation Workflow
3.2 Add Gmail Trigger
Click + and search for Gmail Trigger
Connect your Gmail account with OAuth credentials
Set trigger to Watch Emails (for example, unread emails in Inbox)
3.3 Optional: Add Email Classification (Code Node)
If you want to automatically classify emails:
Add a Code Node after Gmail Trigger
Use JavaScript to process
\(json.subjector\)json.snippet// Loop over input items and classify job application emails for (const item of $input.all()) { const subject = (item.json.subject || "").toLowerCase(); const body = (item.json.snippet || "").toLowerCase(); let status = "unknown"; if ( subject.includes("thank you for applying") || subject.includes("application received") ) { status = "applied"; } else if (subject.includes("interview")) { status = "interview"; } else if ( subject.includes("unfortunately") || subject.includes("not selected") || subject.includes("rejected") ) { status = "rejected"; } else if (subject.includes("offer")) { status = "offer"; } item.json.status = status; } return $input.all();
3.4 Add Airtable Node
Add Airtable Node and connect it to the Code Node (or Gmail Trigger if no classification)
Set Resource:
RecordSet Operation:
CreateAdd credentials (use API token created earlier)
Enter Base ID and Table Name (
Email Logs)
3.5 Map Fields to Airtable
| Airtable Field | Value |
|---|---|
| Subject | {{$json.subject}} |
| Body | {{$json.snippet}} |
| Status | {{$json.status}} |
| Date | {{ new Date(parseInt($json.internalDate, 10)).toISOString() }} |
The
internalDatefield from Gmail is in milliseconds, so we convert it to ISO format using JavaScript.
Step 4: Test the Workflow
Click Execute Workflow in n8n
Send a test email to your Gmail account
Check Airtable — a new record should appear automatically
Step 5: Activate Workflow
Once tested, switch workflow from Inactive → Active
From now on, emails arriving in Gmail will be automatically logged in Airtable
Bonus: Advanced Automation Ideas
AI Classification: Integrate OpenAI or GPT nodes to auto-categorize emails
Slack Notifications: Notify your team when a new email is added
Follow-Up Automation: Trigger reminders based on email status
Benefits of This Workflow
No manual data entry
Automatic logging and classification
Centralized view of all incoming emails
Easily extensible for complex automations
Conclusion
By combining n8n, Gmail, and Airtable, you can turn your inbox into a smart, automated email tracking system. Whether for support tickets, client emails, or internal requests, this workflow saves time, reduces errors, and keeps your data organized.
💡 Tip: Keep updating the workflow and fields in Airtable as your needs evolve. You can also extend it with AI, notifications, and other integrations to build a fully automated communication hub.



