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

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

Ready for 3.0

by InfraNodus ✓ · 617 views · created 2025-06-04 · Personal Productivity, AI RAG

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This AI workflow has 18 nodes and runs on Gmail events. Along the way it connects Gmail, OpenAI Chat Model, Telegram and Google Gemini Chat Model. It also calls infranodus.com over HTTP.

How it runs

Trigger: On Gmail events.

  1. Text Classifier: classifies text into categories with AI, with model: Google Gemini Chat Model
  2. Label as Business (Gmail): add labels
  3. Label as Personal (Gmail): add labels
  4. Label as Appointments (Gmail): add labels
  5. Label as Urgent (Gmail): add labels
  6. Label as Invoices (Gmail): add labels
  7. Clean html and organize into statements (Code): runs custom JavaScript code
  8. Aggregate: combines items into one
  9. InfraNodus Save to Graph (HTTP Request): calls infranodus.com (POST)
  10. Get Label's Name in Gmail (Gmail): get (label)

…plus 6 more steps. See the full node list below.

Services it uses

GmailOpenAI Chat ModelTelegramGoogle Gemini Chat Model

HTTP calls to: infranodus.com

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.

  • Still check Gmail Trigger below v1.4 runs as v1.4 (drafts skipped, max emails per poll) (Gmail Trigger).

Nodes used (10)

From the author

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…

Excerpt from InfraNodus's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.