{
  "name": "Repurpose LinkedIn posts into X tweets with Apify, Claude AI and Airtable",
  "nodes": [
    {
      "id": "0af109fe-a87a-4f3d-bfc7-ec7affd9105c",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        224,
        1120
      ],
      "parameters": {
        "width": 688,
        "height": 1248,
        "content": "# Repurpose LinkedIn posts to X (Twitter)\n\n## How it works\n\n### Weekly (Sunday)\n- Fetches your recent LinkedIn posts via Apify scraper\n- Extracts carousel/PDF content using OpenAI vision (if applicabl"
      }
    },
    {
      "id": "b3d48bbe-3c65-48a2-8aa3-50c92760cfa5",
      "name": "ScrapeLastPosts",
      "type": "@apify/n8n-nodes-apify.apify",
      "position": [
        1872,
        1424
      ]
    },
    {
      "id": "d60c9a11-7ad8-4416-91f8-12710aa0f1b3",
      "name": "LoopOverPosts",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        2272,
        1424
      ]
    },
    {
      "id": "bbf2b91f-b09c-4668-9e7c-c943ebcc6887",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4336,
        1120
      ],
      "parameters": {
        "width": 528,
        "height": 672,
        "content": "## 4. Save LK posts in Airtable"
      }
    },
    {
      "id": "8b264b15-8292-44d9-8751-2d465b1a8d88",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        5488,
        1632
      ]
    },
    {
      "id": "f2db4dd1-c36c-4898-a39b-4e703bb287c4",
      "name": "Switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        2752,
        1424
      ]
    },
    {
      "id": "80897200-fb92-448c-8a25-bcc8fdd33fc5",
      "name": "ConvertPostIntoTweets",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        5344,
        1424
      ]
    },
    {
      "id": "7659255a-4fe1-4676-981f-62d0fba796b2",
      "name": "SplitThreadVariations",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        5856,
        1424
      ]
    },
    {
      "id": "4558ed79-8dda-4233-97f8-7c72629c58dd",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4880,
        1120
      ],
      "parameters": {
        "width": 1632,
        "height": 672,
        "content": "## 5. Convert LK post into tweets and save them in Airtable\n\nWe compute a defaut tweet publication date = LK post date + nb of days in Config table"
      }
    },
    {
      "id": "06bcc2b7-7c4e-4e0f-b2d1-5ad9c449d656",
      "name": "IfIsCarousel",
      "type": "n8n-nodes-base.if",
      "position": [
        3088,
        1328
      ]
    },
    {
      "id": "e07e0f07-4f75-4b20-89a6-c796cb0b05e1",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2160,
        1120
      ],
      "parameters": {
        "width": 2160,
        "height": 672,
        "content": "## 4. Extract LinkedIn post and carousel content"
      }
    },
    {
      "id": "67385f5f-631c-40a7-8a8f-0af35459e4b0",
      "name": "GetCarouselFile",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3360,
        1232
      ]
    },
    {
      "id": "d422b4f8-1507-4c24-abb6-8a1718795dbb",
      "name": "MergePost",
      "type": "n8n-nodes-base.merge",
      "position": [
        4688,
        1424
      ]
    },
    {
      "id": "893cabda-41da-456b-97c0-30e89adafce2",
      "name": "MergeContent",
      "type": "n8n-nodes-base.merge",
      "position": [
        4112,
        1328
      ]
    },
    {
      "id": "9c8ed31a-cd3f-4758-9111-b54c82511a48",
      "name": "MergeTweets",
      "type": "n8n-nodes-base.merge",
      "position": [
        6320,
        1408
      ]
    },
    {
      "id": "5fcfe105-e692-4932-ae20-83ea99b203be",
      "name": "Webhook_OnPostTweet",
      "type": "n8n-nodes-base.webhook",
      "position": [
        1072,
        2048
      ]
    },
    {
      "id": "2b4a6ade-7817-46c0-beac-612d98cf339d",
      "name": "SearchExistingPost",
      "type": "n8n-nodes-base.airtable",
      "position": [
        2528,
        1440
      ]
    },
    {
      "id": "69c22ddc-1ae2-410a-92df-758ad65983da",
      "name": "SavePost",
      "type": "n8n-nodes-base.airtable",
      "position": [
        4448,
        1328
      ]
    },
    {
      "id": "418983c9-1ec9-459b-b3a8-df168076f987",
      "name": "CreateStandaloneTweet",
      "type": "n8n-nodes-base.airtable",
      "position": [
        5856,
        1232
      ]
    },
    {
      "id": "6977f048-d52b-4a86-bc56-168b6d295f0f",
      "name": "CreateThreadTweet",
      "type": "n8n-nodes-base.airtable",
      "position": [
        6080,
        1424
      ]
    },
    {
      "id": "364583fc-d92f-4779-8bf9-a7b5c5f879bf",
      "name": "UpdatePostStatus",
      "type": "n8n-nodes-base.airtable",
      "position": [
        6064,
        1232
      ]
    },
    {
      "id": "b63a7ee3-2996-47a1-be6f-a1b4c8980f32",
      "name": "GetTweet",
      "type": "n8n-nodes-base.airtable",
      "position": [
        1456,
        2048
      ]
    },
    {
      "id": "08c9822d-b0d7-4a57-ba92-5738982ec5e9",
      "name": "SwitchStatusAndVariation",
      "type": "n8n-nodes-base.switch",
      "position": [
        1968,
        2320
      ]
    },
    {
      "id": "ac82b4e3-e5f0-4a6b-9581-3f7b10120657",
      "name": "PostStandaloneTweet",
      "type": "n8n-nodes-base.twitter",
      "position": [
        2416,
        2128
      ]
    },
    {
      "id": "1d837de6-8ced-4b72-98c8-0939d863bc75",
      "name": "SearchAllThreadTweets",
      "type": "n8n-nodes-base.airtable",
      "position": [
        2656,
        2464
      ]
    },
    {
      "id": "13b16f3f-4dcf-4bd7-b7b0-cb39c2eb50aa",
      "name": "UpdateStandaloneTweetStatus",
      "type": "n8n-nodes-base.airtable",
      "position": [
        2672,
        2128
      ]
    },
    {
      "id": "b509b247-fc01-4154-9a1a-d896800a492b",
      "name": "InitTemporaryTweetId",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        2432,
        2464
      ]
    },
    {
      "id": "6faeec85-b1d6-48a1-9986-f2c79e3b0412",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        960,
        1824
      ],
      "parameters": {
        "width": 320,
        "height": 544,
        "content": "## 1. (A) Manual trigger : when clicked on \"TWEET NOW\" button in Airtable"
      }
    },
    {
      "id": "17771166-9e30-4612-92aa-47bc73817f8a",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2320,
        2048
      ],
      "parameters": {
        "width": 768,
        "height": 288,
        "content": "## 4. Post a standalone tweet"
      }
    },
    {
      "id": "63238249-04ee-49cb-a93b-7ce171a2a0d4",
      "name": "PostFirstThreadTweet",
      "type": "n8n-nodes-base.twitter",
      "position": [
        3936,
        2400
      ]
    },
    {
      "id": "0aebbcb7-3432-4365-95d3-7e45985fa02e",
      "name": "GetLastTweetId",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        3232,
        2480
      ]
    },
    {
      "id": "8eca34f6-b762-4152-99ca-fc016fec78fa",
      "name": "IfEmpty",
      "type": "n8n-nodes-base.if",
      "position": [
        3504,
        2480
      ]
    },
    {
      "id": "d11fd204-27c0-4272-a214-0723871b7ccc",
      "name": "UpdateTemporaryTweetId",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        4592,
        2480
      ]
    },
    {
      "id": "feb68066-d491-492c-9db1-d1075e7a976c",
      "name": "UpdateThreadTweetStatus",
      "type": "n8n-nodes-base.airtable",
      "position": [
        4896,
        2480
      ]
    },
    {
      "id": "9d538e06-a3bb-46cd-96a2-2339c0bb8374",
      "name": "PostReplyTweet",
      "type": "n8n-nodes-base.twitter",
      "position": [
        3936,
        2544
      ]
    },
    {
      "id": "631131ed-a9e4-42a1-98e9-fc0a2e83c4c8",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        4384,
        2480
      ]
    },
    {
      "id": "53067c5f-bdd9-483f-8c2c-09805531409f",
      "name": "LoopOverTweets",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        2912,
        2464
      ]
    },
    {
      "id": "32df89d3-33ee-4813-b281-d71f725c8bff",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2320,
        2352
      ],
      "parameters": {
        "width": 2848,
        "height": 400,
        "content": "## 4. Post a thread of tweets"
      }
    },
    {
      "id": "17bf7d19-68f8-4b5b-bed9-d7d5b8272584",
      "name": "GetConfig",
      "type": "n8n-nodes-base.airtable",
      "position": [
        1376,
        1424
      ]
    },
    {
      "id": "8284659d-49a6-40b0-9d5f-c1dffdc9022c",
      "name": "FormatConfig",
      "type": "n8n-nodes-base.code",
      "position": [
        1552,
        1424
      ]
    },
    {
      "id": "3b4724ce-2045-4f01-9ff6-842009f4e7cd",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1312,
        1120
      ],
      "parameters": {
        "width": 400,
        "height": 672,
        "content": "## 2. Get config"
      }
    },
    {
      "id": "5a2ebd20-9a49-451f-94a9-2b117466cb3c",
      "name": "ComputeTweetDate",
      "type": "n8n-nodes-base.code",
      "position": [
        5024,
        1424
      ]
    },
    {
      "id": "6b6583db-c31b-4e78-a789-d70252b59dcf",
      "name": "Daily_AtNoon",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        1072,
        2656
      ]
    },
    {
      "id": "fcc814cc-5670-4862-af95-b5f04cb77473",
      "name": "SearchApprovedTweets",
      "type": "n8n-nodes-base.airtable",
      "position": [
        1456,
        2656
      ]
    },
    {
      "id": "7df00fd2-62b8-4784-ae9e-a3a32439db3a",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1312,
        2400
      ],
      "parameters": {
        "width": 400,
        "height": 544,
        "content": "## 2. (B) Get tweets to be posted\n\n- Status: Approved\n- Publication date before NOW\n- Standalone or only first one of a Thread"
      }
    },
    {
      "id": "475330cd-f96f-471f-88c8-ffd404323cc2",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        960,
        2400
      ],
      "parameters": {
        "width": 320,
        "height": 544,
        "content": "##  1. (B) Daily trigger"
      }
    },
    {
      "id": "2affbc92-aa04-4640-b49f-ebc33bebea32",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1312,
        1824
      ],
      "parameters": {
        "width": 400,
        "height": 544,
        "content": "## 2. (A) Get tweet"
      }
    },
    {
      "id": "6613fa71-fc63-4df2-a6c8-d44c290e618c",
      "name": "Weekly_OnSunday",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        1040,
        1424
      ]
    },
    {
      "id": "0ce13871-6382-47ac-b9b4-795944d10f97",
      "name": "Sticky Note12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        960,
        1120
      ],
      "parameters": {
        "width": 320,
        "height": 672,
        "content": "##  1. Weekly Trigger\n\nEach Sunday at midnight"
      }
    },
    {
      "id": "fc0744ad-9535-4515-b45a-4e8fd9c428c1",
      "name": "Sticky Note13",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1744,
        2048
      ],
      "parameters": {
        "width": 544,
        "height": 704,
        "content": "## 3. Check tweet Variation (standalone/thread) and Status (must be Approved)"
      }
    },
    {
      "id": "3f6e63fb-445e-4a5c-81b1-3b5cfe82cb2a",
      "name": "ParseJSON",
      "type": "n8n-nodes-base.code",
      "position": [
        3856,
        1232
      ]
    },
    {
      "id": "c582fa3e-b3f8-4358-a128-8d50c7bee2a7",
      "name": "Claude-4.5-Sonnet",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        5344,
        1632
      ]
    },
    {
      "id": "48a8ce5b-f83c-450c-b666-61b46bb5cd86",
      "name": "ExtractContentFromFile",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        3552,
        1232
      ]
    },
    {
      "id": "f1414a02-4d9e-4cec-84c7-895d17f7567b",
      "name": "Sticky Note17",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1744,
        1120
      ],
      "parameters": {
        "width": 384,
        "height": 672,
        "content": "## 3. Scrape LinkedIn posts\n\nApify  API doc here:\nhttps://console.apify.com/actors/A3cAPGpwBEG8RJwse/information/latest/readme\n\nPrice: $2 per 1k posts"
      }
    }
  ],
  "connections": {
    "Merge": {
      "main": [
        [
          {
            "node": "UpdateTemporaryTweetId",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch": {
      "main": [
        [
          {
            "node": "IfIsCarousel",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "MergePost",
            "type": "main",
            "index": 1
          }
        ],
        [
          {
            "node": "LoopOverPosts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IfEmpty": {
      "main": [
        [
          {
            "node": "PostFirstThreadTweet",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "PostReplyTweet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GetTweet": {
      "main": [
        [
          {
            "node": "SwitchStatusAndVariation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "SavePost": {
      "main": [
        [
          {
            "node": "MergePost",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GetConfig": {
      "main": [
        [
          {
            "node": "FormatConfig",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "MergePost": {
      "main": [
        [
          {
            "node": "ComputeTweetDate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ParseJSON": {
      "main": [
        [
          {
            "node": "MergeContent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "MergeTweets": {
      "main": [
        [
          {
            "node": "LoopOverPosts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Daily_AtNoon": {
      "main": [
        [
          {
            "node": "SearchApprovedTweets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "FormatConfig": {
      "main": [
        [
          {
            "node": "ScrapeLastPosts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IfIsCarousel": {
      "main": [
        [
          {
            "node": "GetCarouselFile",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "MergeContent",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "MergeContent": {
      "main": [
        [
          {
            "node": "SavePost",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "LoopOverPosts": {
      "main": [
        [],
        [
          {
            "node": "SearchExistingPost",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GetLastTweetId": {
      "main": [
        [
          {
            "node": "IfEmpty",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "LoopOverTweets": {
      "main": [
        [],
        [
          {
            "node": "GetLastTweetId",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "PostReplyTweet": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ],
        []
      ]
    },
    "GetCarouselFile": {
      "main": [
        [
          {
            "node": "ExtractContentFromFile",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ScrapeLastPosts": {
      "main": [
        [
          {
            "node": "LoopOverPosts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Weekly_OnSunday": {
      "main": [
        [
          {
            "node": "GetConfig",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ComputeTweetDate": {
      "main": [
        [
          {
            "node": "ConvertPostIntoTweets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "UpdatePostStatus": {
      "main": [
        [
          {
            "node": "MergeTweets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Claude-4.5-Sonnet": {
      "ai_languageModel": [
        [
          {
            "node": "ConvertPostIntoTweets",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "CreateThreadTweet": {
      "main": [
        [
          {
            "node": "MergeTweets",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "SearchExistingPost": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "PostStandaloneTweet": {
      "main": [
        [
          {
            "node": "UpdateStandaloneTweetStatus",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook_OnPostTweet": {
      "main": [
        [
          {
            "node": "GetTweet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "InitTemporaryTweetId": {
      "main": [
        [
          {
            "node": "SearchAllThreadTweets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "PostFirstThreadTweet": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    },
    "SearchApprovedTweets": {
      "main": [
        [
          {
            "node": "SwitchStatusAndVariation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ConvertPostIntoTweets": {
      "main": [
        [
          {
            "node": "SplitThreadVariations",
            "type": "main",
            "index": 0
          },
          {
            "node": "CreateStandaloneTweet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "CreateStandaloneTweet": {
      "main": [
        [
          {
            "node": "UpdatePostStatus",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "SearchAllThreadTweets": {
      "main": [
        [
          {
            "node": "LoopOverTweets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "SplitThreadVariations": {
      "main": [
        [
          {
            "node": "CreateThreadTweet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ExtractContentFromFile": {
      "main": [
        [
          {
            "node": "ParseJSON",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "UpdateTemporaryTweetId": {
      "main": [
        [
          {
            "node": "UpdateThreadTweetStatus",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "UpdateThreadTweetStatus": {
      "main": [
        [
          {
            "node": "LoopOverTweets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "ConvertPostIntoTweets",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "SwitchStatusAndVariation": {
      "main": [
        [
          {
            "node": "PostStandaloneTweet",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "InitTemporaryTweetId",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}