{
  "name": "Automate blog-to-social media with GPT-4 for LinkedIn, X, and Reddit",
  "nodes": [
    {
      "id": "209c18c8-03e4-492b-bc2b-18e345a8cf3a",
      "name": "When clicking ‘Execute workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -1840,
        -112
      ]
    },
    {
      "id": "eabdd51c-8553-43b8-95c8-79506a3fc1fe",
      "name": "HTTP Request",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1312,
        -1696
      ]
    },
    {
      "id": "5b6efe7e-3020-40eb-9770-7de714fdff42",
      "name": "HTML",
      "type": "n8n-nodes-base.html",
      "position": [
        -1040,
        -1696
      ]
    },
    {
      "id": "9c49c24e-53c5-45e3-8ec1-b65f314fa825",
      "name": "Message a model",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        -832,
        -1696
      ]
    },
    {
      "id": "89e1376e-6c91-4861-b09d-b344d2b2cd64",
      "name": "Edit Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        -1328,
        -112
      ]
    },
    {
      "id": "8965425b-8ead-4e04-bd5d-72d128f0d211",
      "name": "Create a post",
      "type": "n8n-nodes-base.linkedIn",
      "position": [
        304,
        -1552
      ]
    },
    {
      "id": "3652ca16-5f46-44be-8527-694a700d94d1",
      "name": "Create Tweet",
      "type": "n8n-nodes-base.twitter",
      "position": [
        400,
        -1984
      ]
    },
    {
      "id": "f21a46f1-9067-42c9-82f7-0aeddea68215",
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        -416,
        -1984
      ]
    },
    {
      "id": "08873440-4a2b-4177-b36c-52af99c346cf",
      "name": "Twitter Post Media",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        128,
        -1984
      ]
    },
    {
      "id": "3145d7f9-650d-4515-86b2-16f656545990",
      "name": "Generate Image for X",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        -128,
        -1984
      ]
    },
    {
      "id": "185d4a5c-2a7b-4d10-ae6f-3ff9ca3fefde",
      "name": "Generate an image for LinkedIn",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        32,
        -1552
      ]
    },
    {
      "id": "e08671a8-5eeb-442c-a6f7-88cd71039fa9",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -1856,
        -784
      ]
    },
    {
      "id": "1f149eb1-9d76-4477-a1fb-e86f7b0bd321",
      "name": "Pass URL",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -1840,
        -1696
      ]
    },
    {
      "id": "247bfa59-5494-4a44-8898-508251d49001",
      "name": "RSS Read",
      "type": "n8n-nodes-base.rssFeedRead",
      "position": [
        -1584,
        -784
      ]
    },
    {
      "id": "de98259a-52ae-4a4d-a473-9dc57710a2ba",
      "name": "Execute a SQL query",
      "type": "n8n-nodes-base.postgres",
      "position": [
        -1312,
        -784
      ]
    },
    {
      "id": "938fb569-7997-4062-a1c4-8e6c469fc984",
      "name": "Set Link",
      "type": "n8n-nodes-base.set",
      "position": [
        -1584,
        -1696
      ]
    },
    {
      "id": "1146c4b9-c9b5-4cae-b812-f4c007b6d655",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        -1056,
        -784
      ]
    },
    {
      "id": "75f2e72f-cc8a-4d03-8aee-1c3f11363a4d",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -752,
        -768
      ]
    },
    {
      "id": "e2e58e44-0984-4a75-a665-f7588aced953",
      "name": "Respond to Webhook",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        1200,
        -1488
      ]
    },
    {
      "id": "74ad5974-64d3-495b-8aaa-b07d3e3223c1",
      "name": "Call Post Social",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -464,
        -768
      ]
    },
    {
      "id": "24734c6e-f4b6-432b-a69f-44cdf547c128",
      "name": "Post Social Manual",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -800,
        -112
      ]
    },
    {
      "id": "39b24f1c-daf8-4b2d-95f6-30cedd83e203",
      "name": "Merge Results For Response",
      "type": "n8n-nodes-base.merge",
      "position": [
        880,
        -1504
      ]
    },
    {
      "id": "6a0a95fb-6467-4bf1-83fc-c05ca8e767e9",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2560,
        -2368
      ],
      "parameters": {
        "width": 544,
        "height": 576,
        "content": "## What this workflow does\n\nThis workflow auto-turns my blog posts into a multi-channel social campaign:\n\n- Source: WordPress RSS feed or a single URL.\n- Dedupes posts via Postgres so each article is "
      }
    },
    {
      "id": "dd6825be-0b61-4c98-85dd-dc3bd483bbc3",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2560,
        -1776
      ],
      "parameters": {
        "width": 544,
        "height": 832,
        "content": "## Prerequisites & Setup\n\nCredentials needed:\n\n- OpenAI – for text + image generation (Message a model, Generate Image for X, Generate an image for LinkedIn).\n- Postgres – for RSS deduplication.\n- Lin"
      }
    },
    {
      "id": "862e2ef0-cc10-4467-b6c4-21c1d37e437d",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2560,
        -912
      ],
      "parameters": {
        "width": 544,
        "height": 1376,
        "content": "## How to run & test\n\nManual test mode:\n\n1. Open the workflow in n8n.\n2. In Edit Fields, set link to a specific blog post URL.\n3. Execute starting from When clicking ‘Execute workflow’.\n4. Confirm:\n  "
      }
    },
    {
      "id": "360b1646-6f1f-412b-b842-2f6ef6ad496b",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1920,
        -368
      ],
      "parameters": {
        "width": null,
        "height": 240,
        "content": "## When clicking ‘Execute workflow’\n**Purpose:** Manual test entry.  \n**Why:** Lets you verify end-to-end without waiting for RSS/schedules.  \n**What to check:** After run, the `Edit Fields` node must"
      }
    },
    {
      "id": "68af055f-e35e-4c2e-bb15-4baf086f9a5c",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1408,
        -368
      ],
      "parameters": {
        "width": null,
        "height": 240,
        "content": "## Edit Fields\n**Purpose:** Inject a test `link` value.  \n**Why:** Guarantees downstream nodes always have a URL during manual tests.  \n**Tip:** Swap the hard-coded URL before each test to avoid re-po"
      }
    },
    {
      "id": "c7587d2c-d108-4b67-ac99-ac8451a83cf5",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -880,
        -368
      ],
      "parameters": {
        "width": null,
        "height": 240,
        "content": "## Post Social Manual (HTTP Request)\n**Purpose:** Calls the internal webhook with the test `link`.  \n**Why:** Reuses the exact same posting path as RSS/webhook to keep logic DRY.  \n**I/O:** Sends `lin"
      }
    },
    {
      "id": "69aa7b45-6ba9-4524-9778-8ec36399965d",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1936,
        -1984
      ],
      "parameters": {
        "width": 256,
        "height": 272,
        "content": "## Pass URL (Webhook)\n**Purpose:** External + internal entry point to post a single article.  \n**Why:** Decouples ingestion from posting so other tools/workflows can trigger it.  \n**I/O:** Expects bod"
      }
    },
    {
      "id": "b6e59725-df96-48d6-be7c-d3403da0ec00",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1664,
        -1984
      ],
      "parameters": {
        "width": 256,
        "height": 272,
        "content": "## Set Link\n**Purpose:** Normalize incoming data to a `link` field.  \n**Why:** Ensures downstream nodes reference one consistent property.  \n**Tip:** If you change the param name in callers, update th"
      }
    },
    {
      "id": "33bc41fd-0c61-421b-897c-de0b8b5f12b4",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1392,
        -1984
      ],
      "parameters": {
        "width": 256,
        "height": 272,
        "content": "\n## HTTP Request\n**Purpose:** Fetch the article HTML from `{{$json.link}}`.  \n**Why:** Reliable source content beats scraping fragments from RSS.  \n**Failure tips:** 4xx/5xx? Check URL, robots, or add"
      }
    },
    {
      "id": "23e156b7-26b8-4355-8a0a-6c99c0f77060",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1120,
        -1984
      ],
      "parameters": {
        "width": 256,
        "height": 272,
        "content": "## HTML\n**Purpose:** Extract clean text (`content`) from `<body>`.  \n**Why:** LLMs perform better on de-noised, trimmed input.  \n**Tip:** Adjust selector or cleanup if your site uses heavy wrappers."
      }
    },
    {
      "id": "95086bbd-7ba0-4ff9-98a7-0a8e184bae06",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -848,
        -1984
      ],
      "parameters": {
        "width": 256,
        "height": 272,
        "content": "\n## Message a model\n**Purpose:** Turn article into platform-specific posts + image prompts (JSON).  \n**Why:** Single LLM call keeps speed + consistency across channels.  \n**Guardrails:** Enforce JSON "
      }
    },
    {
      "id": "9854689b-e234-4cae-a26b-1b42ecb7b8c6",
      "name": "Sticky Note12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -496,
        -2208
      ],
      "parameters": {
        "width": 256,
        "height": 208,
        "content": "## Wait\n**Purpose:** Small delay before image/Twitter media steps.  \n**Why:** Helps avoid rate bursts and sequencing issues.  \n**Tip:** Reduce if your account limits are generous."
      }
    },
    {
      "id": "d08c875f-e430-4574-8922-e49e372a7d1c",
      "name": "Sticky Note13",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -224,
        -2208
      ],
      "parameters": {
        "width": 256,
        "height": 208,
        "content": "## Generate Image for X\n**Purpose:** Create X/Twitter image from the model’s `image_prompt`.  \n**Why:** Visuals lift engagement and CTR on social feeds.  \n**Output:** Binary `data` used by `Twitter Po"
      }
    },
    {
      "id": "4bf152bc-7792-4f1a-80d2-8715c2637d2c",
      "name": "Sticky Note14",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        48,
        -2208
      ],
      "parameters": {
        "width": 256,
        "height": 208,
        "content": "## Twitter Post Media\n**Purpose:** Upload the generated image to X; returns `media_id`.  \n**Why:** X requires a media upload step before tweeting.  \n**Failure tips:** Ensure OAuth1 is configured and f"
      }
    },
    {
      "id": "aca76211-2eff-4602-b2d8-e38dcdd94038",
      "name": "Sticky Note15",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        320,
        -2192
      ],
      "parameters": {
        "width": 256,
        "height": 192,
        "content": "## Create Tweet\n**Purpose:** Publish the tweet with text + `media_id`.  \n**Why:** Completes the X workflow with visual content.  \n**Tip:** If attachments fail, inspect the previous node’s full respons"
      }
    },
    {
      "id": "51f13938-6034-48ec-915d-96988a68ce2a",
      "name": "Sticky Note16",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -320,
        -1792
      ],
      "parameters": {
        "width": 256,
        "height": 208,
        "content": "## Wait 5s\n**Purpose:** Small delay before LinkedIn image generation.  \n**Why:** Staggers API calls to reduce throttling.  \n**Note:** Tune based on your OpenAI + LinkedIn rate limits."
      }
    },
    {
      "id": "28821e4b-e01a-4023-8eb6-57d8de30823a",
      "name": "Sticky Note17",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -48,
        -1792
      ],
      "parameters": {
        "width": 256,
        "height": 208,
        "content": "## Generate an image for LinkedIn\n**Purpose:** Create LinkedIn thumbnail from its `image_prompt`.  \n**Why:** Rich preview increases dwell time and clicks.  \n**Output:** Binary `data` consumed by Linke"
      }
    },
    {
      "id": "5d029e3c-0d0e-4333-b970-99f959549e8f",
      "name": "Sticky Note18",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        224,
        -1792
      ],
      "parameters": {
        "width": 256,
        "height": 208,
        "content": "## Create a post (LinkedIn)\n**Purpose:** Publish LinkedIn post with text, title, description, link, and thumbnail.  \n**Why:** Drives professional audience back to the article.  \n**Tip:** Verify `perso"
      }
    },
    {
      "id": "d54d2496-4cb5-45fb-8a65-62b6793468ac",
      "name": "Post Reddit",
      "type": "n8n-nodes-base.reddit",
      "position": [
        -48,
        -1088
      ]
    },
    {
      "id": "f8b8f5b1-d641-4c7b-bcd8-c08641d33c9b",
      "name": "Sticky Note19",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -128,
        -1328
      ],
      "parameters": {
        "width": 256,
        "height": 208,
        "content": "\n## Post Reddit (Reddit)\n**Purpose:** Submit the Reddit text post (user profile via `u_leeseifer`).  \n**Why:** Tap into communities for discussion-driven reach.  \n**Tip:** If posting to a subreddit la"
      }
    },
    {
      "id": "737d66f4-1c6f-4613-b325-3e2580d71aca",
      "name": "Sticky Note20",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        800,
        -1744
      ],
      "parameters": {
        "width": 272,
        "height": 208,
        "content": "\n## Merge Results For Response\n**Purpose:** Consolidate results from X, LinkedIn, and Reddit.  \n**Why:** Single combined payload simplifies logging + responses.  \n**Tip:** If something is missing here"
      }
    },
    {
      "id": "b2f3f28a-b2c6-4af1-9aeb-1b63e91e855b",
      "name": "Sticky Note21",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1104,
        -1744
      ],
      "parameters": {
        "width": 272,
        "height": 208,
        "content": "## Respond to Webhook\n**Purpose:** Return merged results to the original webhook caller.  \n**Why:** Provides a consistent, machine-readable completion summary.  \n**Tip:** Great place to capture for mo"
      }
    },
    {
      "id": "bce61052-fe36-484a-903c-f4d2815f5776",
      "name": "Wait 5s",
      "type": "n8n-nodes-base.wait",
      "position": [
        -240,
        -1552
      ]
    },
    {
      "id": "6b087fab-389d-4209-bdc5-859faea5714e",
      "name": "Sticky Note22",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1936,
        -1088
      ],
      "parameters": {
        "width": 256,
        "height": 272,
        "content": "## Pass URL (Webhook)\n**Purpose:** External + internal entry point to post a single article.  \n**Why:** Decouples ingestion from posting so other tools/workflows can trigger it.  \n**I/O:** Expects bod"
      }
    },
    {
      "id": "bd99d72c-f54d-4c44-93f2-2e7bb0ffa368",
      "name": "Sticky Note23",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1664,
        -1088
      ],
      "parameters": {
        "width": 256,
        "height": 272,
        "content": "## RSS Read\n**Purpose:** Pull recent items from your blog feed.  \n**Why:** Standard, low-friction way to detect new articles.  \n**Output:** Items with `guid`, `title`, `link`, `pubDate` for dedupe."
      }
    },
    {
      "id": "d1ac97a2-0f57-4fa8-9628-de66dff6bc70",
      "name": "Sticky Note24",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1392,
        -1088
      ],
      "parameters": {
        "width": 256,
        "height": 272,
        "content": "## Execute a SQL query (Postgres)\n**Purpose:** Insert new RSS items and return `link` for only the new ones.  \n**Why:** `ON CONFLICT (guid) DO NOTHING` guarantees one-time posting.  \n**Schema:** `guid"
      }
    },
    {
      "id": "18fc8e47-c007-405f-9335-8071b306958d",
      "name": "Sticky Note25",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1120,
        -1088
      ],
      "parameters": {
        "width": 256,
        "height": 272,
        "content": "## If\n**Purpose:** Route only items where the SQL `RETURNING link` indicates “new”.  \n**Why:** Prevents duplicates from reaching the posting branch.  \n**Tip:** If all items skip, check table keys and "
      }
    },
    {
      "id": "7369c424-da03-47d6-8461-5a4f599c73a8",
      "name": "Sticky Note26",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -848,
        -1088
      ],
      "parameters": {
        "width": 288,
        "height": 272,
        "content": "## Loop Over Items (Split In Batches)\n**Purpose:** Process new items in manageable batches.  \n**Why:** Controls throughput and avoids API spikes.  \n**Tip:** Adjust batch size/interval for your posting"
      }
    },
    {
      "id": "f57b4a17-7014-43e6-b2f7-7ddd1270f42a",
      "name": "Sticky Note27",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -544,
        -1088
      ],
      "parameters": {
        "width": 256,
        "height": 272,
        "content": "## Call Post Social (HTTP Request)\n**Purpose:** For each new RSS item, invoke the same webhook posting path.  \n**Why:** Reuse logic; keep RSS and manual/webhook paths identical.  \n**I/O:** Sends `link"
      }
    }
  ],
  "connections": {
    "If": {
      "main": [
        [],
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTML": {
      "main": [
        [
          {
            "node": "Message a model",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait": {
      "main": [
        [
          {
            "node": "Generate Image for X",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 5s": {
      "main": [
        [
          {
            "node": "Generate an image for LinkedIn",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Pass URL": {
      "main": [
        [
          {
            "node": "Set Link",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "RSS Read": {
      "main": [
        [
          {
            "node": "Execute a SQL query",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Link": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Post Social Manual",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Post Reddit": {
      "main": [
        [
          {
            "node": "Merge Results For Response",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "Create Tweet": {
      "main": [
        [
          {
            "node": "Merge Results For Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request": {
      "main": [
        [
          {
            "node": "HTML",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create a post": {
      "main": [
        [
          {
            "node": "Merge Results For Response",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Call Post Social",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Message a model": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          },
          {
            "node": "Wait 5s",
            "type": "main",
            "index": 0
          },
          {
            "node": "Post Reddit",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Call Post Social": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "RSS Read",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Twitter Post Media": {
      "main": [
        [
          {
            "node": "Create Tweet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Execute a SQL query": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Image for X": {
      "main": [
        [
          {
            "node": "Twitter Post Media",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Results For Response": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate an image for LinkedIn": {
      "main": [
        [
          {
            "node": "Create a post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}