AI Telegram Command Bot for Content Summarization and Image Generation - n8n Workflow

Deploy an expert n8n workflow to create a smart Telegram bot. Features article summarization via OpenAI and handles image generation prompts, providing reactive AI services. Excellent n8n templates for conversational AI.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Automation specialists looking for robust n8n templates for conversational interfaces.
Content creators and researchers needing a quick way to summarize web articles using AI directly from Telegram.
Developers exploring how to seamlessly integrate OpenAI and Telegram using a specialized n8n node.
Teams requiring a highly reactive, custom chat interface built on the n8n automation platform.

Overview

This solution demonstrates a powerful use case for the n8n automation platform: building a versatile AI assistant accessible through Telegram. By leveraging this sophisticated n8n workflow, users can deploy a custom bot capable of fetching web content, extracting the core text, and using OpenAI for sophisticated 10-12 point summarization. This n8n workflow also includes the framework for handling image generation prompts, showcasing the flexibility of the platform.

The core value is efficiency—transforming long articles into actionable summaries instantly, all triggered by a simple command in Telegram. This specific n8n workflow starts with a Telegram n8n trigger, making it instantly reactive to user input and providing a scalable foundation for more complex AI operations.

How it Works

This comprehensive n8n workflow is initiated by a Telegram message and routes the request based on the user's command:


  1. Listener (n8n Trigger): The Telegram n8n trigger starts the n8n workflow upon receiving any new message in the monitored chat.

  2. Command Router: The first If n8n node checks if the message begins with /help. If true, the n8n workflow branches to the Help Responder to provide command instructions.

  3. Summary Checker: If the command is not /help, the n8n workflow proceeds to check for the /summary command.

  4. Article Fetching: If /summary is detected, the Fetcher n8n node executes an HTTP Request using the URL provided in the message’s link preview option. The Text Extractor n8n node then cleans the downloaded HTML, pulling only the content within the tag.

  5. AI Summarization: The Summarizer n8n node (an OpenAI integration) receives the raw article text and, using a custom prompt, generates a professional 10–12-point bullet-point summary.

  6. Summary Delivery: The Summary Sender Telegram n8n node delivers the final AI-generated summary back to the user.

  7. Image Prompt Handling: If the command was neither /help nor /summary, the Image Prompt Checker n8n node verifies if the message starts with /img.

  8. Image Acknowledgement: If /img is found, the Image Generator n8n node is theoretically activated. The n8n workflow then sends an acknowledgment via the Image Acknowledger n8n node, confirming the prompt submission.

Installation Guide

To use this powerful n8n workflow, follow these setup steps:


  1. Import: Copy the provided JSON data and import it into your n8n instance via the 'Workflows' screen using the 'New' -> 'Import from JSON' option.

  2. Telegram Credentials: Edit the 'Listener' n8n trigger node and the 'Help Responder,' 'Summary Sender,' and 'Image Acknowledger' n8n node instances. You must configure your Telegram Bot API credentials.

  3. OpenAI Credentials: Edit the 'Summarizer' and 'Image Generator' n8n node configurations. Provide your OpenAI API Key credentials to allow the n8n workflow to access the large language models for processing.

  4. Activation: Ensure the n8n workflow is active. Once deployed, the Telegram bot will respond to your commands.

Node Details

Listener (Telegram Trigger): The essential n8n trigger for this automation. It initiates the n8n workflow immediately upon receiving a new Telegram message, filtering for standard messages.
Command Router (If n8n node): Manages flow control by checking if the incoming message text starts with /help. This logic directs the n8n workflow down the correct path.
Fetcher (HTTP Request n8n node): Used in the summarization path. It performs a GET request to the extracted URL to retrieve the full HTML content of the article.
Text Extractor (HTML n8n node): A crucial step in cleaning data. It takes the raw HTML output from the Fetcher n8n node and extracts only the text content within the , ensuring the AI receives clean, relevant data.
Summarizer (OpenAI n8n node): The core AI component. It takes the cleaned article text and instructs OpenAI (or an equivalent LangChain service) to generate a concise 10–12 point professional summary, demonstrating advanced AI capabilities within the n8n workflow.
Summary Sender (Telegram n8n node): Sends the final, formatted summary back to the user's chat ID, concluding the summarization path of the n8n workflow.


  • Image Generator (OpenAI n8n node): Placeholder node for image generation resource. It captures the image prompt, though the current configuration sends an acknowledgement rather than the final image URL, preparing the n8n workflow for future expansion.

Related n8n Workflows

Free

Nodes: 7 Nodes
Updated: December 26 2025
View all
Created by

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

Featured*