Deploy a versatile n8n workflow using a Telegram trigger and OpenAI. This n8n template handles dynamic command routing for automated article summarization and image prompt processing.
Download this n8n workflow template and start using it instantly.
This robust n8n workflow solves the challenge of consolidating multiple AI functions into a single user-friendly interface. By leveraging the Telegram Trigger n8n node, users can interact with powerful AI models simply by sending command-prefixed messages (like /summary or /img ). This specific n8n template demonstrates effective command parsing using sequential IF logic nodes, ensuring that the correct sequence of actions—from fetching external data via an n8n node to processing it with the OpenAI n8n node—is executed accurately. This architecture allows the n8n automation to be easily scaled by adding more commands and subsequent specialized n8n node paths, making it a key example of how to build sophisticated, conversational AI agents using the n8n platform.
The entire flow begins instantly with the Trigger: Telegram Webhook n8n trigger node, which listens for new messages sent to the bot. The message content is immediately passed through a cascaded series of IF nodes for dynamic command routing:
/help. If true, the n8n workflow sends a predefined help menu back to the user via a Telegram n8n node./help, the flow checks for the /summary command. If matched, the n8n automation executes the web scraping and summarization path:/img command. This path routes the prompt to the second OpenAI n8n node (AI: Process Image Generation Request). Currently, this n8n workflow sends a notification back to the user confirming the prompt was received, demonstrating where a full image generation API call (like Stability AI) would be integrated.To utilize this highly functional n8n workflow, follow these steps:
/help or /summary to your Telegram bot to test the full n8n automation. Trigger: Telegram Webhook (n8n trigger node): The starting point of the n8n workflow. It listens for message updates from the configured Telegram bot, initiating the command-based logic flow.
Route: Check for Help Command / Summary Command / Image Command (IF n8n node): These core logic nodes perform sequential command routing. They check if the input message text starts with specific strings (/help, /summary, /img). This is essential for directing the n8n workflow to the correct processing path.
Fetch: Download Article Content (HTTP Request n8n node): Used in the summarization path. It dynamically fetches the content of the URL provided in the Telegram message, using a specific User-Agent header to ensure successful extraction.
Parse: Extract Text from HTML (HTML n8n node): Cleans the raw HTML content received from the HTTP Request n8n node, isolating clean body text while skipping non-essential elements like links and images.
AI: Generate Article Summary (OpenAI n8n node): The central processing step for summarization. It sends the clean extracted text to OpenAI, instructing it to produce a structured summary of 10–12 bullet points. This powerful n8n node handles the complex AI interaction.
Response: Send Article Summary / Help Menu / Image Generation Notice (Telegram n8n node): These nodes handle the final output, sending formatted text or notifications back to the user's specific Telegram chat ID, completing the n8n automation cycle.
Use this comprehensive n8n workflow to turn 51 College Football Data API endpoints into a powerful tool for your AI agents. Accelerate sports analytics and data retrieval with n8n templates.

Deploy this powerful n8n workflow to automatically search Twitter for specific keywords, deduplicate findings against existing Airtable records, and append only new, unique tweets to your database.

Use this powerful n8n workflow to capture leads via an embedded form, validate emails using Hunter, and instantly log data to Google Sheets, Gmail, and Discord for rapid follow-up.

Use this comprehensive n8n workflow to monitor community platforms (Reddit and Discourse forums). It scrapes data, classifies posts, uses OpenRouter AI to summarize user problems, and delivers daily digests via email. Get started with n8n templates today.

Use this powerful n8n workflow to compare responses from four major AI models (Qwen, DeepSeek, Seed-OSS, Nemotron) simultaneously using the Nvidia API. Ideal for fast ensemble intelligence.

Building AI Agents and Automations | Growth Marketer | Entrepreneur | Book Author & Podcast Host







































