Skip to main content

Inbox manager (GPT, Google Calendar & Supabase)

Workflow preview

Workflow preview
100%
Inbox manager (GPT, Google Calendar & Supabase) preview
Open on n8n.io

Important notice

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

1. Workflow Overview

Turn your cluttered inbox into a smart, autonomous assistant that categorizes emails, replies to leads, checks your calendar, and notifies you on Telegram—all without lifting a finger. This workflo...

Best for

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

Tools used

n8n-nodes-base.gmailtrigger, @n8n/n8n-nodes-langchain.textclassifier, @n8n/n8n-nodes-langchain.lmchatopenai, n8n-nodes-base.gmail, @n8n/n8n-nodes-langchain.outputparserstructured, n8n-nodes-base.stickynote, n8n-nodes-base.googlecalendartool, @n8n/n8n-nodes-langchain.agent

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Inbox manager (GPT, Google Calendar & Supabase)
Workflow name
Inbox manager (GPT, Google Calendar & Supabase)

Overview

Turn your cluttered inbox into a smart, autonomous assistant that categorizes emails, replies to leads, checks your calendar, and notifies you on Telegram—all without lifting a finger.

This workflow is designed for a marketing agency, but can be adapted for any business. It classifies incoming emails into categories like Sales, Client Communication, Reports, Billing, and Other. If it detects a new lead or priority message, it routes the email to one of two agents:

  • The Calendar Agent checks your availability in Google Calendar and drafts a consultation reply
  • The Knowledge Agent answers FAQs using your business knowledge base (with Supabase embeddings)

Both agents create draft email responses and send a Telegram alert so you're always in the loop.

Who’s it for

  • Founders and agency owners buried in emails
  • Marketing teams handling lots of inbound leads
  • Customer support managers automating Tier 1 replies
  • Anyone who wants a cleaner, smarter inbox without hiring a VA

How it works

  • Gmail trigger watches for incoming emails
  • Email content is passed to an AI classifier to apply a label (Sales, Client, Billing, etc.)
  • If the message is a new inquiry or lead, it’s routed to:
    • Calendar Agent → checks Google Calendar and drafts a reply with available slots
    • Knowledge Agent → searches vector DB and drafts a helpful reply from documentation
  • Both agents create a Gmail draft response and send a Telegram notification with summary

Example use case

> A lead emails you asking for a discovery call.
>
> ✅ Email is labeled "Sales"
> ✅ AI Calendar Agent checks your Google Calendar
> ✅ A reply is drafted offering free time slots
> ✅ You get a Telegram ping:
> "New lead: Abdul Mir. I checked your calendar and drafted a reply. Check your email!"

How to set up

  1. Connect your Gmail and set up a trigger for new messages
  2. Train the AI classifier with example categories and emails
  3. Connect Google Calendar API for availability checks
  4. Upload your internal docs and sync to Supabase vector store
  5. Connect Telegram for alerts
  6. Customize AI prompts and escalation logic as needed

Requirements

  • Gmail integration
  • OpenAI or Claude API (for classification + chat agents)
  • Google Calendar API
  • Supabase (or Pinecone, Weaviate) for RAG vector DB
  • Telegram bot API key

How to customize

  • Add custom labels like “Recruiting,” “Investor,” or “Support”
  • Replace Telegram with Slack or SMS alerts
  • Add CRM sync to update lead status
  • Escalate complicated replies to a human via task creation
  • Add auto-send (instead of drafts) after review or based on confidence score

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 - Text Classifier

Type / Role
@n8n/n8n-nodes-langchain.textClassifier - textClassifier
Config choices
Version 1.1

Block 3 - OpenAI Chat Model

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

Block 4 - Sales / Leads

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

Block 5 - Client Comm

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

Block 6 - Reports / Results

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

Block 7 - Billing / Admin

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

Block 8 - Other

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

Block 9 - Mark as Read3

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

Block 10 - Structured Output Parser2

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

Block 11 - Sticky Note2

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

Block 12 - get_events

Type / Role
n8n-nodes-base.googleCalendarTool - googleCalendarTool
Config choices
Version 1.3

Block 13 - Structured Output Parser

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

Block 14 - Calendar Agent

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

Block 15 - think_tool

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

Block 16 - Sticky Note1

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

Block 17 - OpenAI Chat Model5

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

Block 18 - OpenAI Chat Model7

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

Block 19 - Calendar or Email

Type / Role
@n8n/n8n-nodes-langchain.chainLlm - chainLlm
Config choices
Version 1.6

Block 20 - Gmail

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

Block 21 - Get Thread

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

Block 22 - Structured Output Parser6

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

Block 23 - Switch

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

Block 24 - Gmail2

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

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

3. Summary Table

Workflow Inbox manager (GPT, Google Calendar & Supabase)
Complexity advanced
Nodes 42
Categories Ticket Management, AI RAG
Author Abdul Mir
Published 27 Jul 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/6537/6537.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 Inbox manager (GPT, Google Calendar & Supabase) do?

Turn your cluttered inbox into a smart, autonomous assistant that categorizes emails, replies to leads, checks your calendar, and notifies you on Telegram—all without lifting a finger. This workflo...

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