Skip to main content

Organize Gmail with GPT-4 & send urgent notifications via Telegram and WhatsApp

Workflow preview

Workflow preview
100%
Organize Gmail with GPT-4 & send urgent notifications via Telegram and WhatsApp 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 automatically transforms your messy inbox into a neatly organized space while ensuring you never miss a critical message. It connects to your Gmail account and triggers for every new ...

Best for

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

Tools used

n8n-nodes-base.gmailtrigger, @n8n/n8n-nodes-langchain.outputparserstructured, n8n-nodes-base.gmailtool, n8n-nodes-base.gmail, n8n-nodes-base.splitinbatches, n8n-nodes-base.filter, n8n-nodes-base.code, n8n-nodes-base.if

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Organize Gmail with GPT-4 & send urgent notifications via Telegram and WhatsApp
Workflow name
Organize Gmail with GPT-4 & send urgent notifications via Telegram and WhatsApp

This workflow automatically transforms your messy inbox into a neatly organized space while ensuring you never miss a critical message. It connects to your Gmail account and triggers for every new email. Using a powerful AI agent, the workflow first analyzes the email's content, sender, and metadata to classify it and apply the appropriate Gmail label (e.g., "Finance," "Marketing," "Dev Tools"). In parallel, a second AI agent determines if the email is urgent (like a security alert, OTP, or payment reminder) and generates a concise summary. If an email is marked as urgent, the workflow instantly sends a notification with the summary to your Telegram and WhatsApp, allowing you to take immediate action. This workflow is perfect for anyone looking to automate their email management, reduce inbox clutter, and stay on top of important, time-sensitive communications.

Step-by-Step Explanation This workflow is designed to intelligently categorize incoming emails and notify you of urgent messages. Here is a breakdown of how it operates:

  1. Trigger: New Email Received Node: Gmail Trigger Action: The workflow initiates whenever a new email arrives in your connected Gmail inbox.
  2. Fetch Full Email Content Node: Get a message Action: It takes the ID of the new email from the trigger and fetches the complete message body, subject, sender, and headers.
  3. AI-Powered Categorization Node: AI Agent2 Action: This AI agent analyzes the full email content. Based on a detailed prompt that includes classification rules (e.g., if the sender is GitHub, classify as "Dev Tools"), it determines the most appropriate category and outputs the corresponding Label ID.
  4. Label Management and Application Node: Loop Over Items -> Create Label if Doesn't exist -> Get Existing Labels -> Filter -> Add label to thread Action: This sequence ensures the email gets the correct label. It first attempts to create the Gmail label suggested by the AI. The node is set to continue even if the label already exists. It then fetches a list of all your current Gmail labels. A Filter node finds the exact ID of the label that matches the AI's suggestion. Finally, it applies this label to the email thread, neatly organizing it in your inbox.
  5. Urgency Analysis and Summarization Node: AI Agent Action: Concurrently, a second AI agent analyzes the email to determine its urgency (classifying it as "urgent" or "normal") and generates a two-sentence summary.
  6. Parse AI Output Node: Code Action: A simple code node cleans up the JSON output from the urgency analysis to ensure it's correctly formatted for the next step.
  7. Conditional Notification Logic Node: If Action: This node checks the output from the previous step. It proceeds only if the email's urgency is marked as "urgent."
  8. Send Instant Alerts Nodes: Send a text message (Telegram) & Send message (WhatsApp) Action: If an email is deemed urgent, the workflow immediately sends an alert containing the email summary to your specified Telegram chat and WhatsApp number.

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 Trigger1

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

Block 2 - Structured Output Parser1

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

Block 3 - Check Sent2

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

Block 4 - Create Label if Doesn't exist1

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

Block 5 - Get Existing Labels1

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

Block 6 - Loop Over Items1

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

Block 7 - Filter1

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

Block 8 - Check Sent3

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

Block 9 - Add label to thread1

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

Block 10 - Code1

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

Block 11 - If1

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

Block 12 - Send message1

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

Block 13 - Send a text message1

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

Block 14 - OpenRouter Chat Model2

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

Block 15 - Wait1

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

Block 16 - AI Agent3

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

Block 17 - OpenAI Chat Model

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

Block 18 - AI Agent1

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

Block 19 - Google Gemini Chat Model2

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

Block 20 - Google Gemini Chat Model3

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

Block 21 - Simple Memory1

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

Block 22 - OpenRouter Chat Model3

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

Block 23 - Get a message1

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

Block 24 - Sticky Note1

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

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

3. Summary Table

Workflow Organize Gmail with GPT-4 & send urgent notifications via Telegram and WhatsApp
Complexity advanced
Nodes 28
Categories Ticket Management, Multimodal AI
Author Iniyavan JC
Published 11 Aug 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/7257/7257.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 Organize Gmail with GPT-4 & send urgent notifications via Telegram and WhatsApp do?

This workflow automatically transforms your messy inbox into a neatly organized space while ensuring you never miss a critical message. It connects to your Gmail account and triggers for every new ...

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, Multimodal AI use case.