Triage Gmail inbox emails and draft replies with OpenAI and Google Sheets
Ready for 3.0What this workflow does
This workflow has 20 nodes and runs on a schedule (every day). Along the way it connects Gmail and Google Sheets.
How it runs
Trigger: On a schedule (every day).
- Setup Configuration (Code): runs custom JavaScript code
- Get Gmail Labels (Gmail): uses Gmail
- Find Missing Labels (Code): runs custom JavaScript code
- Any Labels Missing? (If): checks a condition and branches into true / false
- Create Gmail Label (Gmail): uses Gmail
- Reload Gmail Labels (Gmail): uses Gmail
- Resolve Label IDs (Code): runs custom JavaScript code
- Get Untriaged Emails (Gmail): uses Gmail
- Prepare Email Context (Code): runs custom JavaScript code
- Triage Email with OpenAI (HTTP Request): calls an HTTP API
…plus 9 more steps. See the full node list below.
Services it uses
Other Google Sheets + Gmail templates (2,102)
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (6)
- Schedule Trigger
n8n-nodes-base.scheduleTrigger - Code
n8n-nodes-base.code - Gmail
n8n-nodes-base.gmail - If
n8n-nodes-base.if - HTTP Request
n8n-nodes-base.httpRequest - Google Sheets
n8n-nodes-base.googleSheets
From the author
Quick overview This workflow runs every 10 minutes to triage new Gmail inbox emails with OpenAI, apply Gmail labels, create reply drafts for messages that need a response, optionally send urgent alert emails, and log the triage results to Google Sheets. How…