Turn One Blog Post into 10 Social Posts with n8n + AI
The Repurposing Problem
You publish a 1,500-word article, share the link once on LinkedIn, and then it disappears into the archive. Meanwhile, the same ideas — broken into a hook-driven thread, a punchy carousel caption, or a brief X post — could drive traffic for an entire week. The bottleneck isn't ideas; it's the manual labour of rewriting the same content four or five different ways for four or five different audiences.
A well-built n8n workflow collapses that gap. You drop in a URL, the workflow fetches the post, an AI node rewrites it in three distinct platform voices, and optional scheduling nodes queue each piece for the right time. This guide walks through exactly how to build it.
What the Finished Workflow Does
- Accepts a blog post URL (manually, via webhook, or on a schedule).
- Fetches and strips the article body down to clean text.
- Sends the text to an AI/LLM node with three separate prompts — one per platform.
- Outputs a structured JSON object with
linkedin,twitter, andinstagramfields. - Optionally writes the drafts to a Google Sheet, sends them to a Slack channel, or calls a scheduling API.
Total nodes: roughly 8–10. Build time: under 30 minutes if you follow these steps.
Step-by-Step Build
Step 1 — Trigger: How the workflow receives a URL
For an always-on pipeline, use a Webhook node. Set the HTTP method to POST and note the generated URL — you'll call it from your CMS or a browser bookmarklet.
For a batch run over existing posts, a Schedule Trigger node + a Google Sheets node (reading a column of URLs) works cleanly.
For ad-hoc testing, start with Manual Trigger and hardcode the URL in a Set node:
{
"url": "https://yourblog.com/posts/your-article-slug"
}
Step 2 — Fetch the page: HTTP Request node
Add an HTTP Request node:
- Method: GET
- URL:
{{ $json.url }} - Response Format: Text
The response body will contain full HTML. You do not need to clean it yet — the AI prompt will handle noise, but it helps to strip obvious boilerplate.
Step 3 — Strip HTML to plain text: Code node
Add a Code node (JavaScript) to remove tags and collapse whitespace:
const html = $input.first().json.data;
const text = html
.replace(/<script[\s\S]*?<\/script>/gi, '')
.replace(/<style[\s\S]*?<\/style>/gi, '')
.replace(/<[^>]+>/g, ' ')
.replace(/\s{2,}/g, ' ')
.trim();
// Cap at ~3000 chars to stay within token budget
return [{ json: { bodyText: text.slice(0, 3000) } }];
Step 4 — Generate all three platform drafts: AI/LLM node
This is the core step. Add an AI/LLM (or OpenAI Chat Model) node. In the system prompt, instruct the model to return structured JSON so you can parse each platform's copy cleanly downstream:
System prompt:
You are a social media copywriter. Given a blog post body, produce platform-native copy for three channels.
Return ONLY valid JSON with these keys:
- "linkedin": a 150-200 word professional post. Lead with a bold insight. End with a question or CTA.
- "twitter": a thread of 4 tweets. Each tweet is under 280 characters. Array of strings.
- "instagram": a 80-120 word caption. Punchy first line. 5 relevant hashtags at the end.
No markdown formatting inside the JSON values. No code blocks. Just the raw JSON object.
User message:
{{ $json.bodyText }}
Set temperature to around 0.7 for creative variation. Model choice is up to you — GPT-4o-mini is fast and cheap for drafts; a larger model is worth it for high-stakes posts.
Step 5 — Parse the JSON response: Code node
The AI node returns a string. Parse it:
const raw = $input.first().json.message.content;
const parsed = JSON.parse(raw);
return [{ json: parsed }];
If parsing fails (the model occasionally wraps the JSON in a code fence), add a quick strip:
const clean = raw.replace(/^```json\n?/, '').replace(/\n?```$/, '');
Step 6 — Route to destinations: IF or Switch node
From the parsed object, you can fan out via IF or Switch to:
- Google Sheets — write each platform's copy to its own column for review before publishing.
- Slack — post all three drafts to a
#content-draftschannel where your team can approve them. - Buffer / Hootsuite API — schedule them directly via HTTP Request nodes pointed at those APIs.
- Notion — create a database entry per post with all three variants as properties.
For most solo operators, the Google Sheets route is the least brittle starting point. Add a column called approved and only push rows where that column is TRUE to the scheduling API.
Step 7 — (Optional) Add variation loops
If you want multiple drafts per platform so you can A/B test, wrap the AI node in a Loop Over Items node and run it 2–3 times with a slightly different temperature or a different prompt variant each pass. Because the AI credits are a flat part of your subscription on AgentRoost, running the same content through the model three times costs you nothing extra beyond what you already pay.
Pitfalls to Avoid
- JSON parsing errors: Always wrap
JSON.parsein a try/catch and log the raw response. If the model goes off-format, a broken parse will silently fail the run. - Token limits on long posts: The 3,000-character cap in Step 3 is a safety net. For very long articles, summarise first using a second AI node before the platform-copy node.
- LinkedIn formatting: LinkedIn does not render markdown. Instruct the model to use plain line breaks, not
**bold**or##headings. - Rate limits on scheduling APIs: If you batch-process a backlog of 50 posts, add a Wait node (e.g., 2-second delay) between scheduling API calls.
How to Run This on AgentRoost
Every AgentRoost subscription gives you your own n8n instance — your login, your workflows, your data — running 24/7 on a public subdomain (https://<your-id>.agentroost.app). You own it. You're not renting time on a shared editor.
The differentiator that matters for this specific workflow: AI credits are included. The AI/LLM node ships pre-wired to your included credit balance. You do not set up an OpenAI account, generate an API key, or worry about a per-token bill climbing every time you regenerate a caption. You pick a model from 350+ options, set your prompt, and run.
Getting started:
- Go to agentroost.app and sign up with email, Google, Microsoft, or Discord.
- Pick the n8n framework, name your instance.
- Your private n8n editor opens at
https://<your-id>.agentroost.app. - Import or build the workflow above. The AI node already has credits — no API key step.
- Drop in a blog URL and run. Your LinkedIn, X, and Instagram drafts appear in the output panel.
Plans start at $19.99/mo all-in — roughly the cost of a shared hosting plan, but with compute, a working n8n instance, and AI credits bundled. 14-day money-back guarantee, monthly billing, cancel anytime.
Compare plans and see what's included
What a Week of Content Looks Like
Run this workflow once per published post. From a single 1,200-word article you get:
| Day | Platform | Format |
|---|---|---|
| Mon | Long-form insight post | |
| Tue | X | 4-tweet thread |
| Wed | Caption + hashtags | |
| Thu | Follow-up question post (second AI draft) | |
| Fri | X | Single-tweet pull quote |
Five pieces of original-feeling content. One source. One workflow run. The variation comes from prompt engineering, not from writing five versions by hand.
Frequently asked questions
Do I need an OpenAI API key to use the AI node in n8n on AgentRoost?
No. On AgentRoost, AI/LLM credits are included in your subscription. The AI node is pre-wired to your credit balance — you choose a model and run. There is no separate OpenAI account or API key required.
Which AI model should I use for social copy generation?
For fast, cost-light drafts, a smaller model like GPT-4o-mini or a comparable option works well. For a flagship brand post where quality matters more than speed, a larger model is worth the extra processing time. On AgentRoost you can switch between 350+ models from the same node without touching credentials.
Can I export my n8n workflows if I cancel?
Yes. n8n's native export (File → Download) produces a JSON file of your workflow. Your instance is single-tenant — your data and workflows belong to you. You can download them at any time and import them into any other n8n installation.
What's included in the price and how does billing work?
Plans start at $19.99/mo, billed monthly. Your subscription includes compute, your own n8n instance, and AI credits — everything needed to run this workflow without sourcing separate API keys. There is a 14-day money-back guarantee so you can test the full stack risk-free. Higher tiers add more compute and more included AI credits.
Can this workflow post directly to social media, or just draft?
n8n has community nodes and HTTP Request nodes that can call the APIs of platforms that offer posting endpoints (e.g., LinkedIn API, X API v2). However, most platforms require a developer app and OAuth token on your side. A practical middle step is writing drafts to a Google Sheet or Slack channel for approval, then using a scheduling tool's API to queue approved posts.