Use this complex n8n workflow to deploy a GPT-4 powered AI agent via Telegram, capable of executing system commands, performing real-time searches, and managing Google Calendar.
Download this n8n workflow template and start using it instantly.
This cutting-edge n8n workflow transforms a standard Telegram chat into a highly capable "QuantumDefender AI" cybersecurity assistant. By leveraging a GPT-4 class language model via the specialized Langchain n8n node, this solution provides real-time internet search capabilities, persistent conversational memory, Google Calendar management, and, critically, the ability to execute terminal commands on the host system.
This complex n8n automation is perfect for automating red teaming tasks, performing quick system checks, or instantly retrieving deep cybersecurity knowledge, making it a highly valuable n8n template for technical operations. The workflow uses a meticulous structure that ensures robust conversational flow and high responsiveness, starting every interaction by employing the send_typing tool via a dedicated n8n node.
chatbot n8n trigger (a Telegram Trigger n8n node), which listens for any incoming message from an authorized user ID.Simple Memory n8n node, establishing a unique conversational context to maintain chat history throughout the session.Agent n8n node. This Langchain Agent uses a custom system prompt defining its role as an elite cybersecurity AI.sendtyping n8n node via Telegram to provide instant feedback. Based on the user's input, the Agent intelligently selects from a diverse set of available tools:Searchtool (an HTTP Request n8n node) is used for real-time internet research and RAG capabilities.Execute Command n8n node is invoked to run scripts or system utilities, a core feature of this n8n workflow.create-event, Delete-event, update-events, Google Calendar) for scheduling and managing professional commitments.Calculator n8n node handles complex mathematical queries.Telegram n8n node, concluding the cycle of the n8n workflow.This n8n workflow requires setting up credentials for multiple services to function correctly:
chatbot (Telegram Trigger n8n trigger) and the final Telegram n8n node. Ensure you whitelist the specific Chat IDs allowed to interact with the bot. Important: Activate the webhooks for the chatbot n8n trigger and the sendtyping n8n node.OpenAI Model n8n node with a valid OpenAI API key that has access to GPT-4 level models.Searchtool (HTTP Request n8n node), locate the Authorization header under the body/headers parameters and replace the placeholder Bearer token with a valid API key for the Langsearch service (or substitute with your preferred search API setup). chatbot (Telegram Trigger n8n trigger): Acts as the entry point, initiating the n8n workflow upon receiving messages from a whitelisted Telegram user.
Simple Memory (Langchain Memory n8n node): Crucial for maintaining conversation state by using the Telegram user's ID as a session key, allowing for multi-turn conversations within this n8n workflow.
OpenAI Model (Langchain Model n8n node): Connects to the LLM (GPT-4 class) service, providing the core intelligence needed for complex reasoning and tool usage.
Agent (Langchain Agent n8n node): The logic hub. It interprets user intent, manages the tool usage chain, and applies the "QuantumDefender AI" persona defined in its system prompt.
sendtyping (Telegram Tool n8n node): Used by the Agent to send the "typing..." indicator to Telegram, significantly enhancing the perceived responsiveness of the n8n automation.
Searchtool (HTTP Request Tool n8n node): Configured as a tool accessible by the Agent for performing real-time web searches by calling an external search API.
Execute Command (n8n node): A powerful, security-focused tool that allows the Agent to run commands on the machine hosting n8n, enabling automated operational tasks.
Google Calendar Tools (4 n8n nodes): A suite of tools that gives the Agent control over Google Calendar operations (CRUD), turning natural language requests into calendar actions within this n8n workflow.
Automate WhatsApp customer support using this n8n workflow. Connect Gemini AI to a Google Docs knowledge base to instantly answer user questions and log interactions, ensuring Meta compliance.

Implement a reliable customer support system for SMEs using this simple n8n workflow. Automatically categorize requests, log tickets in Google Sheets, and send instant acknowledgments.

Deploy a powerful RAG chatbot using this specialized n8n workflow. Integrates Google Drive, OpenAI, Pinecone, and Cohere to provide accurate, context-aware answers using n8n templates.

Automate daily cyber threat intelligence gathering from 10+ RSS feeds, use Gemini AI via an n8n workflow to summarize, deduplicate, and generate high-signal daily and viral topic digests.

Automate company data extraction from DNB using Bright Data scraping, OpenAI LLMs (GPT-4o-mini), and a structured JSON schema within this advanced n8n workflow. Deploy powerful n8n templates for data enrichment.

An Opensource Enthusiast specializing in detection engineering, threat hunting, and automating security operations to accelerate threat detection and response.







































