AI email analyzer: Process PDFs, images & save to Google Drive + Telegram
Ready for 3.0What this workflow does
This AI workflow has 25 nodes and runs when a new email arrives over IMAP. Along the way it connects OpenAI Chat Model, OpenRouter Chat Model, Google Sheets and Google Drive and 2 more.
How it runs
Trigger: When a new email arrives over IMAP.
- Contain attachments? (If): checks a condition and branches into true / false
- Get PDF and images attachments (Code): runs custom JavaScript code
- Convert text (Markdown): converts between Markdown and HTML
- Switch: routes items into 2 branches
- Email Summarization Chain (Summarization Chain): summarizes text with AI, with model: DeepSeek R
- Upload attachments (Google Drive): uses Google Drive
- Extract from PDF (Extract from File): extracts data from a file (pdf)
- Analyze image (OpenAI): analyze (image)
- Save summary text (Google Sheets): append
- Email summary (Edit Fields (Set)): sets 1 field: content
…plus 10 more steps. See the full node list below.
Services it uses
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.
Nodes used (19)
- Email Trigger (IMAP)
n8n-nodes-base.emailReadImap - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Summarization Chain
@n8n/n8n-nodes-langchain.chainSummarization - Switch
n8n-nodes-base.switch - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Split Out
n8n-nodes-base.splitOut - Aggregate
n8n-nodes-base.aggregate - OpenRouter Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenRouter - If
n8n-nodes-base.if - Code
n8n-nodes-base.code - Extract from File
n8n-nodes-base.extractFromFile - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - Google Sheets
n8n-nodes-base.googleSheets - Merge
n8n-nodes-base.merge - Edit Fields (Set)
n8n-nodes-base.set - Google Drive
n8n-nodes-base.googleDrive - Telegram
n8n-nodes-base.telegram - Markdown
n8n-nodes-base.markdown - OpenAI
@n8n/n8n-nodes-langchain.openAi
From the author
This workflow automates the process of analyzing emails and their attachments (PDFs and images) using AI models (DeepSeek, Gemini, and OpenRouter). It extracts and summarizes the content of emails and attachments, saves the summaries to Google Sheets, and…