Blog post → social media drafts
When you publish a blog post, AI drafts LinkedIn and X posts for you to approve.
How it works
- Detect the new blog post from your RSS feed.
- Ask an AI model for one LinkedIn post and one X post in your tone.
- Save both drafts to a Notion "Content queue" database for approval.
Diagram
Code
JavaScript used in the Code step — already included in the template below.
// Mode: Run Once for Each Item
// The AI was asked for JSON like {"linkedin": "...", "x": "..."}.
const match = $json.text.match(/\{[\s\S]*\}/);
const posts = match ? JSON.parse(match[0]) : { linkedin: $json.text, x: "" };
const post = $("New blog post").item.json;
return {
json: {
title: post.title,
link: post.link,
linkedin: posts.linkedin,
x: posts.x,
},
};Build it
Pick your tool — same automation, step by step.
Copy and paste straight into an n8n canvas (Ctrl+V), or download and use Import from File. Then connect your own credentials and replace every YOUR_… placeholder. AI steps use a Claude model node — swap it for OpenAI, Gemini or Ollama if you prefer.
Show code (181 lines)
{
"name": "Blog post → social media drafts (Flowngn)",
"nodes": [
{
"parameters": {
"content": "## Blog post → social media drafts\nWhen you publish a blog post, AI drafts LinkedIn and X posts for you to approve.\n\n**Setup**\n1. Open each node and connect your own credentials.\n2. Replace every YOUR_… placeholder.\n3. Test once, then activate.\n\nFree template from Flowngn",
"height": 260,
"width": 340
},
"id": "2de5ad18-fc4b-47f3-a666-ffe96294bcaa",
"name": "Setup notes",
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
-420,
-60
]
},
{
"parameters": {
"pollTimes": {
"item": [
{
"mode": "everyHour"
}
]
},
"feedUrl": "https://YOUR_BLOG/feed.xml"
},
"id": "2de5ad18-fc4b-47f3-a666-ffe96294bcaa",
"name": "New blog post",
"type": "n8n-nodes-base.rssFeedReadTrigger",
"typeVersion": 1,
"position": [
0,
0
]
},
{
"parameters": {
"promptType": "define",
"text": "=Write social posts promoting this blog post in a friendly, expert tone.\n\nTitle: {{ $json.title }}\nLink: {{ $json.link }}\nSummary: {{ $json.contentSnippet }}\n\nReply ONLY with JSON: {\"linkedin\": \"<post under 1200 chars>\", \"x\": \"<post under 270 chars incl. link>\"}"
},
"id": "2de5ad18-fc4b-47f3-a666-ffe96294bcaa",
"name": "Draft social posts",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"typeVersion": 1.5,
"position": [
300,
0
]
},
{
"parameters": {
"model": {
"__rl": true,
"value": "claude-sonnet-5",
"mode": "list"
},
"options": {}
},
"id": "2de5ad18-fc4b-47f3-a666-ffe96294bcaa",
"name": "Claude model",
"type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
"typeVersion": 1.3,
"position": [
300,
220
]
},
{
"parameters": {
"jsCode": "// Mode: Run Once for Each Item\n// The AI was asked for JSON like {\"linkedin\": \"...\", \"x\": \"...\"}.\nconst match = $json.text.match(/\\{[\\s\\S]*\\}/);\nconst posts = match ? JSON.parse(match[0]) : { linkedin: $json.text, x: \"\" };\nconst post = $(\"New blog post\").item.json;\n\nreturn {\n json: {\n title: post.title,\n link: post.link,\n linkedin: posts.linkedin,\n x: posts.x,\n },\n};",
"mode": "runOnceForEachItem"
},
"id": "2de5ad18-fc4b-47f3-a666-ffe96294bcaa",
"name": "Read drafts",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
600,
0
]
},
{
"parameters": {
"resource": "databasePage",
"operation": "create",
"databaseId": {
"__rl": true,
"value": "YOUR_CONTENT_DATABASE_ID",
"mode": "id"
},
"title": "={{ $json.title }}",
"propertiesUi": {
"propertyValues": [
{
"key": "LinkedIn|rich_text",
"textContent": "={{ $json.linkedin }}"
},
{
"key": "X|rich_text",
"textContent": "={{ $json.x }}"
},
{
"key": "Link|url",
"urlValue": "={{ $json.link }}"
},
{
"key": "Status|select",
"selectValue": "Needs review"
}
]
},
"options": {}
},
"id": "2de5ad18-fc4b-47f3-a666-ffe96294bcaa",
"name": "Save to content queue",
"type": "n8n-nodes-base.notion",
"typeVersion": 2.2,
"position": [
900,
0
]
}
],
"connections": {
"New blog post": {
"main": [
[
{
"node": "Draft social posts",
"type": "main",
"index": 0
}
]
]
},
"Draft social posts": {
"main": [
[
{
"node": "Read drafts",
"type": "main",
"index": 0
}
]
]
},
"Read drafts": {
"main": [
[
{
"node": "Save to content queue",
"type": "main",
"index": 0
}
]
]
},
"Claude model": {
"ai_languageModel": [
[
{
"node": "Draft social posts",
"type": "ai_languageModel",
"index": 0
}
]
]
}
},
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"meta": {
"templateCredsSetupCompleted": false
},
"tags": []
}In Make, create a new scenario and add these modules in order:
- RSS › Watch RSS Feed Items
- Anthropic Claude › Create a Prompt (or OpenAI › Create a Completion)
- Tools › Set variable / Iterator + Array aggregator (same logic as the Code step)
- Notion › Create a Database Item
- Every module run uses Make operations — the free plan includes a monthly quota.
- Make's built-in functions (map, sum, formatDate…) can replace most Code steps; for complex logic use a code module.
- Module and step names can differ slightly as Make and Zapier update their apps.
In Zapier, create a new Zap and add these steps in order:
- RSS by Zapier — New Item in Feed
- Anthropic (Claude) — Send Message (or ChatGPT — Conversation)
- Code by Zapier — Run JavaScript (paste the code from the Code section)
- Notion — Create Database Item
- Zaps with more than two steps need a paid Zapier plan.
- Webhooks, Filters/Paths and Code by Zapier are premium features on some Zapier plans.
- Code by Zapier runs JavaScript: reuse the code shown above, reading inputs from inputData instead of $json.
- Module and step names can differ slightly as Make and Zapier update their apps.
Tips
- Keep a human approval step — it keeps your voice and avoids mistakes.
Related flows
YouTube video → blog post + social posts
Every new video becomes a blog draft, a LinkedIn post and an X post — saved to Notion for review.
A week of content ideas from your industry's news
Every Sunday, AI reads the week's industry news and posts 7 content ideas to your Slack channel.
New blog post to a newsletter draft with AI
When you publish a blog post, AI writes a short newsletter about it and saves it to your Gmail drafts.