Blog post → social media drafts

When you publish a blog post, AI drafts LinkedIn and X posts for you to approve.

Medium Saves ~6 hours/month Content & SocialBy Flowngn team

Works with n8n · Make · Zapier

How it works

Trigger: RSS — new item in your blog feed
  1. Detect the new blog post from your RSS feed.
  2. Ask an AI model for one LinkedIn post and one X post in your tone.
  3. Save both drafts to a Notion "Content queue" database for approval.

Diagram

RNew blog postRSS Feed TriggerDraft social postsBasic LLM ChainClaude modelAnthropic Chat Mo…{ }Read draftsCodeNSave to content que…Notion
Trigger App Code AI

Code

JavaScript used in the Code step — already included in the template below.

Read drafts · Code node
// 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.

Workflow JSON
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": []
}

Open in the playground to edit →

Tips

  • Keep a human approval step — it keeps your voice and avoids mistakes.

Related flows