Skip to content
曾亮懿 ZengLiangYi Blog

n8n-x-autopost

Open-source n8n workflow combining topic feeds, DeepSeek A/B draft generation, Telegram inline-button review, and Buffer GraphQL multi-platform publishing.

Table of contents Show Hide

The problem: unattended auto-posters sound robotic, while manual curation burns hours

Staying active across social platforms as a developer or indie builder (X / Twitter, Threads, LinkedIn, Bluesky) rarely stalls on clicking “Post”—it stalls on scanning feeds, filtering out noise, drafting sharp angles, and preparing preview visuals. Yet fully unattended auto-posters quickly degrade an account’s voice with generic AI filler, hallucinated context, or ban-inducing browser-cookie automation.

n8n-x-autopost takes a human-in-the-loop (80% automated preparation + 20% human editorial judgment) approach. An n8n workflow rotates across three high-signal topic pools, deduplicates against a 300-item sliding window, generates two distinct A/B drafts with DeepSeek alongside a 1200×630 preview card, and delivers an interactive review message to Telegram. A single tap on an inline button publishes immediately—or schedules to a queue—across multiple social networks through Buffer’s official GraphQL API.

Why Human-in-the-Loop Instead of Unattended Auto-Posting? Automating feed curation, deduplication, A/B drafting, and image rendering removes over 80% of daily friction, while keeping a 5-second Telegram approval gate ensures every published post reflects a deliberate editorial choice.

Core workflow capabilities

1. Three rotating topic pools & deduplication

Triggered on a cron schedule (08:15, 11:15, 20:15 daily) or on demand via Telegram commands (/biz, /tech, /trends), rotating across Indie Business (Show HN via Algolia), Tech (HN front page), and US Daily Trends (Google Trends RSS) with a 300-item static-data deduplication window.

2. DeepSeek A/B drafting & automatic visuals

Generates two contrasting narrative angles (Draft A and Draft B) per story with mobile-friendly short-line spacing and anti-cliché prompt constraints, paired with a 1200×630 preview image (GitHub OpenGraph social card or 11ty page screenshot).

3. Single-user Telegram gate & inline controls

Enforces a strict YOUR_TELEGRAM_CHAT_ID allowlist across all three entry points. Each review card includes inline buttons to publish A or B with an image, publish text-only, add to the Buffer queue, switch topic pools, or skip.

4. Multi-platform fanout via Buffer GraphQL

Uses Buffer’s official GraphQL API (createPost mutation by channelId) instead of brittle headless browsers, supporting X, Threads, LinkedIn, Bluesky, Mastodon, and parallel multi-channel publishing.

End-to-end pipeline architecture

The entire pipeline ships as a single self-contained n8n workflow JSON organized into four stages:

Pipeline stage Automated responsibility Key engineering constraint
1. Rotating feeds & dedup Polls Show HN, HN front page, and Google Trends RSS Sliding 300-item static-data history prevents duplicate pitches
2. DeepSeek A/B rewrite & image Produces Draft A (insight hook) + Draft B (builder breakdown) + 1200×630 image Prompt rules enforce short lines and strip generic AI filler
3. Telegram inline review gate Delivers preview card with publish, text-only, queue, pool-switch, and skip buttons Enforces YOUR_TELEGRAM_CHAT_ID allowlist across all 3 trigger nodes
4. Buffer GraphQL fanout Calls Buffer createPost and edits the Telegram message in place Turns Telegram chat history into an auditable publishing log

Four-step editorial loop

  1. Scheduled push or on-demand pull (/biz, /tech, /trends): In addition to three daily scheduled runs, sending /biz (Show HN indie products), /tech (top Hacker News discussions), or /trends (Google Trends US daily stories) in Telegram immediately fetches the next unseen candidate from that pool.
  2. Context extraction, A/B rewriting & preview card: n8n extracts the source title, URL, and discussion context, prompts DeepSeek to write two contrasting drafts (Draft A and Draft B), attaches a 1200×630 social card or webpage screenshot, and sends the package to Telegram.
  3. One-tap decision in Telegram: Review both drafts on mobile and tap an inline button: 🚀 Publish A/B (with image), 📝 Text-Only A/B, 📅 Queue A/B (push to Buffer’s scheduled queue), 🔄 Biz/Tech/Trends (switch topic pool immediately), or ❌ Skip.
  4. In-place message audit trail & multi-channel delivery: Once a button is tapped, n8n executes the Buffer createPost mutation and edits the original Telegram message in place with the final status (✅ Published, 📅 Queued, or ❌ Skipped).
Screenshot of the Telegram review card showing the source headline, DeepSeek A/B draft options, and the inline action button matrix

Live Telegram review card displaying the source link, Draft A and Draft B copy, and the inline button matrix for instant publishing, queuing, or switching topic pools.

Sanitized, ready-to-import blueprint

To make the workflow easy to adopt on any self-hosted or cloud n8n instance:

  • Zero hardcoded secrets: All Telegram chat IDs, Buffer channel IDs, and API credentials are parameterized with clean placeholders alongside bilingual step-by-step setup documentation.
  • Composable multi-channel fanout: Because Buffer’s GraphQL endpoint routes posts by channelId, duplicating the publish node lets a single Telegram approval fan out to X, Threads, LinkedIn, and Bluesky simultaneously.

For the importable workflow.json, Buffer channel discovery queries, and setup instructions, visit the n8n-x-autopost GitHub repository.

Have a question or an idea?

Send me a message to discuss an implementation or explore a project idea.