Block 1 - Code
- Type / Role
- n8n-nodes-base.code - code
- Config choices
- Version 2
This workflow implements an advanced AI automation agent (OpenClaw Agent) that interacts with users through Telegram and integrates multiple AI models, external tools, and cloud services to automat...
n8n-nodes-base.code, n8n-nodes-base.telegramtrigger, n8n-nodes-base.telegram, n8n-nodes-base.set, n8n-nodes-base.switch, @n8n/n8n-nodes-langchain.openai, n8n-nodes-base.ftp, @n8n/n8n-nodes-langchain.lmchatgooglegemini
This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Davide Boizza.
Original n8n.io sourceThis workflow implements an advanced AI automation agent (OpenClaw Agent) that interacts with users through Telegram and integrates multiple AI models, external tools, and cloud services to automate complex tasks.
I've described my basic idea in this video.
VERY IMPORTANT: By adapting the system prompt, inserting subworkflows or mcp servers and adjusting with webhooks many of the workflows I have developed on this page it is possible to potentially extend the template infinitely.
The agent can autonomously decide which tools to use to complete the request. It has access to multiple integrations, including:
The system also includes persistent chat memory stored in PostgreSQL, allowing the AI to remember previous interactions and maintain conversation context.
Finally, the workflow generates a response and sends it back to the user via Telegram. If the input was voice-based, the response can also be converted into audio and returned as a voice message.
An escalation mechanism allows the system to transfer the conversation to a human operator when needed.
The workflow supports text, voice, and image inputs, allowing users to interact with the system naturally.
The integrated AI agent can autonomously decide which tools to use to solve tasks, reducing manual intervention and enabling intelligent automation.
The workflow can manage emails, documents, spreadsheets, presentations, and calendar events directly through AI commands.
The system can access external knowledge sources through a vector database, improving response accuracy and enabling knowledge-based answers.
Conversation history is stored in PostgreSQL, allowing the agent to maintain context and provide more relevant responses over time.
Built-in web search and scraping capabilities allow the agent to gather real-time information from the internet.
The system can generate audio responses, creating a more natural conversational experience.
The workflow is highly modular, allowing new tools, agents, and services to be added easily.
When automation is not sufficient, the system can escalate the conversation to a human operator.
Overall, the workflow acts as a fully autonomous AI assistant capable of performing complex operational tasks across multiple platforms.
This workflow is a comprehensive Telegram-based AI orchestrator that simulates an OpenClaw-style multi-agent architecture. When a user sends a message to the Telegram bot, the workflow:
Receives and authorizes the message through a Telegram trigger, checking if the user ID matches an authorized user (configured in the Code node)
Routes different content types using a Switch node that detects whether the incoming message contains text, voice, or images:
Feeds the processed input (text, transcribed voice, or image URL with caption) into the "OpenClaw Agents" node - an AI agent configured with Gemini as the language model and Postgres for chat memory
Orchestrates specialized sub-agents through the main AI agent, which can delegate tasks to multiple tools:
XXX in the Code node with your authorized Telegram user ID/XXX/ in Upload image node with actual path and domain in Set Image Url node)XXX)π Subscribe to my new YouTube channel. Here Iβll share videos and Shorts with practical tutorials and FREE templates for n8n.
Contact me for consulting and support or add me on Linkedin.
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.
Showing the first 24 of 86 workflow blocks. Download the JSON for the full node graph.
| Workflow | OpenClaw Clone π¦: Expandable Personal Telegram AI Agent Template |
|---|---|
| Complexity | advanced |
| Nodes | 86 |
| Categories | Support Chatbot, AI Chatbot |
| Author | Davide Boizza |
| Published | 11 Mar 2026 |
Use the JSON export at /data/workflows/14008/14008.json as the source template for this automation.
Open n8n, import the downloaded JSON, and review each node before activating the workflow.
Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.
Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.
Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.
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.
This workflow implements an advanced AI automation agent (OpenClaw Agent) that interacts with users through Telegram and integrates multiple AI models, external tools, and cloud services to automat...
Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.
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 Support Chatbot, AI Chatbot use case.