Skip to main content

Process invoices & engineering emails with Gmail, AI analysis & Telegram alerts

Workflow preview

Workflow preview
100%
Process invoices & engineering emails with Gmail, AI analysis & Telegram alerts preview
Open on n8n.io

Important notice

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

1. Workflow Overview

Automate admin tasks for manufacturing companies by processing emails, extracting key data from invoices & purchase orders, and delivering instant alerts via Gmail and Telegram. Description This...

Best for

  • Invoice Processing automation workflows
  • AI Summarization automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.gmailtrigger, n8n-nodes-base.gmail, @n8n/n8n-nodes-langchain.agent, n8n-nodes-base.code, @n8n/n8n-nodes-langchain.outputparserstructured, @n8n/n8n-nodes-langchain.lmchatopenrouter, @n8n/n8n-nodes-langchain.informationextractor, n8n-nodes-base.splitout

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Process invoices & engineering emails with Gmail, AI analysis & Telegram alerts
Workflow name
Process invoices & engineering emails with Gmail, AI analysis & Telegram alerts

Automate admin tasks for manufacturing companies by processing emails, extracting key data from invoices & purchase orders, and delivering instant alerts via Gmail and Telegram.

📝 Description This workflow automatically:

Fetches incoming emails from Gmail

Classifies emails (invoices, purchase orders, payment follow-up, etc.) using AI

Sends tailored auto-replies based on content and attachment presence

Extracts structured data from attached invoices/POs (PDFs etc.)

Delivers alerts and document files to your team via Telegram

Logs or routes data for further use in accounting or internal systems

⚙️ Pre-Conditions & Requirements Before using this workflow, you need:

Gmail Account with API access (for OAuth2 authentication)

Telegram Bot API Token (create a Telegram bot and get your API key)

Optional: API credentials for Google Sheets or other data sinks if you want to log extracted data

OpenRouter API credentials (for LLM-powered nodes, if used)

Access to an n8n instance (cloud or self-hosted)

đź›  Setup Instructions Import the Workflow: Download the JSON file and import it into your n8n instance.

Connect Accounts:

Configure the Gmail Trigger node with your Gmail OAuth2 credentials

Set up the Telegram node with your bot API token

Set Required Variables:

Adjust AI instructions or prompt text if needed (for your company’s tone/templates)

Customize labels, keywords, or filters in code nodes for your use case

Set target Telegram chat/group IDs

Test the Workflow:

Send a sample email with attachments to your Gmail account

Confirm that emails are classified, replies are sent, and Telegram notifications/mobile alerts are delivered as expected

Review and Connect Optional Modules:

For logging or archiving extracted data, connect additional “Google Sheets” or “Webhook” nodes as needed

🧩 Customization Tips Modify Email Categories: Update AI prompt instructions or filters to add/change labels (“Vendor Query,” “Partial Payment,” etc.)

Attachment Handling: Edit the code node logic to detect and process additional file types (DWG, XLSX, ZIP, etc.)

Notification Logic: Change the Telegram destination or add Slack/Microsoft Teams for broader team alerts

Data Logging: Add nodes for CRM, inventory, or ERP integration (push to your accounting or workflow management tool)

Example AI Prompt (for categorization) text You are the personal emailing assistant for Zenith Engineering, a manufacturing company...

Your tasks:

  • Categorize each email by priority
  • Draft polite, professional replies...
  • Identify and label attachments such as invoices, POs, drawings

Response should be a valid JSON object: {"Label":"Important", "Response":"..."}

If you have any doubts and questions let me know : [email protected] from Pune. Linkedin: https://www.linkedin.com/in/raj-more-171560bb/

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 - Gmail Trigger

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

Block 2 - Get a message

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2.1

Block 3 - AI Agent

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

Block 4 - Debugged code to find attachment

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

Block 5 - Structured Output Parser1

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

Block 6 - OpenRouter Chat Model1

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

Block 7 - Information Extractor

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

Block 8 - Split Out

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

Block 9 - Extract from File

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

Block 10 - Edit Fields1

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

Block 11 - Edit Fields2

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

Block 12 - Split Out1

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

Block 13 - Merge

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

Block 14 - Filter

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

Block 15 - Merge1

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

Block 16 - Filter1

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

Block 17 - Sticky Note

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

Block 18 - Extracting File Details

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

Block 19 - Convert Names to download files

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

Block 20 - Remove Duplicates

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

Block 21 - Gemini

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

Block 22 - Sticky Note5

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

Block 23 - Reply to same thread

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2.1

Block 24 - Send important details

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

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

3. Summary Table

Workflow Process invoices & engineering emails with Gmail, AI analysis & Telegram alerts
Complexity advanced
Nodes 25
Categories Invoice Processing, AI Summarization
Author Limbraj More
Published 30 Jul 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/6709/6709.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 Process invoices & engineering emails with Gmail, AI analysis & Telegram alerts do?

Automate admin tasks for manufacturing companies by processing emails, extracting key data from invoices & purchase orders, and delivering instant alerts via Gmail and Telegram. Description This...

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 Invoice Processing, AI Summarization use case.