如何用 n8n 和任意 LLM API 將網誌 RSS 轉成一週社交媒體帖文草稿
Turn Your Blog RSS into a Week of Social Posts with n8n and Any LLM API
作者分享一套以 n8n 和 LLM API 將網誌 RSS 文章轉成 X、LinkedIn 和 Facebook 草稿的流程,並保留發布前的人手審核。流程每日讀取最新 RSS 項目,以 OpenAI-compatible 格式呼叫 chat completions API,再將草稿存入 Google Sheets;API key 應放在 CONFIG node,而非寫死在程式碼中。
Posting consistently is a distribution problem, not a writing problem. You already wrote the thinking (the blog post). This workflow turns each new post into platform-native drafts automatically, and a human reviews before anything goes out.
The workflow
Schedule (daily) -> Read Blog RSS -> Take newest post -> LLM draft -> Parse -> Save to Google Sheets.
Building it
1. RSS Read node with your feed URL. n8n's RSS node outputs title, link, contentSnippet per item.
2. Take the newest. A Code node: return items.slice(0, 1);
3. The LLM call. HTTP Request node, POST to your provider's chat completions endpoint. I use an OpenAI-compatible shape so you can swap providers (OpenAI, DeepSeek, Groq all accept the same body):
{
"model": "gpt-4o-mini",
"response_format": { "type": "json_object" },
"messages": [
{ "role": "system", "content": "You repurpose blog posts into social drafts. Return ONLY valid JSON with keys: x_post, linkedin_post, facebook_post. x_post: max 240 chars, hook first. linkedin_post: 80-150 words, hook on first line. facebook_post: 40-80 words, conversational." },
{ "role": "user", "content": "Title: ... Link: ... <first 2000 chars of post>" }
]
}
Send the API key as an Authorization: Bearer header. Keep the key in your CONFIG node, not hardcoded.
4. Parse. A Code node: JSON.parse(items[0].json.choices[0].message.content), then shape one clean item with date, source_title, source_url, the three drafts, and status: 'draft'.
5. Save. Append to a Google Sheets tab with matching columns. Review the drafts over coffee, copy, post.
Why drafts, not auto-posting
AI drafts are 80% there and 20% off-brand. The sheet is the review queue. This keeps your voice intact and avoids the classic automation embarrassment of a bot posting nonsense at 3am. Total human time: 10 minutes a day.
Cost
One post a day through a mini model costs cents. If you are watching every dollar, point the HTTP node at DeepSeek; same request shape, roughly a tenth of the price.
This is one of five workflows in my automation template pack (lead capture, Stripe dunning, this repurposer, review drips, lead reactivation), all with setup checklists and docs.
來源:DEV Community · dev.to