AutomationMart
Home/Browse/Automate Gmail labeling with Gemini AI & build InfraNodus knowledge graph with Telegram alerts
n8n

Automate Gmail labeling with Gemini AI & build InfraNodus knowledge graph with Telegram alerts

n8nn8n18 modulesv1.0
GmailSlackGoogle SheetsDiscordTelegramGemini

Automated Gmail Labeling and Brainstorming This template can be used to automatically label your incoming Gmail messages with AI and to build a knowledge graph from the emails tagged with a specific label to brainstorm new ideas based on them. You can also get notified about the emails with the most important labels via Telegram as well as receive new ideas as you are building a knowledge graph of incoming messages. The idea generation is based on the InfraNodus knowledge graph content gap detec

At a glance

Automate Gmail labeling with Gemini AI & build InfraNodus knowledge graph with Telegram alerts is a ready-made n8n workflow you import as a workflow JSON file — no build required. It connects Gmail, Slack, Google Sheets, Discord. It's free to download. Follow the 5-step import below to go live in minutes.

Platform
n8n
Connects
Gmail, Slack, Google Sheets, Discord, Telegram, Gemini
Modules
18
Price
Free
Version
v1.0
Automate Gmail labeling with Gemini AI & build InfraNodus knowledge graph with Telegram alerts workflow diagram

About this workflow

Automated Gmail Labeling and Brainstorming This template can be used to automatically label your incoming Gmail messages with AI and to build a knowledge graph from the emails tagged with a specific label to brainstorm new ideas based on them. You can also get notified about the emails with the most important labels via Telegram as well as receive new ideas as you are building a knowledge graph of incoming messages. The idea generation is based on the InfraNodus knowledge graph content gap detection algorithm, which builds a network from your content and then finds a blind spot and uses AI to generate an interesting research question or idea that can be used to bridge this gap. Why it works so well? Think of all the business emails you receive that bypass the spam filters. Probably, they are personalized to you already. Now imagine if you build a knowledge graph from them for over a month. You will then have a ideation device based on your interests and marketing profile. Now, if you identify the gaps inside and generate interesting research questions based on them, you will come up with new interesting ideas that will be relevant (because they touch on the topics that matter to you), but novel, because they bridge them in new ways. What is it useful for? - Automate Gmail incoming message labeling with the new Classifier n8n node — much more advanced than the default Gmail labeling rules. - Get notified via Telegram (or a messenger of your choice) about the most important messages and be sure not to miss anything important. - Keep the messages with a certain label saved into knowledge graph for brainstorming and ideation. - Every time a new message of this category comes in, it's added into the graph, changing its structure, a new idea is generated. So instead of looking at each specific offer, you now use them to generate insights for you. How it works - Step 1: This template can is triggered automatically when a new Gmail message arrives. Note: you need to connect your Gmail account here in this node - Step 2: We use the new n8n AI Classifier Node to classify your email based on its content. You might need to update to n8n 1.94 version to make it work. Note: we like to use Gemini AI for that classifier as it's the same company as Gmail, so should be safe with data - Step 3: After classifying the message, we label the message with the appropriate label. Note: you need to create the labels before in your Gmail account - Step 4: For a certain category (e.g. "Business" you format the message and save it into your InfraNodus graph. Note: specify your InfraNodus API here and choose the name of the graph. It will use the InfraNodus HTTP graphAndEntries endpoint and save your data to an InfraNodus graph. By default, we save the text knowledge graph using the contextSettings parameters (it will only build a text graph of the content), but you can take an alternative setting from this InfraNodus HTTP node's settings and create a social knowledge graph, that will also show email senders in the graph itself. - Step 5 (optional): Generate an interesting insight question with the graphAndAdvice endpoint) of InfraNodus. - Step 6 (optional): Then send this insight via Telegram to a chat. - Step 7 (optional): Link some important labels to the second Telegram notification node, so you receive important messages for specified labels. - Step 8 (optional): Send a Telegram notification We use Telegram, because it takes only 30 seconds to set up a bot with an API (send /newbot to @botfather, unlike Discord or Slack, which is long and cumbersome to set up. You can also attach a Gmail send node and generate an email instead. How to use You need an InfraNodus GraphRAG API account and key to use this workflow. - Create an InfraNodus account or log in. - Get the API key at and create a Bearer authorization key for the InfraNodus HTTP nodes. - Add this Authorization code in Steps 4 and 5 of the workflow. - Come up with the name of the graph and change it in the HTTP InfraNodus nodes in the steps 4 and 5 and also in the Telegram node in Step 6 that sends a link to the graph. - For additional text processing / idea generation settings you can use in the HTTP InfraNodus nodes, see the InfraNodus access points page. For example, in Step 4 you can change the text processing settings to build a social knowledge graph (settings are available in the Node's Notes section) and in Step 5 you can change the requestMode from question to idea to receive business ideas instead. - Authorize your Gmail account for Steps 2, 3, 7 and 8 Gmail nodes. The easiest way to set it up is to open a free Google Console API account and to create an OAuth access point for n8n. You can then reuse it with other Google services like Google Sheets, Drive, etc. So it's a useful thing to have in general. - Set up the Gemini AI API key using the instructions in the Step 2 Gemini AI classification node. - Set up the Telegram node bot for the Step 8. It takes only 30 seconds: just go to @botfather and type in /newbot and you'll have an API key ready. To get the conversation ID, follow the n8n / Telegram instructions in the node itself. - Once everything is ready, try to run the default automated workflow to test if everything works well. Requirements - An InfraNodus account and API key - An Google Cloud API OAuth client and key for Gmail access - A Gemini AI API key - A Telegram bot API key - n8n version 1.94 and higher (for Text Classification AI node to work) Customizing this workflow Check our other n8n workflows at for useful content gap analysis, expert panel, and marketing, and research workflows that utilize GraphRAG for better AI generation. Finally, check out to learn more about our network analysis technology used to build knowledge graphs from text. For support, please, contact

