X

From Any Webpage to X-Ready Posts: Full Auto-Publish or Free Copy-Paste

· 5 min read · YayaAgent Team

You found a great article. You know it would make a solid X thread. Twenty minutes later, you're still staring at the text, cutting the wrong sentences, losing the hook, and giving up halfway through.

That's the actual bottleneck — not writing, but compressing. This workflow automates the compression step: it pulls content from any webpage or RSS feed, reformats it into X-style copy (short lines, a real hook, thread-ready chunks), and then hands it off one of two ways — auto-published straight to X, or dropped into a Notion database you can copy-paste from on your phone in ten seconds.

You don't need to pick one path forever. Build the core once, and choose the ending based on your budget.

图片建议 1:架构图(topology diagram)
展示数据流:网页/RSS → n8n Trigger → AI重组节点 → 分叉成两条路径(Notion写入 / X API发布)。这个图能传达文字和表格都无法体现的"一份核心逻辑,两个出口"的结构,值得保留。不要做成"对比表格换皮"的决策框图。

What You'll Need

  • An n8n instance (self-hosted, per B6's VPS deployment guide)
  • An OpenRouter or Anthropic API key for the reformatting step — see Credentials Hub for setup
  • Free path: a Notion account and an Integration Token
  • Paid path: an X Developer account on the Basic tier (~$100/month at time of writing — confirm current pricing before committing)

If you haven't decided between free and paid tooling yet, our Free vs. Paid AI Agent Tools guide covers the tradeoff in more depth.

Step 1: Trigger — RSS Feed or Manual URL Input

If you're pulling from a blog or news source with a feed, use n8n's RSS Feed Read node on a schedule (every 30–60 minutes is plenty). If you want to convert a specific page on demand instead, use an HTTP Request node with a webhook trigger, so you can paste a URL into a form and kick off the workflow manually.

Either way, the output at this stage is raw HTML or article text. Pass it through an HTML Extract node (or a simple Function node stripping tags) before it reaches the AI step — feeding raw HTML to the model wastes tokens on markup it doesn't need to see.

Step 2: AI Reformatting — The Part That Actually Matters

This is where the workflow earns its keep. A generic "summarize this" prompt won't produce something that reads like a real X post — it'll produce a shrunk-down paragraph, which is not the same thing.

Use an AI Agent or Chat Model node (OpenRouter or Anthropic both work) with a prompt that does three specific things: extracts the single strongest claim or hook from the source, forces short declarative sentences, and outputs a thread structure rather than one dense block.

System: You convert long-form web content into X (Twitter) thread copy.

Rules:
- First line must be a standalone hook under 100 characters — no throat-clearing, no "In this article we discuss..."
- Each subsequent line is one idea, one sentence, under 200 characters
- Break the thread into numbered posts (1/, 2/, 3/...)
- Do not use hashtags unless the source content is about a named tool or brand
- Preserve specific numbers, names, and claims from the source — do not generalize them away

Output as a JSON array of strings, one string per post.

Asking for JSON output here isn't a style choice — it's what makes the next step (writing rows into Notion, or looping through posts to publish a thread) reliable. Free-text output means you're parsing line breaks by hand later, which breaks the moment the model formats something slightly differently.

图片建议 2:真实截图
n8n中AI节点的实际配置界面(prompt输入框+模型选择),证明这一步真实可跑通,属于教程类文章高价值的"证明步骤"截图,不是装饰性配图。

Step 3A: Free Path — Write to Notion

Split the JSON array with a Split Out node, then use the Notion node (Create Database Page) to write each thread into a database with columns for Post Text, Source URL, Status (Draft/Posted), and Created At.

Setting this up needs a Notion Integration Token, not OAuth — create it at notion.so/my-integrations, then share your target database with the integration from the database's "Connections" menu. This is a five-minute setup, noticeably simpler than what the X API path requires.

Open the Notion database on your phone when you're ready to post, copy each line, paste it into X. It's manual, but it's free, and the hard part — writing the copy — is already done for you.

图片建议 3:真实截图
Notion数据库最终呈现效果(几行thread内容+Status列),让读者直观看到"这就是我复制粘贴的地方",属于证明性截图,有实际信息量。

Step 3B: Paid Path — Auto-Publish to X

If you'd rather skip the copy-paste step entirely, loop through the JSON array with a Split Out + HTTP Request node calling the X API's POST /2/tweets endpoint, threading each post as a reply to the one before it using reply.in_reply_to_tweet_id.

The setup cost here isn't really the API pricing — it's the authentication. X uses OAuth 1.0a, not the OAuth2 flow most tools use, which means you need four separate credentials: API Key, API Key Secret, Access Token, and Access Token Secret, all generated from your X Developer Portal app settings under "Keys and Tokens." n8n's built-in Twitter node handles the OAuth 1.0a signing for you — configure it once in Credentials, and you won't touch the raw signing logic again.

Budget-wise, confirm current X Developer Portal pricing before signing up — it has changed more than once and this article won't stay current on that number.

Avoiding Duplicate Posts

Whichever path you choose, you need a way to know "have I already processed this URL?" — otherwise your RSS trigger will happily reformat and re-post the same article every time it re-checks the feed.

The simplest fix: before the AI step, add an IF node that checks the incoming URL against a list you've already processed. Store that list in n8n's Static Data (a lightweight key-value store built into every workflow — no separate database needed) or, if you're already on the Notion path, just query your database for a matching Source URL and skip if found. Either way, only URLs you haven't seen before make it to the AI step.

Free vs. Paid: Quick Comparison

Notion Path X API Path
Cost Free ~$100/month (X Developer Basic)
Setup time ~5 minutes ~20–30 minutes (OAuth 1.0a)
Manual step required Yes — copy-paste to post No — fully automated
Best for Occasional posting, testing the workflow Multiple accounts, high posting frequency

Bottom Line

The value in this workflow isn't the publishing step — it's the reformatting. Getting a model to reliably turn a wall of text into a real thread, with a hook that isn't generic and posts that aren't just a paragraph cut into pieces, is the actual hard part. Once that's solid, whether the output lands in Notion for you to paste by hand or goes straight out through the X API is just a budget decision, not a technical one. Start with the free path to prove the reformatting logic works, then upgrade to auto-publish once you know you'll use it enough to justify the API cost.

Further Reading

  • Free vs. Paid AI Agent Tools — if you're still deciding whether OpenRouter's free tier is enough for this workflow
  • [RSS/Website Change Monitoring workflow] — the same RSS-trigger pattern used here, applied to price/content alerts instead
  • [VPS Health Monitoring workflow] — once this workflow is running 24/7, here's how to make sure the VPS itself stays healthy
  • Gmail-to-Telegram Workflow Tutorial — another beginner-friendly n8n template if you're building your first automation