{
  "name": "Create LinkedIn carousel post from blog post",
  "nodes": [
    {
      "parameters": {},
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        -240,
        112
      ],
      "id": "905cdfa8-0d33-44c4-9f75-90e438207355",
      "name": "When clicking ‘Execute workflow’"
    },
    {
      "parameters": {
        "url": "https://getposta.app/feed.xml",
        "options": {}
      },
      "type": "n8n-nodes-base.rssFeedRead",
      "typeVersion": 1.2,
      "position": [
        64,
        16
      ],
      "id": "db75812c-7715-44ff-adec-97e5b889358f",
      "name": "RSS Read",
      "notes": "Add the link to the RSS feed"
    },
    {
      "parameters": {
        "content": "Add the link to the RSS feed, in this example we use the blog feed from getposta.app (https://getposta.app/feed.xml)",
        "height": 352,
        "width": 160
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        32,
        -192
      ],
      "id": "7fde9dfa-159b-453e-8e62-8afcf724e2b3",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "socialAccountIds": "35",
        "caption": "={{ $('Parse slides JSON').item.json.caption }}{{ $('Latest post').item.json.link }}",
        "additionalFields": {
          "hashtags": "={{ $('Parse slides JSON').item.json.tags }}",
          "mediaIds": "={{ $json.media_id }}"
        },
        "platformConfigurations": {
          "linkedin": {
            "documentTitle": "={{ $json.title }}"
          }
        }
      },
      "type": "n8n-nodes-posta.posta",
      "typeVersion": 1,
      "position": [
        3264,
        -96
      ],
      "id": "ae315a5d-b1c9-415b-b38b-5897bbf1b6df",
      "name": "Create a post",
      "credentials": {
        "postaApi": {
          "name": "Posta account"
        }
      }
    },
    {
      "parameters": {
        "resource": "socialAccount"
      },
      "type": "n8n-nodes-posta.posta",
      "typeVersion": 1,
      "position": [
        304,
        256
      ],
      "id": "d92a5744-c0e1-4619-b336-c407bb27a7f1",
      "name": "Get many social accounts",
      "credentials": {
        "postaApi": {
          "name": "Posta account"
        }
      }
    },
    {
      "parameters": {
        "content": "You need to tell the workflow where to post - call this to get a list of connected social accounts. You need to take the id value and feed into the next step. IDs are preserved in Posta until you delete the connected account. To sign-up and connect social accounts, visit https://www.getposta.app (14 days free, no credit card required)",
        "height": 240,
        "color": 3
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        240,
        448
      ],
      "id": "6898e38d-92d5-4acc-a146-d7d702051283",
      "name": "Sticky Note1"
    },
    {
      "parameters": {
        "content": "You need a token to use the Posta functions. Get one at https://www.getposta.app (14 days free, no credit card required)",
        "height": 128,
        "color": 3
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -368,
        -64
      ],
      "id": "7bc18f20-0b43-444e-93e1-6be6b55a7f4e",
      "name": "Sticky Note2"
    },
    {
      "parameters": {
        "content": "## Blog post → LinkedIn carousel\n\n**Who it's for:** creators who want high-engagement LinkedIn carousels from their articles without designing slides.\n**What it does:** summarizes a new blog post into a 5-slide carousel PDF — AI text over AI backgrounds — and posts it to LinkedIn via Posta.\n\n**How it works:**\n1. Read the blog feed and pick the latest post.\n2. DeepSeek writes 5 slides (title + body); split them out.\n3. fal.ai generates a background per slide; upload each to Posta.\n4. Posta composites the text and builds the PDF; create the LinkedIn post.\n\n**Setup:** add Posta (Professional plan), DeepSeek, and fal.ai credentials. Sign up at https://www.getposta.app (14 days free, no credit card).",
        "height": 320,
        "color": 5
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -368,
        -368
      ],
      "id": "31efd7a4-96cb-4f42-95c8-3a4305792b44",
      "name": "Sticky Note3"
    },
    {
      "parameters": {
        "content": "In the create post you need to set at least one social account id (from \"get many social accounts\"), caption and optionally tags. For each supported social media account type, you can also set platform specific attributes like visibility etc. You can also add media ids to upload images and videos. Images and videos are scaled by Posta for each platform (9:16 for TikTok for example). Posta uses facial recognition to try to crop media if faces are present. ",
        "height": 304
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        3200,
        64
      ],
      "id": "335656b0-271f-4092-b077-7b429038a38b",
      "name": "Sticky Note4"
    },
    {
      "parameters": {
        "resource": "media"
      },
      "type": "n8n-nodes-posta.posta",
      "typeVersion": 1,
      "position": [
        2480,
        -96
      ],
      "id": "c77ec554-304d-41c5-b1b0-315d323b43f1",
      "name": "Upload media",
      "credentials": {
        "postaApi": {
          "name": "Posta account"
        }
      }
    },
    {
      "parameters": {
        "url": "={{ $json.images[0].url }}",
        "options": {
          "response": {
            "response": {
              "responseFormat": "file"
            }
          }
        }
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.4,
      "position": [
        2208,
        -96
      ],
      "id": "6589116c-f42b-4354-8e0f-e358b133d62c",
      "name": "Download generated background"
    },
    {
      "parameters": {
        "content": "Add the URL for the image. Then options -> response -> then \"response format -> file\" and put the output in field \"data\". This loads the image into the \"data\" field for further processing. ",
        "height": 512
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        2144,
        -288
      ],
      "id": "89031161-66b6-4235-a651-dfcd7a0cd3a2",
      "name": "Sticky Note5"
    },
    {
      "parameters": {
        "content": "This upload the contents of the \"data\" field from the precious node to the Posta platform and image processing starts (scaling for the different platforms). This also works for videos.",
        "height": 512
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        2416,
        -288
      ],
      "id": "20d12e43-4028-4881-9271-0e26ad7941bb",
      "name": "Sticky Note6"
    },
    {
      "parameters": {
        "jsCode": "const items = $input.all();\n  items.sort((a, b) =>\n    new Date(b.json.isoDate || b.json.pubDate).getTime() -\n    new Date(a.json.isoDate || a.json.pubDate).getTime()\n  );\n  return items.length ? [items[0]] : [];"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        272,
        16
      ],
      "id": "4798dbe5-598c-4075-a770-1c6f4ed68685",
      "name": "Latest post"
    },
    {
      "parameters": {
        "content": "Select the latest post",
        "height": 352,
        "width": 160
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        240,
        -192
      ],
      "id": "f765dde3-24e7-4339-b0ef-ddf4ba98e6f5",
      "name": "Sticky Note10"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=Turn the article below into a 5-slide LinkedIn carousel.\n\n  Rules:\n  - Exactly 5 slides.\n  - Slide 1 = a scroll-stopping hook. Slides 2–4 = the key takeaways (one idea per slide). Slide 5 = a clear call to action.\n  - Each slide has a short \"title\" (max ~6 words) and a \"body\" of 2–3 punchy lines (max ~360 characters). Plain text, no markdown, no emojis in the title.\n   Each slide also has an \"image_prompt\": a VERY short phrase describing one or two soft simple shapes and 2 muted colors on a deep background — e.g. \"a soft coral orb on\n  deep plum\" or \"two gentle mauve shapes on deep indigo\". Keep colors muted and gentle, never neon or harsh. Shapes and colors only — no scenes, no nature, no people, no text.\n  - Also write 3–5 relevant \"tags\" (hashtag words, WITHOUT the # symbol) and a 1–2 sentence LinkedIn \"caption\" to accompany the carousel.\n  - Base everything strictly on the article — do not invent facts, names, or numbers.\n\n  Return ONLY raw minified JSON — no markdown, no code fences, no commentary:\n  {\"caption\":\"...\",\"tags\":[\"...\",\"...\"],\"slides\":[{\"title\":\"...\",\"body\":\"...\",\"image_prompt\":\"...\"}]}\n\n  ARTICLE TITLE: {{ $json.title }}\n\n  ARTICLE:\n  {{ $json[\"content:encoded\"] }}",
        "messages": {
          "messageValues": [
            {
              "message": "You are an expert LinkedIn carousel copywriter. You always return valid minified JSON and nothing else."
            }
          ]
        },
        "batching": {}
      },
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "typeVersion": 1.9,
      "position": [
        576,
        -176
      ],
      "id": "7d069dce-b703-4a42-ac33-0598d865e1e0",
      "name": "Basic LLM Chain"
    },
    {
      "parameters": {
        "model": "deepseek-v4-pro",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatDeepSeek",
      "typeVersion": 1,
      "position": [
        576,
        80
      ],
      "id": "9335ef86-74f8-492f-84eb-6c4f25bc05c5",
      "name": "DeepSeek Chat Model",
      "credentials": {
        "deepSeekApi": {
          "name": "DeepSeek account"
        }
      }
    },
    {
      "parameters": {
        "content": "Let the LLM summarize and create text for 5 slides. If you want fewer, change the prompt accordingly.",
        "height": 512,
        "width": 320
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        528,
        -288
      ],
      "id": "74b3e5bd-33d3-4b35-886f-be58d6483ca9",
      "name": "Sticky Note11"
    },
    {
      "parameters": {
        "fieldToSplitOut": "slides",
        "options": {}
      },
      "type": "n8n-nodes-base.splitOut",
      "typeVersion": 1,
      "position": [
        1216,
        -176
      ],
      "id": "0ef31a8f-a23e-452f-8a44-bdb887a57057",
      "name": "Split into slides"
    },
    {
      "parameters": {
        "jsCode": "// \"Run Once for Each Item\" — or All Items\n  const raw = String($json.text ?? $json.output ?? '');\n  const m = raw.match(/```(?:json)?\\s*([\\s\\S]*?)```/i);\n  const jsonStr = m ? m[1] : raw.slice(raw.indexOf('{'), raw.lastIndexOf('}') + 1);\n  return [{ json: JSON.parse(jsonStr.trim()) }];\n"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        928,
        -176
      ],
      "id": "3a3361fd-dfd8-4b57-96e4-648e8f0d6cb7",
      "name": "Parse slides JSON"
    },
    {
      "parameters": {
        "content": "Parse the response into something more useful",
        "height": 512,
        "width": 256
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        880,
        -288
      ],
      "id": "0c1f1c50-d884-482f-b98c-62201f4e0409",
      "name": "Sticky Note12"
    },
    {
      "parameters": {
        "content": "Split out to 5 title / body items, one for each slide.",
        "height": 512
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        1152,
        -288
      ],
      "id": "d275d34a-fcda-4c13-a19f-4fe1196de800",
      "name": "Sticky Note13"
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "fal-ai/flux/schnell",
          "mode": "list",
          "cachedResultName": "FLUX.1 [schnell] [text-to-image]"
        },
        "modelParameters": {
          "parameters": [
            {
              "parameter": "image_size",
              "value": "square_hd"
            },
            {
              "parameter": "prompt",
              "value": "={{ $json.theme_color }} smooth gradient, minimal flat graphic background, a couple of subtle soft tonal shapes in the same color slightly lighter, clean modern,\n  lots of plain empty space, professional, no text"
            }
          ]
        },
        "options": {
          "waitForCompletion": true,
          "pollInterval": 5,
          "maxWaitTime": 600
        }
      },
      "type": "@fal-ai/n8n-nodes-fal.falAi",
      "typeVersion": 1,
      "position": [
        1936,
        -176
      ],
      "id": "d037dbcb-88e9-4daf-b655-7b63bdb29a6e",
      "name": "Generate media using AI model",
      "credentials": {
        "falAiApi": {
          "name": "fal.ai account"
        }
      }
    },
    {
      "parameters": {
        "content": "Generate some background images. Recraft V3.",
        "height": 512,
        "width": 256
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        1856,
        -288
      ],
      "id": "0eb79ec8-c34b-420f-b3c3-91071ef18e06",
      "name": "Sticky Note14"
    },
    {
      "parameters": {
        "jsCode": "\n  const text = $('Split into slides').all();  \n\n  return [{\n    json: {\n      slides: $input.all().map((up, i) => ({\n        media_id: up.json.media?.id ?? up.json.media_id ?? up.json.id,\n        title: text[i].json.title,\n        body: text[i].json.body,\n      })),\n    },\n  }];"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        2736,
        -96
      ],
      "id": "54b17e8d-38c1-4fa8-9bf7-a59ce2611c7e",
      "name": "Re-assemble slides"
    },
    {
      "parameters": {
        "content": "Re-assemble the slides array, now we have image, title, body",
        "height": 512
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        2672,
        -288
      ],
      "id": "acdf22e4-fe38-489f-a4f2-cd47bdc7a156",
      "name": "Sticky Note15"
    },
    {
      "parameters": {
        "resource": "media",
        "operation": "generateTextCarouselPdf",
        "slides": "={{ JSON.stringify($json.slides.map(s => ({ media_id: s.media_id, title: s.title, body: s.body }))) }}",
        "logoMediaId": "3cd2fd96-1281-4742-b8e8-f6a65959b3d5"
      },
      "type": "n8n-nodes-posta.posta",
      "typeVersion": 1,
      "position": [
        2992,
        -96
      ],
      "id": "b07ff25d-45b4-4fb5-9c87-6c58d21aafab",
      "name": "Generate text carousel PDF",
      "credentials": {
        "postaApi": {
          "name": "Posta account"
        }
      }
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "a1aa8531-76b0-46b0-a086-0bd10267f8ca",
              "name": "theme_color",
              "value": "dark blue",
              "type": "string"
            },
            {
              "id": "6f3c8682-8438-4d6f-9a6c-b0c7bc484421",
              "name": "title",
              "value": "={{ $json.title }}",
              "type": "string"
            },
            {
              "id": "838aea94-15c5-4e78-9de5-9a71aea42079",
              "name": "image_prompt",
              "value": "={{ $json.image_prompt }}",
              "type": "string"
            },
            {
              "id": "4741cf92-5741-4db8-abd3-e5dff31ad658",
              "name": "body",
              "value": "={{ $json.body }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        1568,
        -176
      ],
      "id": "afaf794a-db70-428c-a24a-ab150a5dd8b6",
      "name": "theme_color"
    },
    {
      "parameters": {
        "content": "Set a **theme color** to make sure the slides use the same color scheme",
        "height": 512,
        "width": 272
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        1488,
        -288
      ],
      "id": "ab6d300d-da22-41ec-b98c-6ad98a08aaa3",
      "name": "Sticky Note16"
    },
    {
      "parameters": {
        "content": "Generate the PDF carousel. Note the optional Logo Media ID to set a logo in the slides.",
        "height": 512
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        2928,
        -288
      ],
      "id": "4fc4f6e7-ae0d-4839-b796-3c4262bb3d69",
      "name": "Sticky Note17"
    }
  ],
  "pinData": {},
  "connections": {
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Get many social accounts",
            "type": "main",
            "index": 0
          },
          {
            "node": "RSS Read",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "RSS Read": {
      "main": [
        [
          {
            "node": "Latest post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download generated background": {
      "main": [
        [
          {
            "node": "Upload media",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload media": {
      "main": [
        [
          {
            "node": "Re-assemble slides",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create a post": {
      "main": [
        []
      ]
    },
    "DeepSeek Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Basic LLM Chain",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Latest post": {
      "main": [
        [
          {
            "node": "Basic LLM Chain",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Basic LLM Chain": {
      "main": [
        [
          {
            "node": "Parse slides JSON",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse slides JSON": {
      "main": [
        [
          {
            "node": "Split into slides",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split into slides": {
      "main": [
        [
          {
            "node": "theme_color",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate media using AI model": {
      "main": [
        [
          {
            "node": "Download generated background",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Re-assemble slides": {
      "main": [
        [
          {
            "node": "Generate text carousel PDF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate text carousel PDF": {
      "main": [
        [
          {
            "node": "Create a post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "theme_color": {
      "main": [
        [
          {
            "node": "Generate media using AI model",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1",
    "binaryMode": "separate",
    "availableInMCP": false
  },
  "versionId": "6c394a30-d605-4244-bb79-24fe225b06c7",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "id": "PLUSdT5qkKZrNMfX",
  "tags": [
    {
      "updatedAt": "2026-06-02T08:57:53.950Z",
      "createdAt": "2026-06-02T08:57:53.950Z",
      "id": "8rcWTt5CS63KQzEw",
      "name": "socialmedia"
    },
    {
      "updatedAt": "2026-06-02T09:01:25.831Z",
      "createdAt": "2026-06-02T09:01:25.831Z",
      "id": "8xBogo6fq3RQfLdT",
      "name": "autopost"
    },
    {
      "updatedAt": "2026-06-02T08:57:45.531Z",
      "createdAt": "2026-06-02T08:57:45.531Z",
      "id": "E2V7Vb6mVjkhPHEs",
      "name": "blog"
    },
    {
      "updatedAt": "2026-06-02T09:01:40.639Z",
      "createdAt": "2026-06-02T09:01:40.639Z",
      "id": "ESvKanJ6OwKaH6u4",
      "name": "posta"
    },
    {
      "updatedAt": "2026-06-04T10:18:35.324Z",
      "createdAt": "2026-06-04T10:18:35.324Z",
      "id": "YoazfSGedHuWQz2y",
      "name": "linkedin"
    }
  ]
}
