{
  "name": "RSS: turn a new blog article into a Social Poster draft, optionally scheduled",
  "nodes": [
    {
      "id": "f4e964c3-3d4e-504d-905b-747d7a7f2be5",
      "name": "Overview",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -300,
        -40
      ],
      "parameters": {
        "content": "### How it works\nThe RSS trigger polls your feed and starts only when a new item appears. “Set post fields” builds the caption from the title and summary, strips HTML, cuts it to 2,000 characters and keeps the article link. “Create the draft” saves the post as a draft in Social Poster. n8n remembers items it has seen; after a fresh setup an item can arrive again.\n\n### Draft or scheduled\nThe default is `mode` = `draft`: the workflow only creates a draft and schedules or publishes nothing. The link to view it is in the output of “Create the draft” under `draft.app_draft_url`. To schedule posts, set `mode` to `schedule`. “Schedule the draft” then schedules it `minutesFromNow` minutes later (at least 5) and confirms it. If your team requires approval, it waits under “Waiting for you”. There is no immediate publishing.\n\n### Setup\nThis template uses the unverified community node `n8n-nodes-social-poster` (tested with version 0.1.1). It runs on self-hosted n8n only, not on n8n Cloud. Install it under Settings → Community Nodes → Install. Guide: https://docs.n8n.io/integrations/community-nodes/installation/\nCreate “Social Poster API” credentials. You get the key in Social Poster under the account menu → AI access → API key for n8n. The base URL is `https://app.social-poster.io` without `/mcp`.\nSet your feed URL on the RSS trigger. Enter your account reference (`acc_…`) in “Set post fields”. Select the credentials on “Create the draft” and “Schedule the draft”, then test with one item before you activate the workflow.\n\n### Customization\nYou can shorten the caption, add hashtags or put a public image URL into `mediaUrls`.",
        "height": 820,
        "width": 660,
        "color": 1
      }
    },
    {
      "id": "7a9beb58-e32e-53d0-b292-3ed2c5024e04",
      "name": "RSS trigger",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        440,
        80
      ],
      "parameters": {
        "content": "## New article\nStarts only for a new feed item. Set the feed URL and the polling interval here.",
        "height": 260,
        "width": 240,
        "color": 7
      }
    },
    {
      "id": "7ae21cc1-a7ee-58a7-bcc9-625092595118",
      "name": "Prepare the post",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        720,
        80
      ],
      "parameters": {
        "content": "## Build the post\nAccount reference, `mode` (default `draft`) and `minutesFromNow` live here. Title, text and link come from the feed.",
        "height": 260,
        "width": 520,
        "color": 7
      }
    },
    {
      "id": "10c400a8-b4e2-5ad5-a0a1-11c69d6d54ae",
      "name": "Draft or scheduled",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        1280,
        80
      ],
      "parameters": {
        "content": "## Draft, optionally scheduled\n“Create the draft” always saves a draft. Only with `mode` = `schedule` does “Schedule the draft” schedule it and confirm publishing.",
        "height": 260,
        "width": 560,
        "color": 7
      }
    },
    {
      "id": "65975cad-6dbd-5526-bef2-43fa23cf48a2",
      "name": "Note about X",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        1280,
        620
      ],
      "parameters": {
        "content": "Review X (Twitter) posts yourself. Leave “X Content Reviewed” off in “Schedule the draft” until a person has checked the exact text and media.",
        "height": 150,
        "width": 560,
        "color": 3
      }
    },
    {
      "id": "5e30bedd-c28f-4bb7-bf82-fe43526d8730",
      "name": "New RSS item",
      "type": "n8n-nodes-base.rssFeedReadTrigger",
      "typeVersion": 1,
      "position": [
        520,
        400
      ],
      "parameters": {
        "feedUrl": "https://example.com/feed",
        "pollTimes": {
          "item": [
            {
              "mode": "everyHour",
              "minute": 5
            }
          ]
        }
      }
    },
    {
      "id": "78404396-f493-4825-a67e-7babf63e34f2",
      "name": "Set post fields",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        800,
        400
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "bcdbcfae-c867-4a23-9e4f-6c501142ca56",
              "name": "accountRef",
              "type": "string",
              "value": "acc_YOUR_ACCOUNT_REF"
            },
            {
              "id": "1f9c99e8-e015-5aa2-a7cd-b6b99b28d399",
              "name": "mode",
              "type": "string",
              "value": "draft"
            },
            {
              "id": "c8684ba6-0d5c-4d80-bc00-74e4ed7f4f8d",
              "name": "minutesFromNow",
              "type": "number",
              "value": 15
            },
            {
              "id": "1a9560c4-2e5c-403d-9fc0-5e7224061348",
              "name": "title",
              "type": "string",
              "value": "={{ $json.title }}"
            },
            {
              "id": "a43d2679-f847-4b81-bd28-d65f9ab1bcf6",
              "name": "link",
              "type": "string",
              "value": "={{ $json.link }}"
            },
            {
              "id": "f28419da-4153-4caf-a85f-199442317307",
              "name": "mediaUrls",
              "type": "string",
              "value": ""
            },
            {
              "id": "f162172c-feb1-4e34-ae9f-b438caefeae9",
              "name": "caption",
              "type": "string",
              "value": "={{ ([$json.title, $json.contentSnippet || $json.content].filter(Boolean).join('\\n\\n')).replace(/<[^>]+>/g, ' ').replace(/\\s+/g, ' ').trim().slice(0, 2000) }}"
            }
          ]
        }
      }
    },
    {
      "id": "8484a914-7954-5b31-8cdb-9e6948c09bf5",
      "name": "Create the draft",
      "type": "n8n-nodes-social-poster.socialPoster",
      "typeVersion": 1,
      "position": [
        1080,
        400
      ],
      "parameters": {
        "resource": "draft",
        "operation": "create",
        "workspace": "",
        "account": "={{ $json.accountRef }}",
        "caption": "={{ $json.caption }}",
        "additionalFields": {
          "link": "={{ $json.link }}",
          "mediaUrls": "={{ $json.mediaUrls }}",
          "title": "={{ $json.title }}"
        }
      }
    },
    {
      "id": "9e5bd14d-7d9a-551a-a7d5-fc22973434a4",
      "name": "Should it be scheduled?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        1360,
        400
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": false,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "e84af664-1cd9-552e-aebd-436945ab3462",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ String($('Set post fields').item.json.mode || \"\").trim().toLowerCase() }}",
              "rightValue": "schedule"
            }
          ]
        }
      }
    },
    {
      "id": "fdf941db-ef48-5851-b9a0-136aee042c35",
      "name": "Schedule the draft",
      "type": "n8n-nodes-social-poster.socialPoster",
      "typeVersion": 1,
      "position": [
        1640,
        300
      ],
      "parameters": {
        "resource": "post",
        "operation": "scheduleDraft",
        "workspace": "",
        "draftRef": "={{ $('Create the draft').item.json.draft.draft_ref }}",
        "scheduleMode": "minutes",
        "minutesFromNow": "={{ $('Set post fields').item.json.minutesFromNow }}",
        "xContentReviewed": false
      }
    }
  ],
  "pinData": {},
  "connections": {
    "New RSS item": {
      "main": [
        [
          {
            "node": "Set post fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set post fields": {
      "main": [
        [
          {
            "node": "Create the draft",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create the draft": {
      "main": [
        [
          {
            "node": "Should it be scheduled?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Should it be scheduled?": {
      "main": [
        [
          {
            "node": "Schedule the draft",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1",
    "availableInMCP": false
  },
  "meta": {
    "templateCredsSetupCompleted": false
  },
  "tags": []
}
