Automated social media publishing pipeline with n8n and Telegram
An automated workflow built with n8n, a Node.js panel, and Telegram that handles everything from news scraping and LLM draft generation to human-in-the-loop review and publishing. It ensures system stability and security through error-resilient execution, API key isolation, and CI validation.
Added 2026-11-03 · originally published 2026-11-02
Steps
- 1Deploy the Poster application (including n8n community edition and the Node.js web panel) on a Docker host or NAS.
- 2Configure the Node.js panel to store third-party API keys, and use the gateway and workflows to request LLM text, images, and other APIs.
- 3Generate the workflow JSON using Python build scripts and .js files, and validate node names and references via CI.
- 4Set up a news bot to fetch content, generate drafts via LLM, and send them to Telegram with ✅/❌ buttons for manual review.
- 5Automatically publish to X and Facebook upon approval. If a platform fails, a Code node generates an error report and allows retrying failed items via Telegram.
Ideas for Chinese platforms
This can be adapted for automated operations on domestic platforms like Xiaohongshu, Douyin, or WeChat Official Accounts, creating a closed-loop system of "AI-generated text/image/video drafts -> one-tap human review -> automated multi-platform scheduled publishing" via approval flows similar to Telegram or WeChat Work.
Please help me write a Python build script and the corresponding Code node .js files for an n8n workflow that implements the following logic: fetch content from news sources, call an LLM to generate social media drafts, send them to Telegram with [approve] and [reject] buttons, and publish to [X platform] and [Facebook platform] based on the review result. Ensure each publishing node continues on error, and use a final Code node to generate a summary report.
Related use cases
Summarized by AI from the original source - refer to the original post for details. Copyright belongs to the original author.