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.
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:
Four triggers feed into the agent:
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 (user_message, system_prompt, last_channel).
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.
The agent has direct access to:
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 |
A Switch node routes the agent's response back to the originating channel (Telegram or WhatsApp).
A separate scheduled flow runs periodically to:
n8nClaw.json fileCreate three n8n data tables:
Init Table (user profile):
| Column | Type |
|---|---|
| username | string |
| soul | string |
| user | string |
| heartbeat | string |
| last_channel | string |
| last_vector_id | number |
Tasks Table:
| Column | Type |
|---|---|
| task_name | string |
| task_details | string |
| task_complete | boolean |
| Is_recurring | boolean |
Subtasks Table:
| Column | Type |
|---|---|
| parent_task_id | string |
| subtask_name | string |
| subtask_details | string |
| subtask_complete | boolean |
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 match_documents function).
Set up the following credentials in n8n (only configure the channels and services you plan to use):
| Credential | Required For |
|---|---|
| Telegram Bot API | Telegram channel |
| OpenRouter API | All AI models |
| Postgres | Chat memory |
| Supabase | Vector store / RAG |
| OpenAI API | Embeddings |
| Gmail OAuth2 | Email management |
| Evolution API | |
| Google AI (Gemini) | Media processing |
| Google Docs/Drive OAuth2 | Document management |
| Tavily API | Web search (Research Agent) |
Search the workflow for YOUR_ and replace with your actual values:
| Placeholder | Replace With |
|---|---|
YOUR_USERNAME |
Your chosen username |
YOUR_TELEGRAM_CHAT_ID |
Your Telegram chat ID |
YOUR_PHONE |
Your phone number (WhatsApp) |
YOUR_EVOLUTION_INSTANCE |
Your Evolution API instance name |
YOUR_*_TABLE_ID |
IDs of the data tables from Step 2 |
YOUR_*_CREDENTIAL_ID |
Auto-populated when connecting credentials |
YOUR_PROJECT_ID |
Your n8n project ID |