Skip to main content

AI email analyzer: Process PDFs, images & save to Google Drive + Telegram

Workflow preview

Workflow preview
100%
AI email analyzer: Process PDFs, images & save to Google Drive + Telegram preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

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 ...

Best for

  • Ticket Management automation workflows
  • AI Summarization automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.emailreadimap, @n8n/n8n-nodes-langchain.lmchatopenai, @n8n/n8n-nodes-langchain.chainsummarization, n8n-nodes-base.stickynote, n8n-nodes-base.switch, @n8n/n8n-nodes-langchain.outputparserstructured, n8n-nodes-base.splitout, n8n-nodes-base.aggregate

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Davide.

Original n8n.io source

1.1 Workflow description

Title
AI email analyzer: Process PDFs, images & save to Google Drive + Telegram
Workflow name
AI email analyzer: Process PDFs, images & save to Google Drive + Telegram

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 sends a final consolidated summary via Telegram.

This is a powerful tool for automating email analysis and summarization, saving time and ensuring that important information is easily accessible and actionable.

Below is a breakdown of the workflow:


1. How It Works

The workflow is designed to process incoming emails, analyze their content and attachments, and generate summaries. Here's how it works:

  1. Email Trigger:

    • The workflow starts with the Email Trigger (IMAP) node, which monitors an email inbox for new emails.
    • If an email contains attachments, the workflow processes them.
  2. Check for Attachments:

    • The Contain Attachments? node checks if the email has attachments.
    • If attachments are present, the workflow proceeds to process them.
  3. Process Attachments:

    • The Get PDF and Images Attachments node extracts PDF and image attachments from the email.
    • The Switch node separates PDFs and images for further processing:
      • PDFs: The Extract from PDF node extracts text from PDFs, and the PDF Analyzer node summarizes the content.
      • Images: The Analyze Image node uses AI to describe the content of images.
  4. Summarize Email Content:

    • The Convert Text node converts the email's HTML content to plain text.
    • The Email Summarization Chain node uses AI to generate a summary of the email's text content.
  5. Save Summaries:

    • The Save Summary PDF, Save Summary Image, and Save Summary Text nodes save the summaries of PDFs, images, and email text, respectively, to Google Sheets.
  6. Consolidate Summaries:

    • The All Summaries node aggregates the summaries of the email text, PDFs, and images.
    • The Create Final Summary node uses AI to generate a unified summary of all the content.
  7. Send Final Summary:

    • The Send Final Summary node sends the consolidated summary via Telegram to a specified chat ID.

2. Set Up Steps

To set up and use this workflow in n8n, follow these steps:

  1. IMAP Configuration:

    • Set up IMAP credentials in n8n for the Email Trigger (IMAP) node.
    • Ensure the email account is accessible via IMAP.
  2. AI Model Configuration:

    • Configure the DeepSeek, Gemini, and OpenRouter credentials in n8n for the Email Summarization Chain, PDF Analyzer, and Create Final Summary nodes.
    • Ensure the AI models are set up to generate summaries.
  3. Google Sheets Integration:

    • Set up Google Sheets credentials in n8n for the Save Summary PDF, Save Summary Image, and Save Summary Text nodes.
    • Specify the Google Sheet and worksheet where the summaries will be saved.
  4. Telegram Integration:

    • Set up Telegram credentials in n8n for the Send Final Summary node.
    • Insert your Chat ID in the Telegram node to receive the final summary.
  5. Test the Workflow:

    • Send an email with attachments (PDFs and images) to the monitored email account.
    • The workflow will:
      • Extract and summarize the email content and attachments.
      • Save the summaries to Google Sheets.
      • Send a consolidated summary via Telegram.
  6. Optional Customization:

    • replace IMAP trigger with Gmail or Outlook trigger
    • Modify the workflow to include additional features, such as:
    • Adding more AI models for different types of analysis.
    • Sending notifications via other channels (e.g., Slack, email).
    • Integrating with other storage services (e.g., Dropbox, AWS S3).

Need help customizing?

Contact me for consulting and support or add me on Linkedin.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Email Trigger (IMAP)

Type / Role
n8n-nodes-base.emailReadImap - emailReadImap
Config choices
Version 2

Block 2 - DeepSeek R1

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Block 3 - Email Summarization Chain

Type / Role
@n8n/n8n-nodes-langchain.chainSummarization - chainSummarization
Config choices
Version 2

Block 4 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 5 - Switch

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.2

Block 6 - Structured Output Parser

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.2

Block 7 - Split Out

Type / Role
n8n-nodes-base.splitOut - splitOut
Config choices
Version 1

Block 8 - Aggregate

Type / Role
n8n-nodes-base.aggregate - aggregate
Config choices
Version 1

Block 9 - OpenRouter Chat Model1

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenRouter - lmChatOpenRouter
Config choices
Version 1

Block 10 - Contain attachments?

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 11 - Get PDF and images attachments

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 12 - Extract from PDF

Type / Role
n8n-nodes-base.extractFromFile - extractFromFile
Config choices
Version 1

Block 13 - PDF Analyzer

Type / Role
@n8n/n8n-nodes-langchain.chainLlm - chainLlm
Config choices
Version 1.5

Block 14 - Save summary PDF

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.5

Block 15 - All summaries

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3

Block 16 - Map image summaries

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 17 - Upload attachments

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 18 - Email summary

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 19 - Send final summary

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 20 - Create final summary

Type / Role
@n8n/n8n-nodes-langchain.chainLlm - chainLlm
Config choices
Version 1.5

Block 21 - Save summary image

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.5

Block 22 - Save summary text

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.5

Block 23 - Convert text

Type / Role
n8n-nodes-base.markdown - markdown
Config choices
Version 1

Block 24 - Gemini 2.0 Flash

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenRouter - lmChatOpenRouter
Config choices
Version 1

Showing the first 24 of 31 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow AI email analyzer: Process PDFs, images & save to Google Drive + Telegram
Complexity advanced
Nodes 31
Categories Ticket Management, AI Summarization
Author Davide
Published 14 Mar 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/3169/3169.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does AI email analyzer: Process PDFs, images & save to Google Drive + Telegram do?

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 ...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Ticket Management, AI Summarization use case.