Send a daily unanswered leads digest with Gmail and OpenAI
Ready for 3.0What this workflow does
This AI workflow has 19 nodes and runs on a schedule (cron 0 8 * * 1-5) (plus 1 other trigger). Along the way it connects Gmail and OpenAI Chat Model.
How it runs
Trigger: On a schedule (cron 0 8 * * 1-5) (plus 1 other trigger).
- Configure your settings (Edit Fields (Set)): sets 10 fields: test_mode, your_email, your_business…
- Use the sample inbox? (If): checks a condition and branches into true / false
- Sample inbox (test mode) (Code): runs custom JavaScript code
- Get your sent mail and drafts (Gmail): get many
- Find threads nobody answered (Code): runs custom JavaScript code
- Get recent incoming mail (Gmail): get many
- Screen out noise and risky mail (Code): runs custom JavaScript code
- Classify with AI? (If): checks a condition and branches into true / false
- Classify each email with AI (Basic LLM Chain): sends a prompt to an LLM, with model: OpenAI model; output parser: Classification fields
- Build the digest (Code): runs custom JavaScript code
…plus 5 more steps. See the full node list below.
Services it uses
Other OpenAI + Gmail templates (1,623)
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 (9)
- Schedule Trigger
n8n-nodes-base.scheduleTrigger - Manual Trigger
n8n-nodes-base.manualTrigger - Edit Fields (Set)
n8n-nodes-base.set - If
n8n-nodes-base.if - Code
n8n-nodes-base.code - Gmail
n8n-nodes-base.gmail - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured
From the author
Quick overview This workflow runs every weekday morning to scan Gmail for recent threads where someone emailed you but you haven’t replied or drafted a response, then uses OpenAI to prioritize and summarize the most important leads and delivers a single…