Generate Visual Summary & Knowledge Graph Insights for Your Email
## The Ultimate Gmail Analysis and Visual Summarization Template
This workflow showcases various useful Gmail search, filter, and AI categorization operations and generates a **knowledge graph** for your mail using the [InfraNodus GraphRAG API](https://infranodus.com/use-case/ai-knowledge-graphs), which you can use to reveal the **main topics** and **blind spots** in your correspondence. InfraNodus will then **target those blind spots** to generate **interesting research questions** for you and send the topical summary and insights via Telegram. You can also click the generated graph and explore the blind spots inside [InfraNodus](https://infranodus.com) using the **interactive visual interface**:

## What is it useful for?
- **Learn about advanced Gmail search, filtering, and AI categorization functions** that can be useful for your other workflows
- Analyze all your personal messages for the last week to get an **overview of the main topics**
- Analyze **all your Sent messages** to find recurrent topics and gaps and generate ideas based on those gaps
- Generate ideas based on **specific message filters** (Personal, Promos, from a specific person, AI-defined criteria, e.g., urgency)
- Get an **overview of an interaction with a specific person/company**
- Get an **overview of your notes**
- Generate **new ideas based on your correspondence on a certain topic** (e.g., business)
- Learn about **various n8n nodes useful for email processing, filtering, and data conversion**
- Never miss important topics, use AI filter to get **notified of the urgent and important emails** via Telegram
## How it works
This template can be triggered in multiple ways:
- Automatically in regular intervals (daily, weekly),
- Manually in n8n, or
- Via a private password-protected URL form where you can specify your search and filtering criteria
When you start the workflow, you specify:
- Your **Gmail search filters** (can be combined, e.g., `after:2025/06/01 label:personal business` to search for all emails received after 1 June 2025, filed in the Personal category containing the word business. (optional, if empty, will retrieve all the emails or limited to the number you set in the Gmail node)
- Additional **Gmail labels** (e.g., SENT or CATEGORY_PERSONAL or your custom categories). Use the search filter for faster processing (e.g., prefer label:personal to CATEGORY_PERSONAL, but labels can be useful for additional filtering for your search queries) (optional, if empty, will retrieve all the emails)
- **AI filtering criteria** - Set an additional classification criteria used to filter out the emails, e.g., Only the urgent, personal emails - in that case, AI classification node working with Google's Gemini AI will be activated and will only pass through the email based on the criteria you specify.
- Whether you want to build a **text graph** or a **social graph** - see the workflow for a detailed explanation of each
- Use **snippets of emails** (default) or **full text** (for thorough analysis). We prefer snippets as it's faster and your graph context doesn't get biased towards longer emails this way.
Once you set up your search parameters in Steps 1 and 2, the template will follow the following steps:
1. Step 3 - Retrieve Google emails that satisfy your filter criteria. Filter them by additional labels provided if applicable.
2. Step 4 - If the user chooses to analyze full text, use an additional Gmail node that retrieves the full text of the email message.
3. Step 5 - If an AI filter rule is provided, use the AI Classifier node with Google Gemini Pro 2.5 model to classify the email based on the rule provided. Bypass if empty.
4. Step 6 - Format the text or the email snippets to add the sender metadata and category and to prepare to submit to InfraNodus.
5. Step 7 - Submit the data to the [InfraNodus API `graphAndEntries` endpoint](https://support.noduslabs.com/hc/en-us/articles/13605983537692-InfraNodus-API-Access-Points) and generate a knowledge graph.
6. Step 8 - Access this graph via the [`graphAndAdvice` endpoint](https://support.noduslabs.com/hc/en-us/articles/13605983537692-InfraNodus-API-Access-Points) and generate a topical summary based on the GraphRAG representation and insight questions bridging the gaps identified. Send the results via a Telegram bot.
We use Telegram, because it takes only 30 seconds to set up a bot with an API, 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](https://infranodus.com/use-case/ai-knowledge-graphs) to use this workflow.
- Create an InfraNodus account
- Get the API key at [https://infranodus.com/api-access](https://infranodus.com/api-access) and create a Bearer authorization key for the InfraNodus API nodes.
- Add
n8nFree