This workflow creates a Telegram bot that summarizes articles and generates images. Key nodes include Telegram Trigger (receives messages), Input Validator (checks message validity), Command Router (routes /help, /summary, /img), URL Extractor/Validator/Fetcher (processes article URLs), Content Extractor (scrapes article text), Article Summarizer (uses OpenAI gpt-3.5-turbo), Image Generator (uses DALL-E 2), and response nodes (Help Responder, Summary Sender, Image Response Sender, Error Response Handler).\n\nSetup Requirements and Configuration: Install n8n from n8n.io for self-hosting or sign up at cloud.n8n.io. Follow setup prompts or create a cloud account. Create a Telegram bot via BotFather: in Telegram, search @BotFather, send /newbot, set a name and username (ending in 'bot'), and copy the API token. Obtain an OpenAI API key from platform.openai.com: sign in, go to ‘API Keys,’ create a key. In n8n, import the JSON workflow. Configure Telegram Trigger and Telegram nodes with the BotFather token under ‘Credentials’ > ‘Telegram.’ Set the ChatGPT node with the OpenAI API key under ‘Credentials’ > ‘OpenAI API.’ Ensure HTTPS for webhook access. Verify server support for Telegram and OpenAI API calls.\n\nTesting and Deployment Steps: Activate the workflow in n8n to get the Telegram Trigger URL. In Telegram, message your bot with /help, /summary https://example.com, or /img sunset cityscape. Success responses include a help menu, 8-12 bullet-point summaries (200 status), or image confirmation. Error nodes handle invalid inputs (e.g., empty messages, non-HTTP URLs, short prompts) with 400/500 status and messages like ‘URL Fetch Error’ or ‘Invalid prompt.’ Check n8n logs for errors like ‘Invalid API key,’ ‘Rate limit exceeded,’ or ‘Inaccessible URL.’ Validate outputs: summaries should cover key article points, and images should reflect prompts. Debug using logs for issues like network failures or credential errors. Ensure stable internet for API reliability.
$6.99
Workflow steps: 18
Integrated apps: telegramTrigger, if, telegram