n8n

How to import this n8n workflow

  1. 1

    Download the workflow JSON file after purchase.

  2. 2

    Open n8n → click the menu → Import from File.

  3. 3

    Select the downloaded JSON and import.

  4. 4

    Set up credentials for each node that requires them.

  5. 5

    Click Execute Workflow to test, then activate.

Setup guide

Setup guide included

Purchase to unlock the full step-by-step guide

Related N8n workflows

Generate Slack messages using OpenAI GPT-3 completions

Enhance your team communication by generating insightful messages with ChatGPT and sending them directly to Slack. This template allows you to create tailored responses or updates using OpenAI's powerful language model, ensuring your messages are engaging and relevant. Streamline your workflow by automating the message creation process, making it easier to keep your team informed and aligned.

Free

Create Slack messages for new Weavely responses

Stay instantly informed whenever someone completes a form. This template connects Weavely.ai with Slack so that every new submission is automatically sent as a message to your chosen Slack channel. It’s a simple way to keep your team updated in real time. This template was created by Weavely.ai. For questions or support, visit [weavely.ai](https://www.weavely.ai/)

Free

Follow up on overdue Xero invoices

Efficiently manage overdue Xero invoices with automated Gmail communication. Streamline your financial tracking, improve payment collection, and enhance email reminders for outstanding balances, ensuring timely payments and better cash flow management.

Free

Filter and add new rows in Google Sheets using ChatGPT completions

Periodically filter Google Sheets rows, generate ChatGPT completions, and add new rows in the same or different sheet. Streamline data processing and enhance spreadsheet functionality.

Free

Send Telegram notification for new WooCommerce orders

How it works: • The workflow triggers when a new order is created in WooCommerce. • It extracts order details including ID, status, total, and products list. • Sends a formatted message via Telegram to the store admin. • Includes a clickable button that links directly to the order view page. ⚙️ Set up steps: • Estimated setup time: 5–10 minutes. • Requires active WooCommerce REST API credentials. • Requires a Telegram bot and your admin chat ID. • Replace the Telegram chatId and WooCommerce cred

Free

Create a data analyst chatbot for real-time Google Sheets analysis with GPT-5

Who is this for? This workflow is ideal for: Business analysts and data professionals who need to quickly analyze spreadsheet data through natural conversation Small to medium businesses seeking AI-powered insights from their Google Sheets without complex dashboard setups Sales teams and marketing professionals who want instant access to customer, product, and order analytics --- What problem is this workflow solving? Traditional data analysis requires technical skills and time-consuming manu

Free

Build your first AI agent

How it works This template launches your very first AI Agent —an AI-powered chatbot that can do more than just talk— it can take action using tools. Think of an AI Agent as a smart assistant, and the tools are the apps on its phone. By connecting it to other nodes, you give your agent the ability to interact with real-world data and services, like checking the weather, fetching news, or even sending emails on your behalf. This workflow is designed to be the perfect starting point:

Free

🧠 AI blog post journalist (Perplexity for research, Anthropic Claude for blog)

This workflow contains community nodes that are only compatible with the self-hosted version of n8n. 🧠 AI-Powered Blog Post Generator Category: Content Automation / AI Writing / Marketing Description: This automated workflow helps you generate fresh, SEO-optimized blog posts daily using AI tools—perfect for solo creators, marketers, and content teams looking to stay on top of the latest AI trends without manual research or writing. For more of such builds and step-by-step Tutorial Guides,

Free

Reviews

No reviews yet

Be the first to buy and share your experience.

Leave a review

Sign in to share your experience with this workflow.

Log in to review
Free
No ratings yet

Create a free account to purchase workflows.

  • JSON blueprint — instant download
  • Setup guide PDF included
  • 5 downloads · valid 30 days
  • Works with n8n

Need help setting this up?

Book a 3-hour live setup session with an Agility consultant.

₹2,499/ session
3 hrs · video call
  • Configure live on Google Meet / Zoom
  • Free follow-up if workflow has defects
  • Platform expert assigned to you
Book installation session
Free