DEV Community

Alex Kane
Alex Kane

Posted on

Turn any RSS feed into a daily social media content machine with n8n (free workflow JSON)

If you follow industry blogs or news sites, you already know the pain: you see a great article, think "I should share this," then forget.

An RSS-to-social autoposter solves this permanently. It watches any RSS feed, detects new posts, rewrites them as platform-native social content, and publishes automatically. Set it up once and forget it.

Here's a complete n8n workflow that does exactly that — Schedule Trigger + RSS parser + AI content generator + Twitter/LinkedIn poster + Google Sheets dedup log. Free to run on your own n8n instance.


What the workflow does

Runs every 15 minutes, reads your chosen RSS feed, deduplicates against a Google Sheets log, generates AI-written Twitter + LinkedIn posts for each new item, and publishes them.

Node 1 — Schedule Trigger

Runs every 15 minutes. This is the heartbeat.

Node 2 — HTTP Request: Fetch RSS feed

Fetches any RSS/Atom feed as raw text. Works with any blog, news site, YouTube channel, podcast, or subreddit.

Node 3 — Code: Parse RSS XML

Parses the raw XML, extracts title, link, pubDate, and description for each item. Returns the 5 most recent items as a clean array.

Node 4 — Google Sheets: Check already posted

Reads your dedup sheet (list of URLs you've already shared) and filters out anything already posted. Only new items proceed.

Node 5 — IF: New items?

Stops the workflow if there's nothing new. No wasted API calls.

Node 6 — HTTP Request: Generate social posts with AI

Calls the Claude API with the article title and description. Returns a Twitter post (under 280 chars) and a LinkedIn post (professional tone, hashtags).

Node 7 — HTTP Request: Post to Twitter/X

Posts the tweet via Twitter API v2.

Node 8 — HTTP Request: Post to LinkedIn

Posts the update via LinkedIn UGC Posts API.

Node 9 — Google Sheets: Log posted URL

Appends the URL to your dedup sheet so it's never re-posted.


Full workflow JSON

{
  "name": "RSS to Social Autoposter",
  "nodes": [
    {"parameters":{"rule":{"interval":[{"field":"cronExpression","expression":"*/15 * * * *"}]}},"id":"rss1","name":"Every 15 Minutes","type":"n8n-nodes-base.scheduleTrigger","typeVersion":1.2,"position":[240,300]},
    {"parameters":{"url":"={{ $vars.RSS_FEED_URL }}","options":{}},"id":"rss2","name":"Fetch RSS Feed","type":"n8n-nodes-base.httpRequest","typeVersion":4.2,"position":[460,300]},
    {"parameters":{"jsCode":"const xml = String($input.first().json.data || $input.first().json.body || $input.first().json);\nconst items = [];\nconst re = /<item[\\s\\S]*?<\\/item>/g;\nlet m;\nwhile ((m = re.exec(xml)) !== null) {\n  const b = m[0];\n  const ex = t => { const r = b.match(new RegExp('<' + t + '[^>]*>(?:<!\\\\[CDATA\\\\[)?((?:.|\\n)*?)(?:\\\\]\\\\]>)?<\\/' + t + '>','i')); return r ? r[1].trim() : ''; };\n  items.push({json:{title:ex('title'),link:ex('link'),description:ex('description').slice(0,400)}});\n}\nreturn items.slice(0,5);"},"id":"rss3","name":"Parse RSS Items","type":"n8n-nodes-base.code","typeVersion":2,"position":[680,300]},
    {"parameters":{"operation":"readOrCreate","documentId":{"__rl":true,"value":"={{ $vars.SHEETS_ID }}","mode":"id"},"sheetName":{"__rl":true,"value":"Posted","mode":"name"},"filtersUI":{"values":[{"lookupColumn":"url","lookupValue":"={{ $json.link }}"}]},"options":{}},"id":"rss4","name":"Check Already Posted","type":"n8n-nodes-base.googleSheets","typeVersion":4.4,"position":[900,300]},
    {"parameters":{"conditions":{"conditions":[{"leftValue":"={{ $json.row_number }}","rightValue":0,"operator":{"type":"number","operation":"equals"}}]}},"id":"rss5","name":"Is New?","type":"n8n-nodes-base.if","typeVersion":2.2,"position":[1120,300]},
    {"parameters":{"method":"POST","url":"https://api.anthropic.com/v1/messages","sendHeaders":true,"headerParameters":{"parameters":[{"name":"x-api-key","value":"={{ $vars.ANTHROPIC_API_KEY }}"},{"name":"anthropic-version","value":"2023-06-01"}]},"sendBody":true,"contentType":"json","body":{"model":"claude-haiku-4-5-20251001","max_tokens":300,"messages":[{"role":"user","content":"Write two social posts for this article. Title: {{ $json.title }}. Summary: {{ $json.description }}. Return JSON only: {\"twitter\": \"tweet under 280 chars, 1-2 hashtags\", \"linkedin\": \"professional post under 200 words, 3 hashtags\"}"}]}},"id":"rss6","name":"Generate Social Posts","type":"n8n-nodes-base.httpRequest","typeVersion":4.2,"position":[1340,300]},
    {"parameters":{"method":"POST","url":"https://api.twitter.com/2/tweets","sendHeaders":true,"headerParameters":{"parameters":[{"name":"Authorization","value":"Bearer {{ $vars.TWITTER_BEARER_TOKEN }}"}]},"sendBody":true,"contentType":"json","body":{"text":"={{ JSON.parse($json.content[0].text).twitter }}"}},"id":"rss7","name":"Post to Twitter","type":"n8n-nodes-base.httpRequest","typeVersion":4.2,"position":[1560,200]},
    {"parameters":{"method":"POST","url":"https://api.linkedin.com/v2/ugcPosts","sendHeaders":true,"headerParameters":{"parameters":[{"name":"Authorization","value":"Bearer {{ $vars.LINKEDIN_ACCESS_TOKEN }}"},{"name":"X-Restli-Protocol-Version","value":"2.0.0"}]},"sendBody":true,"contentType":"json","body":{"author":"urn:li:person:={{ $vars.LINKEDIN_PERSON_ID }}","lifecycleState":"PUBLISHED","specificContent":{"com.linkedin.ugc.ShareContent":{"shareCommentary":{"text":"={{ JSON.parse($node['Generate Social Posts'].json.content[0].text).linkedin }}"},"shareMediaCategory":"NONE"}},"visibility":{"com.linkedin.ugc.MemberNetworkVisibility":"PUBLIC"}}},"id":"rss8","name":"Post to LinkedIn","type":"n8n-nodes-base.httpRequest","typeVersion":4.2,"position":[1560,400]},
    {"parameters":{"operation":"append","documentId":{"__rl":true,"value":"={{ $vars.SHEETS_ID }}","mode":"id"},"sheetName":{"__rl":true,"value":"Posted","mode":"name"},"columns":{"mappingMode":"defineBelow","value":{"url":"={{ $node['Parse RSS Items'].json.link }}","title":"={{ $node['Parse RSS Items'].json.title }}","posted_at":"={{ $now.toISO() }}"}}},"id":"rss9","name":"Log Posted URL","type":"n8n-nodes-base.googleSheets","typeVersion":4.4,"position":[1780,300]}
  ],
  "connections": {
    "Every 15 Minutes":{"main":[[{"node":"Fetch RSS Feed","type":"main","index":0}]]},
    "Fetch RSS Feed":{"main":[[{"node":"Parse RSS Items","type":"main","index":0}]]},
    "Parse RSS Items":{"main":[[{"node":"Check Already Posted","type":"main","index":0}]]},
    "Check Already Posted":{"main":[[{"node":"Is New?","type":"main","index":0}]]},
    "Is New?":{"main":[[{"node":"Generate Social Posts","type":"main","index":0}],[]]},
    "Generate Social Posts":{"main":[[{"node":"Post to Twitter","type":"main","index":0},{"node":"Post to LinkedIn","type":"main","index":0}]]},
    "Post to Twitter":{"main":[[{"node":"Log Posted URL","type":"main","index":0}]]},
    "Post to LinkedIn":{"main":[[{"node":"Log Posted URL","type":"main","index":0}]]}
  },
  "settings":{"executionOrder":"v1"},
  "tags":[{"name":"social-media"},{"name":"rss"}]
}
Enter fullscreen mode Exit fullscreen mode

Setup (10 minutes)

  1. Import the JSON into n8n (New Workflow → Import from clipboard)
  2. Set your RSS feed URL — replace $vars.RSS_FEED_URL with your target feed:
    • Hacker News: https://news.ycombinator.com/rss
    • Reddit: https://www.reddit.com/r/n8n/.rss
    • YouTube channel: https://www.youtube.com/feeds/videos.xml?channel_id=CHANNEL_ID
    • Any blog's /feed or /rss.xml path
  3. Create the Google Sheets dedup log — make a spreadsheet with a sheet named "Posted" and columns: url, title, posted_at. Grab the sheet ID from the URL.
  4. Set up API credentials as n8n variables:
    • ANTHROPIC_API_KEY — from console.anthropic.com (Haiku costs ~$0.001 per post)
    • TWITTER_BEARER_TOKEN — from developer.twitter.com
    • LINKEDIN_ACCESS_TOKEN + LINKEDIN_PERSON_ID — from developers.linkedin.com
  5. Activate the workflow — it runs every 15 minutes from now on.

Customizations

Skip AI — use the title directly
Remove the Generate Social Posts node and wire tweet text directly from {{ $json.title }} — {{ $json.link }}. Free, zero API cost, less engaging but fully autonomous.

Add a human review step
Between nodes 5 and 6, insert a Wait node that sends a Telegram message with the proposed tweet and waits for a /yes or /no reply before posting. Full editorial control with zero manual sharing effort.

Use Bluesky instead of Twitter
Bluesky's AT Protocol API at https://bsky.social/xrpc/com.atproto.repo.createRecord is free with no rate limits on posting and a growing audience.

Monitor multiple feeds
Add multiple Fetch RSS Feed nodes before the parser and use a Merge node to combine outputs. Or store feed URLs in Google Sheets and iterate with Split In Batches.

Post to Mastodon
Replace the Twitter node with an HTTP Request to https://mastodon.social/api/v1/statuses. Free instance, no paid API tier required.


What this is actually good for

The real value isn't just "sharing content faster." It's:

  • Always-on presence — your accounts stay active even when you're not. Consistent posting is the #1 factor in algorithm reach.
  • Curation signals expertise — sharing relevant industry content positions you as an expert without writing original posts every day.
  • Zero context-switching — no remembering to share, no copy-pasting links, no tab-switching.
  • Compound reach — one good feed consistently shared builds audience trust over months.

A typical solo creator setup: one tech news feed + one niche blog feed + your own blog's feed. That's 3-10 relevant posts per week going out automatically.


Get the full automation bundle

This workflow is part of our 15-template n8n automation bundle — each one covering a different business use case: email auto-responders, invoice generation, AI customer support, price monitoring, lead capture, webhook logging, and more.

Grab the full bundle at stripeai.gumroad.com — pre-tested, documented, ready to activate.


Built with n8n. Self-hostable, open source, no vendor lock-in.

Top comments (0)