Run a self-hosted multi-channel AI assistant with Claude, Gemini and Gmail
UnknownUnknown. This template uses community nodes we can't verify statically. Uses community nodes that can't be verified statically (unverified community packages are off by default in 3.0). Static check, last run 2026-10-19.
Worth a look
- Gmail Trigger below v1.4 runs as v1.4 (drafts skipped, max emails per poll) (Gmail Trigger)
Community nodes
These come from third-party npm packages. In n8n 3.0 unverified community packages are off by default (N8N_UNVERIFIED_PACKAGES_ENABLED=false).
n8n-nodes-evolution-api(Enviar texto)@tavily/n8n-nodes-tavily(Search in Tavily)
Nodes used (29)
- Telegram Trigger
n8n-nodes-base.telegramTrigger - OpenRouter Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenRouter - Data table
n8n-nodes-base.dataTable - Filter
n8n-nodes-base.filter - Edit Fields (Set)
n8n-nodes-base.set - Switch
n8n-nodes-base.switch - Telegram
n8n-nodes-base.telegram - AI Agent
@n8n/n8n-nodes-langchain.agent - Data Table Tool
n8n-nodes-base.dataTableTool - Postgres Chat Memory
@n8n/n8n-nodes-langchain.memoryPostgresChat - Postgres
n8n-nodes-base.postgres - Supabase Vector Store
@n8n/n8n-nodes-langchain.vectorStoreSupabase - Embeddings OpenAI
@n8n/n8n-nodes-langchain.embeddingsOpenAi - Default Data Loader
@n8n/n8n-nodes-langchain.documentDefaultDataLoader - Webhook
n8n-nodes-base.webhook - Evolution Api
n8n-nodes-evolution-api.evolutionApi - Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow - Tavily Tool
@tavily/n8n-nodes-tavily.tavilyTool - Wikipedia
@n8n/n8n-nodes-langchain.toolWikipedia - Schedule Trigger
n8n-nodes-base.scheduleTrigger - AI Agent Tool
@n8n/n8n-nodes-langchain.agentTool - Gmail Trigger
n8n-nodes-base.gmailTrigger - Gmail Tool
n8n-nodes-base.gmailTool - Google Gemini
@n8n/n8n-nodes-langchain.googleGemini - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - Aggregate
n8n-nodes-base.aggregate - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Google Docs Tool
n8n-nodes-base.googleDocsTool - Google Drive Tool
n8n-nodes-base.googleDriveTool
What it does
n8nClaw — Self-Hosted AI Assistant A lightweight, self-hosted AI assistant built entirely in n8n. Multi-channel messaging (Telegram, WhatsApp, Gmail), persistent memory, task management, and autonomous work — all in a single visual workflow. Inspired by OpenClaw. What It Does n8nClaw is a personal AI assistant that lives inside n8n. It connects to your messaging apps, remembers past conversations, manages tasks, and can work autonomously on your behalf. Core capabilities: - Multi-channel messaging — talk to your assistant via Telegram, WhatsApp, or Gmail - Persistent memory — conversations are summarized, embedded, and stored in a Supabase vector database for long-term recall - Task management — create, track, and complete tasks and subtasks using n8n data tables - Autonomous heartbeat — an hourly trigger lets the agent check in, process pending tasks, and act on its own - Media handling — voice messages, images, and documents sent via Telegram are processed by Gemini models - Sub-agents — delegate work to specialized agents for research, email management, document management, and tiered workers How It Works 1. Triggers & Input Processing Four triggers feed into the agent: - Telegram Trigger — receives text, voice, images, and documents - WhatsApp Webhook — receives text messages via Evolution API - Gmail Trigger — polls for new emails every minute - Hourly Heartbeat — scheduled trigger for autonomous task processing Each trigger filters messages (e.g., by Telegram chat ID or phone number), fetches the user profile from an Init data table, and normalizes the input into a standard format (usermessage, systemprompt, lastchannel). 2. Core AI Agent (n8nClaw) The central agent uses Claude Sonnet 4.5 (via OpenRouter) with a 15-message Postgres chat memory window. It receives the normalized input and decides how to respond — using tools, delegating to sub-agents, or replying directly. 3. Tools The agent has direct access to: - Task & Subtask management — CRUD operations on n8n data tables - User profile updates — persist learned information about the user - Supabase Vector Store — RAG queries against past conversation summaries 4. Sub-Agents Specialized agents handle domain-specific work: | Agent | Model | Purpose | |-------|-------|---------| | Research Agent | Gemini 3 Flash | Web research via Tavily + Wikipedia | | Email Manager | Claude Haiku 4.5 | Gmail operations (read, reply, send, delete, search) | | Document Manager | Claude Haiku 4.5 | Google Docs/Drive operations | | Worker 1 | Claude Haiku 4.5 | Simple tasks | | Worker 2 | Claude Sonnet 4.5 | Mid-level work | | Worker 3 | Claude Opus 4.6 | Complex reasoning | 5. Output Routing A Switch node routes the agent's response back to the originating channel (Telegram or WhatsApp). 6. Long-Term Memory Pipeline A separate scheduled flow runs periodically to: 1. Pull new chat history from Postgres 2. Aggregate and summarize conversations (Haiku 4.5) 3. Generate embeddings (OpenAI) 4. Store in Supabase vector database for future RAG retrieval Setup Steps Step 1: Import the Workflow 1. Open n8n 2. Go to Workflows → Import from File 3. Select the n8nClaw.json file Step 2: Create Data Tables Create three n8n data tables: Init Table (user profile): | Column | Type | |--------|------| | username | string | | soul | string | | user | string | | heartbeat | string | | lastchannel | string | | lastvectorid | number | Tasks Table: | Column | Type | |--------|------| | taskname | string | | taskdetails | string | | taskcomplete | boolean | | Isrecurring | boolean | Subtasks Table: | Column | Type | |--------|------| | parenttaskid | string | | subtaskname | string | | subtaskdetails | string | | subtaskcomplete | boolean | Step 3: Set Up Supabase Vector Store Create a documents table in Supabase with the pgvector extension enabled. The table should match the schema expected by n8n's Supabase Vector Store node (include a matchdocuments function). Step 4: Configure Credentials Set up the followi