{
  "name": "Clip a video with Klap's API, send the best clip to X, Threads and Skool, and report each post",
  "nodes": [
    {
      "parameters": {
        "content": "## Clip a video with Klap's API and send the best clip to X, Threads and Skool\n\nGive the workflow the link of a long video. Klap cuts it into shorts through its API, the workflow keeps the short with the highest virality score, and Status 200 Uploads posts it to X, Threads and Skool. Then the workflow reads each post that came back with an id until its network is done, for about 10 minutes at most. A post that needs more than about 20 seconds is reported as still_publishing. From X and Threads it is then not read at all. Klap posts to YouTube, TikTok, Instagram, Facebook and LinkedIn itself; these three it does not.\n\nThe Klap steps are HTTP Request nodes with an API key, so no Klap node has to be installed.\n\n### How it works\n1. **Your settings** holds the link of the video, the most shorts Klap may make, an optional caption and check_only.\n2. **Start the clipping** sends the link to Klap. The workflow reads the task every 2 minutes until the shorts are made.\n3. **Best first** and **Keep the best clip** pick the short with the highest virality score. **Start the export** renders it to an MP4, once.\n4. **Import the clip** copies the MP4 to Status 200 Uploads. The three **Publish** nodes post it, or only check it. Each post request carries an automatic Idempotency-Key, so a request the node sends again by itself is not posted twice. A new run of the workflow posts again.\n5. A post that comes back with an id is read again every 70 seconds until its network is done, at most 9 times. Every other answer (a check, a queued post, an error) ends in **Checks and schedules**. While a post is being read, that node runs after the reading.\n\n### What a run costs at Klap\nKlap bills its API by use. By Klap's pricing page a video is counted when its task is created, a short when it is made and an export when it is created (docs.klap.app/pricing). Those prices are for the API only; the Klap app has its own plans. A check-only run costs the same at Klap: check_only only keeps the three posts from going out.\n\n### Setup\n1. Add the community node `@status200uploads/n8n-nodes-status200uploads`. n8n verified it on 26 October 2026, so on n8n Cloud an owner or admin opens the nodes panel, searches for Status 200 Uploads and selects Install; if it is not listed, the instance owner turns on Verified community nodes in the n8n Cloud console. On self-hosted n8n: Settings, Community Nodes.\n2. Create an API key in your Klap account (klap.app/rest-api). In n8n create a **Bearer Auth** credential with that key and choose it in the five Klap nodes: Start the clipping, Read the task, List the shorts, Start the export, Read the export.\n3. In your Status 200 Uploads dashboard, connect X, Threads and Skool, and create an API key on the API page. Posting to X needs the X add-on, posting to Skool the Beginner plan or higher.\n4. Create a **Status 200 Uploads API** credential with that key and choose it in the five Status 200 Uploads nodes: Import the clip, the three Publish nodes and Read the post. In each Publish node choose your account. In **Publish to Skool** also choose the group and fill in Skool Options (note 5).\n5. Put the link of your video in video_link (**Your settings**) and run the workflow with check_only true. Read the result in Checks and schedules. Then copy klap_task_id from **The post** into task_id, set check_only to false and run it again: the same task is used, and Klap counts one more export, not a second video. For the next video, empty task_id first and set check_only back to true: while task_id is filled the workflow does not read video_link, and it would export and post the short of the old task again.\n\nNot run by us: Status 200 Uploads has no Klap account. This workflow was written from Klap's API documentation (docs.klap.app, read on 15 November 2026) and the Status 200 Uploads node 0.1.3, and has never been run from start to end, on n8n Cloud or on self-hosted n8n.",
        "height": 1520,
        "width": 560
      },
      "id": "eb335433-02f2-48ea-adbf-5e991270f4c0",
      "name": "Overview",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -680,
        -520
      ]
    },
    {
      "parameters": {
        "content": "## 1. Your settings\nvideo_link is empty in the file: put in the link of one video, not of a channel or a playlist. Klap takes YouTube, Twitch, Vimeo, Loom and Google Drive links and public links to a video file; the whole list is on docs.klap.app/endpoints/tasks.\n\nclips_to_make: the most shorts Klap may make; it can make fewer. With 1 that short is posted. With more, the workflow posts the one with the highest virality score, and Klap bills every short it makes.\n\ntask_id: leave it empty to start a new task. With the id of a task Klap already has, the workflow takes up that task and creates none. While task_id is filled, video_link is not read.\n\ncaption: leave it empty to post the short's own name. check_only true runs every check and posts nothing.",
        "height": 740,
        "width": 440,
        "color": 7
      },
      "id": "3d41af53-d572-4662-aef1-3de1a501b6f8",
      "name": "Note: settings",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -60,
        -560
      ]
    },
    {
      "parameters": {
        "content": "## 2. Klap makes the shorts\nStart the clipping creates one task at Klap. The workflow waits 2 minutes, reads the task, and does that again while Klap is still processing, for about an hour at most. Then it lists the shorts and keeps the one with the highest virality score.\n\nA run without a task_id creates a new task, and Klap bills it again. So leave Retry On Fail off on Start the clipping and on Start the export. It is on for the three steps that only read (Read the task, List the shorts, Read the export): a read creates nothing at Klap.\n\nThe workflow stops at **Klap did not finish**, and nothing is posted, when the task ends with an error, lists no short, or is still processing after that hour. Processing: Klap was still clipping, so put the task id (in the output of Read the task) into task_id and run again later. Error: the task failed at Klap; its API pages give no reason, and its pricing page does not say whether a failed task is billed.\n\nn8n can limit how long one run may run (on n8n Cloud the limit depends on the plan: n8n.io/pricing). A help text on that page, at Max execution duration, says time spent in a Wait node does not count. The n8n code we read (2.47.7) can count it when a limit is set. This workflow has not been run there. If n8n ends this run before Klap is done, the task goes on at Klap: copy its id from the output of Start the clipping into task_id and run the workflow again later. That holds only while no Publish node ran (note 6).",
        "height": 740,
        "width": 2200,
        "color": 7
      },
      "id": "ba0c8df9-7e91-4a8e-a167-898b27d8ad68",
      "name": "Note: clips",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        400,
        -560
      ]
    },
    {
      "parameters": {
        "content": "## 3. One export\nStart the export renders the short to an MP4. The workflow waits 70 seconds, reads the export, and does that again while Klap is still rendering, for about 15 minutes at most.\n\nThe workflow stops at **The export did not finish**, and nothing is posted, when the export ends with an error or is not done in that time. The task and its shorts are still there: run again with the task id (in the output of Read the task) in task_id. That starts a new export of the same short, and Klap counts each export it creates.",
        "height": 740,
        "width": 1360,
        "color": 7
      },
      "id": "626865ec-58b5-47dd-aaaf-96aa32889e63",
      "name": "Note: export",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        2620,
        -560
      ]
    },
    {
      "parameters": {
        "content": "## 4. What is posted\nThe post holds the MP4's address (the export's src_url), the caption, the Skool title, and klap_task_id for a later run. Import the clip copies the MP4 to your Status 200 Uploads media library, where it is kept for 7 days, also in a check-only run. It waits inside the node, up to 10 minutes, until the file is ready: for a run-time limit of n8n that is running time, not waiting.",
        "height": 740,
        "width": 460,
        "color": 7
      },
      "id": "a43d63d9-d9db-4350-a99a-cd8ff75c028e",
      "name": "Note: the post",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        4000,
        -560
      ]
    },
    {
      "parameters": {
        "content": "## 5. Publish\nOne node per network, the same file for all three. X gets the first 280 characters of the caption, Threads the first 500, Skool the whole caption with the short's name as its title. The cut counts letters. X counts Chinese, Japanese and Korean characters and most emoji as 2: for such captions change 280 to 140 in Publish to X.\n\nA Publish node that ends with an error (a refusal, or no answer) does not stop the other networks: its row in Checks and schedules starts with error, and the run then ends at **A network ended with an error**, so n8n lists it as failed. Do not run the workflow again for that clip: a new run posts to the other networks again. Look on the network itself, not only in your Status 200 Uploads History: a post may still have gone out, and History can show it as failed, or not at all. Then send the missing post by hand. When a connection broke, the words of the row are n8n's own and can say to retry or to turn on Retry On Fail: do not, the rule is the same.\n\nSkool takes one post per hour from an account: a Skool post less than an hour after the last one ends with an error.\n\nIn Publish to Skool, under Skool Options: Group Slug is the name of the group in its web address (without it the link of the post has no group in it), and a group with categories needs a Label ID (Account: Get Posting Options lists them). The check does not test the category.\n\nA network you do not use: delete its Publish node and its answer node. If n8n then draws a wire from Import the clip to Collect the answers, delete that wire too. Delete, do not deactivate: a deactivated Publish node passes the clip on, and its row reads nothing was sent.",
        "height": 1540,
        "width": 560,
        "color": 7
      },
      "id": "ec991815-ae96-4ef6-a003-551fe2963438",
      "name": "Note: publish",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        4480,
        -1160
      ]
    },
    {
      "parameters": {
        "content": "## 6. Read the posts\nA post that came back with an id is read at once. While its network is not done, the workflow waits 70 seconds and reads it again, at most 9 times. Done is not the same as live: Report gives the network, the status, the link and the problem, if any. A status of success says the post exists. Open its link once to see that the clip is in it.\n\nChecks and schedules holds every row without an id to read: a check, a post queued for the next day, an error, and still_publishing. A network that needs more than about 20 seconds answers still_publishing. From X and Threads that answer has no id. From Skool it can come without one. A post without an id is not read here: look on the network itself. A still_publishing row does not make the run fail, and neither does a post that Report shows as failed, as timeout or as not done after the last read: n8n lists such a run as successful, so read Report and Checks and schedules.\n\nIf a run stops after a Publish node ran (a read fails, or n8n ends the run), the posts may be out. Do not start a new run for that clip: use Retry on that execution if n8n offers it, or look on the networks.\n\nLeave Checks and schedules below Read the post: n8n runs the upper branch first, and the stop behind it must come after the reading. This needs Execution Logic v1 (Workflow settings), which every workflow made since n8n 1.0 has.",
        "height": 1020,
        "width": 1180,
        "color": 7
      },
      "id": "aabadf2f-96e2-4dd6-a9a1-820592dba614",
      "name": "Note: result",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        5060,
        -560
      ]
    },
    {
      "parameters": {},
      "id": "7f775993-a7ad-41a0-ad0a-ca11c2db318e",
      "name": "Run by hand",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        0,
        0
      ]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "9a39b740-c4ab-4c31-a705-ba6611296007",
              "name": "video_link",
              "value": "",
              "type": "string"
            },
            {
              "id": "8f0f49dc-f4e0-4af7-ad5f-30628df958f5",
              "name": "clips_to_make",
              "value": 1,
              "type": "number"
            },
            {
              "id": "53e22fc7-2926-49a8-a829-c0f1860564fa",
              "name": "task_id",
              "value": "",
              "type": "string"
            },
            {
              "id": "0d78ba96-074d-4941-a71e-24d0aa0658a3",
              "name": "caption",
              "value": "",
              "type": "string"
            },
            {
              "id": "1bcac593-e0b2-462e-adfa-93058916d508",
              "name": "check_only",
              "value": true,
              "type": "boolean"
            }
          ]
        },
        "options": {}
      },
      "id": "aaed3afc-1b96-49db-a93a-98529a69a081",
      "name": "Your settings",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        220,
        0
      ]
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "649e195d-3e92-486e-af8d-eed3b805895c",
              "leftValue": "={{ !$json.task_id }}",
              "rightValue": "",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "7cfb2828-34f9-4877-a290-bdf2dc3fbac9",
      "name": "New task?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        460,
        0
      ]
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "976d8b5f-b272-4884-a53e-9ad1258cc616",
              "leftValue": "={{ Boolean($json.video_link) }}",
              "rightValue": "",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "d90e018e-ce1c-4551-ae5b-501c2d566c7f",
      "name": "Link given?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        680,
        -160
      ]
    },
    {
      "parameters": {
        "errorMessage": "Put the link of your video into video_link, or the id of a Klap task into task_id (Your settings). Nothing was sent to Klap."
      },
      "id": "d3227690-e8fa-40e7-a908-5afeb189e425",
      "name": "Nothing to clip",
      "type": "n8n-nodes-base.stopAndError",
      "typeVersion": 1,
      "position": [
        900,
        -320
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "=https://api.klap.app/v2/tasks/video-to-shorts",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpBearerAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({ source_video_url: $json.video_link, max_clip_count: $json.clips_to_make }) }}",
        "options": {}
      },
      "id": "680d8cdf-b7fc-46b2-af44-612514fe30b8",
      "name": "Start the clipping",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        900,
        -160
      ]
    },
    {
      "parameters": {
        "amount": 2,
        "unit": "minutes"
      },
      "id": "8d38e282-06fe-40fb-a4b9-14ccf5b745fd",
      "name": "Wait for the clips",
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        1120,
        -160
      ],
      "webhookId": "261c130f-4ff5-4e6a-ae82-2f2da95d2ec0"
    },
    {
      "parameters": {
        "url": "=https://api.klap.app/v2/tasks/{{ $('Your settings').first().json.task_id || $('Start the clipping').first().json.id }}",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpBearerAuth",
        "options": {}
      },
      "id": "7adce524-9de8-4b03-a92b-085e60fbc245",
      "name": "Read the task",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1340,
        0
      ],
      "retryOnFail": true,
      "maxTries": 5,
      "waitBetweenTries": 5000
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "cb592c70-efdc-4b53-a11b-d51e96620841",
              "leftValue": "={{ $json.status === 'processing' && $runIndex < 30 }}",
              "rightValue": "",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "69112b4d-2085-4672-a9a4-8cc709383cac",
      "name": "Still clipping?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        1560,
        0
      ]
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "c76ad2c0-b629-44f7-ab97-9fb69e89c4c5",
              "leftValue": "={{ $json.status === 'ready' }}",
              "rightValue": "",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "2975753d-d245-42e6-aedd-729fd369d2d0",
      "name": "Clips made?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        1780,
        0
      ]
    },
    {
      "parameters": {
        "url": "=https://api.klap.app/v2/projects/{{ $json.output_id }}",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpBearerAuth",
        "options": {}
      },
      "id": "59427346-db1d-4ee5-a489-de70647492cf",
      "name": "List the shorts",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        2000,
        0
      ],
      "retryOnFail": true,
      "maxTries": 5,
      "waitBetweenTries": 5000,
      "alwaysOutputData": true
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "68210708-d6f8-4005-a6dd-61aaecb6607f",
              "leftValue": "={{ Boolean($json.id) }}",
              "rightValue": "",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "2293cea5-d5c9-4190-a3dc-63d3891f2fae",
      "name": "Any short?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        2220,
        0
      ]
    },
    {
      "parameters": {
        "sortFieldsUi": {
          "sortField": [
            {
              "fieldName": "virality_score",
              "order": "descending"
            },
            {
              "fieldName": "id",
              "order": "ascending"
            }
          ]
        },
        "options": {}
      },
      "id": "25cd50f0-c1df-4051-a73a-4de63c51433f",
      "name": "Best first",
      "type": "n8n-nodes-base.sort",
      "typeVersion": 1,
      "position": [
        2440,
        0
      ]
    },
    {
      "parameters": {},
      "id": "e47f3a16-2389-4d3f-a78c-26d887c446d9",
      "name": "Keep the best clip",
      "type": "n8n-nodes-base.limit",
      "typeVersion": 1,
      "position": [
        2660,
        0
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "=https://api.klap.app/v2/projects/{{ $json.folder_id }}/{{ $json.id }}/exports",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpBearerAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "{}",
        "options": {}
      },
      "id": "f731cd43-a09d-416a-ab0f-a62514b9f99c",
      "name": "Start the export",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        2900,
        0
      ]
    },
    {
      "parameters": {
        "amount": 70
      },
      "id": "dc27cb99-ff2a-4b3a-a059-b86f1a9782a8",
      "name": "Wait for the export",
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        3120,
        0
      ],
      "webhookId": "9ecc7dcc-b1c6-42c7-aa64-bc2ebc105d39"
    },
    {
      "parameters": {
        "url": "=https://api.klap.app/v2/projects/{{ $('Keep the best clip').first().json.folder_id }}/{{ $('Keep the best clip').first().json.id }}/exports/{{ $('Start the export').first().json.id }}",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpBearerAuth",
        "options": {}
      },
      "id": "e62686bb-aa74-4704-a047-d5a5dabf4816",
      "name": "Read the export",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        3340,
        0
      ],
      "retryOnFail": true,
      "maxTries": 5,
      "waitBetweenTries": 5000
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "a01fbd84-40f2-428d-acad-6312408f66a3",
              "leftValue": "={{ $json.status === 'processing' && $runIndex < 12 }}",
              "rightValue": "",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "daf98251-9e7a-46f8-a06a-6b3bf22289e2",
      "name": "Still exporting?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        3560,
        0
      ]
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "5aac8a45-8f2c-4784-ac3f-bb67323f0c1e",
              "leftValue": "={{ $json.status === 'ready' && Boolean($json.src_url) }}",
              "rightValue": "",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "8dc90c50-3fd0-4c51-a191-f4365d084bc7",
      "name": "Export made?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        3780,
        0
      ]
    },
    {
      "parameters": {
        "errorMessage": "=Klap gave no short to post: the task's last status was {{ $json.status || 'ready, with no short' }}. Nothing was posted. See note 2."
      },
      "id": "53076df1-5be2-4796-ae62-cbe7d145d36c",
      "name": "Klap did not finish",
      "type": "n8n-nodes-base.stopAndError",
      "typeVersion": 1,
      "position": [
        2220,
        320
      ]
    },
    {
      "parameters": {
        "errorMessage": "=Klap did not finish the export: its last status was {{ $json.status }}. Nothing was posted. See note 3."
      },
      "id": "866c9ab2-e8a5-416d-a919-11cc53ed40c7",
      "name": "The export did not finish",
      "type": "n8n-nodes-base.stopAndError",
      "typeVersion": 1,
      "position": [
        3780,
        320
      ]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "a9a9202e-147f-46a3-a5cb-8388defbd7d5",
              "name": "video_url",
              "value": "={{ $json.src_url }}",
              "type": "string"
            },
            {
              "id": "46373d39-dfcc-4214-a7e5-6827ad85387a",
              "name": "caption",
              "value": "={{ $('Your settings').first().json.caption || $('Keep the best clip').first().json.name || 'New clip' }}",
              "type": "string"
            },
            {
              "id": "ee88e682-7ee0-4ba3-abaf-c4302dc4e4f9",
              "name": "skool_title",
              "value": "={{ $('Keep the best clip').first().json.name || 'New clip' }}",
              "type": "string"
            },
            {
              "id": "67babf56-3586-4941-a27c-66542cf615df",
              "name": "check_only",
              "value": "={{ $('Your settings').first().json.check_only }}",
              "type": "boolean"
            },
            {
              "id": "2a250b1b-fd78-4640-a502-712553bd991a",
              "name": "klap_task_id",
              "value": "={{ $('Read the task').first().json.id }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "id": "6f2332e3-34f3-492e-a296-126d955619c8",
      "name": "The post",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        4040,
        0
      ]
    },
    {
      "parameters": {
        "resource": "media",
        "operation": "importFromUrl",
        "url": "={{ $json.video_url }}",
        "options": {
          "maxWait": 600
        },
        "requestOptions": {
          "batching": {
            "batch": {
              "batchSize": 1,
              "batchInterval": 25000
            }
          }
        }
      },
      "id": "5f9bbec0-60cc-4143-afb5-2e525b5bbb85",
      "name": "Import the clip",
      "type": "@status200uploads/n8n-nodes-status200uploads.status200Uploads",
      "typeVersion": 1,
      "position": [
        4280,
        0
      ]
    },
    {
      "parameters": {
        "resource": "post",
        "operation": "create",
        "account": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "platform": "x",
        "text": "={{ $('The post').item.json.caption.slice(0, 280) }}",
        "media": "fileIds",
        "fileIds": "={{ $json.file_id }}",
        "options": {
          "dryRun": "={{ $('The post').item.json.check_only }}"
        },
        "requestOptions": {
          "batching": {
            "batch": {
              "batchSize": 1,
              "batchInterval": 25000
            }
          }
        }
      },
      "id": "5dcc1648-68c6-4291-adc7-5976ddfee67f",
      "name": "Publish to X",
      "type": "@status200uploads/n8n-nodes-status200uploads.status200Uploads",
      "typeVersion": 1,
      "position": [
        4560,
        -200
      ],
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "fef45924-e6ef-463d-abf4-ae6229da3a8b",
              "name": "network",
              "value": "x",
              "type": "string"
            },
            {
              "id": "ad8024a7-f3d1-4758-a444-3741aa893432",
              "name": "node_error",
              "value": "={{ Boolean($input.item.error) }}",
              "type": "boolean"
            },
            {
              "id": "052149ed-ecbb-47f4-af37-17cb56ab5a02",
              "name": "problem",
              "value": "={{ ($input.item.error && $input.item.error.message) || '' }}",
              "type": "string"
            }
          ]
        },
        "includeOtherFields": true,
        "options": {}
      },
      "id": "ef269522-ebe7-4a8f-ad3a-6da481062371",
      "name": "X answer",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        4800,
        -200
      ]
    },
    {
      "parameters": {
        "resource": "post",
        "operation": "create",
        "account": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "platform": "threads",
        "text": "={{ $('The post').item.json.caption.slice(0, 500) }}",
        "media": "fileIds",
        "fileIds": "={{ $json.file_id }}",
        "options": {
          "dryRun": "={{ $('The post').item.json.check_only }}"
        },
        "requestOptions": {
          "batching": {
            "batch": {
              "batchSize": 1,
              "batchInterval": 25000
            }
          }
        }
      },
      "id": "f4d200d9-a8b3-4fd8-aa56-e047b08eaebe",
      "name": "Publish to Threads",
      "type": "@status200uploads/n8n-nodes-status200uploads.status200Uploads",
      "typeVersion": 1,
      "position": [
        4560,
        0
      ],
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "33baac1f-a71d-4c52-ab7f-fc5d7fdf6210",
              "name": "network",
              "value": "threads",
              "type": "string"
            },
            {
              "id": "90560dae-8d61-49f1-a1e5-81b8bf1401eb",
              "name": "node_error",
              "value": "={{ Boolean($input.item.error) }}",
              "type": "boolean"
            },
            {
              "id": "fd11ef4e-8483-48db-a331-4f145691e0b1",
              "name": "problem",
              "value": "={{ ($input.item.error && $input.item.error.message) || '' }}",
              "type": "string"
            }
          ]
        },
        "includeOtherFields": true,
        "options": {}
      },
      "id": "3488ccbd-ecbe-44f4-afbd-31af9d9a3c66",
      "name": "Threads answer",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        4800,
        0
      ]
    },
    {
      "parameters": {
        "resource": "post",
        "operation": "create",
        "account": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "platform": "skool",
        "text": "={{ $('The post').item.json.caption }}",
        "media": "fileIds",
        "fileIds": "={{ $json.file_id }}",
        "skoolTitle": "={{ $('The post').item.json.skool_title }}",
        "skoolOptions": {
          "groupSlug": "",
          "label": ""
        },
        "options": {
          "dryRun": "={{ $('The post').item.json.check_only }}"
        }
      },
      "id": "47e269e0-8349-45d9-a4ca-f89e04bfbf97",
      "name": "Publish to Skool",
      "type": "@status200uploads/n8n-nodes-status200uploads.status200Uploads",
      "typeVersion": 1,
      "position": [
        4560,
        200
      ],
      "onError": "continueRegularOutput",
      "executeOnce": true
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "7c1ae12c-ae19-4035-a34e-733a9ffbbd6b",
              "name": "network",
              "value": "skool",
              "type": "string"
            },
            {
              "id": "39c13eaf-061b-40f0-a50a-5e994986fc52",
              "name": "node_error",
              "value": "={{ Boolean($input.item.error) }}",
              "type": "boolean"
            },
            {
              "id": "f32fd0d5-f0fe-472c-a4c5-57a3b5fa90e2",
              "name": "problem",
              "value": "={{ ($input.item.error && $input.item.error.message) || '' }}",
              "type": "string"
            }
          ]
        },
        "includeOtherFields": true,
        "options": {}
      },
      "id": "cb75e75a-a353-4a77-a928-e76c6afa4651",
      "name": "Skool answer",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        4800,
        200
      ]
    },
    {
      "parameters": {
        "numberInputs": 3
      },
      "id": "af09c376-a43e-4ec5-ab9f-90e4ab601473",
      "name": "Collect the answers",
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3.2,
      "position": [
        5060,
        0
      ]
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "a973c9a6-8019-4175-a85a-799016e1b7f7",
              "leftValue": "={{ Boolean($json.status200 && $json.status200.post_id) }}",
              "rightValue": "",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "3846a3ef-7f05-47e0-a83f-396d9fdc5de6",
      "name": "Sent now?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        5280,
        0
      ]
    },
    {
      "parameters": {
        "resource": "post",
        "operation": "get",
        "post": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $json.status200 ? $json.status200.post_id : $json.id }}"
        }
      },
      "id": "79c237bf-356f-4b10-a221-2b79f5ea801a",
      "name": "Read the post",
      "type": "@status200uploads/n8n-nodes-status200uploads.status200Uploads",
      "typeVersion": 1,
      "position": [
        5520,
        -160
      ],
      "retryOnFail": true,
      "maxTries": 5,
      "waitBetweenTries": 5000
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "1fdb8764-ed02-4337-a98e-e506f1c03811",
              "leftValue": "={{ $json.done === true || $runIndex >= 9 }}",
              "rightValue": "",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "92f979b1-6fa1-41a6-ab9a-5e4f462d7ddc",
      "name": "Live yet?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        5740,
        -160
      ]
    },
    {
      "parameters": {
        "amount": 70
      },
      "id": "34a2de45-7443-4806-aad6-2f7b8e32023c",
      "name": "Wait for the post",
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        5740,
        40
      ],
      "webhookId": "64e6e8e8-0291-4823-a358-4ceaba7b4d7d"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "c81055bc-1bf4-4941-ad74-d12601ef2b03",
              "name": "network",
              "value": "={{ $json.platform }}",
              "type": "string"
            },
            {
              "id": "66781c00-6d79-4403-abc0-67c25c2595cd",
              "name": "status",
              "value": "={{ $json.status }}",
              "type": "string"
            },
            {
              "id": "491594a6-6fff-418d-a61d-ffd0ba4469a7",
              "name": "done",
              "value": "={{ $json.done === true }}",
              "type": "boolean"
            },
            {
              "id": "47b18cf6-5f32-4355-acb4-3b50c35cca7f",
              "name": "link",
              "value": "={{ $json.permalink || '' }}",
              "type": "string"
            },
            {
              "id": "2baa7145-44a1-4940-a9ac-1b7751eb479a",
              "name": "problem",
              "value": "={{ $json.error_message || '' }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "id": "82246f0a-ed12-4dfb-a5c9-c9c090cbc599",
      "name": "Report",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        5980,
        -180
      ]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "dc75dcb0-e6e9-4e95-a3da-835eb7b319b3",
              "name": "network",
              "value": "={{ $json.network }}",
              "type": "string"
            },
            {
              "id": "b8818f0b-b25b-4734-abee-9c61110412c2",
              "name": "result",
              "value": "={{ $json.node_error ? 'error: ' + ($json.problem || 'open the Publish node of this network in this execution to read it') : $json.dry_run ? 'checked: ' + $json.outcome + ($json.reason ? ' (' + $json.reason.code + ': ' + $json.reason.message + ')' : '') : ($json.code || ($json.data !== undefined ? 'accepted' : 'nothing was sent: the Publish node of this network gave no answer')) }}",
              "type": "string"
            },
            {
              "id": "bc4b07d7-b532-4b44-af5c-5f5538d84afa",
              "name": "warnings",
              "value": "={{ ($json.warnings || []).map((w) => w.code).join(', ') }}",
              "type": "string"
            },
            {
              "id": "33c505d4-72f5-42e5-a6ed-f8aed238430f",
              "name": "scheduled_post_id",
              "value": "={{ $json.scheduled_post_id || '' }}",
              "type": "string"
            },
            {
              "id": "3075c537-69ed-4a38-a425-86710e0a4272",
              "name": "scheduled_at",
              "value": "={{ $json.scheduled_at || '' }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "id": "c6eb5486-8b66-49d7-a388-2ec843dfcba9",
      "name": "Checks and schedules",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        5520,
        260
      ]
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "87895298-9925-440d-abe5-560e8f37e87b",
              "leftValue": "={{ $json.result.startsWith('error') || $json.result.startsWith('nothing was sent') }}",
              "rightValue": "",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "65a4a255-e374-4c78-a261-6297e07233ba",
      "name": "Any error?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        5740,
        260
      ]
    },
    {
      "parameters": {
        "errorMessage": "At least one network ended with an error, or gave no answer: see Checks and schedules of this run. Posts that came back with an id were read before this stop. A post without an id was not read: look on the network."
      },
      "id": "071e9570-d464-43a3-a414-1036db0f69a1",
      "name": "A network ended with an error",
      "type": "n8n-nodes-base.stopAndError",
      "typeVersion": 1,
      "position": [
        5980,
        240
      ]
    }
  ],
  "connections": {
    "Run by hand": {
      "main": [
        [
          {
            "node": "Your settings",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Your settings": {
      "main": [
        [
          {
            "node": "New task?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "New task?": {
      "main": [
        [
          {
            "node": "Link given?",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Read the task",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Link given?": {
      "main": [
        [
          {
            "node": "Start the clipping",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Nothing to clip",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Start the clipping": {
      "main": [
        [
          {
            "node": "Wait for the clips",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait for the clips": {
      "main": [
        [
          {
            "node": "Read the task",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read the task": {
      "main": [
        [
          {
            "node": "Still clipping?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Still clipping?": {
      "main": [
        [
          {
            "node": "Wait for the clips",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Clips made?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Clips made?": {
      "main": [
        [
          {
            "node": "List the shorts",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Klap did not finish",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "List the shorts": {
      "main": [
        [
          {
            "node": "Any short?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Any short?": {
      "main": [
        [
          {
            "node": "Best first",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Klap did not finish",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Best first": {
      "main": [
        [
          {
            "node": "Keep the best clip",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Keep the best clip": {
      "main": [
        [
          {
            "node": "Start the export",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Start the export": {
      "main": [
        [
          {
            "node": "Wait for the export",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait for the export": {
      "main": [
        [
          {
            "node": "Read the export",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read the export": {
      "main": [
        [
          {
            "node": "Still exporting?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Still exporting?": {
      "main": [
        [
          {
            "node": "Wait for the export",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Export made?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Export made?": {
      "main": [
        [
          {
            "node": "The post",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "The export did not finish",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "The post": {
      "main": [
        [
          {
            "node": "Import the clip",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Import the clip": {
      "main": [
        [
          {
            "node": "Publish to X",
            "type": "main",
            "index": 0
          },
          {
            "node": "Publish to Threads",
            "type": "main",
            "index": 0
          },
          {
            "node": "Publish to Skool",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Publish to X": {
      "main": [
        [
          {
            "node": "X answer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Publish to Threads": {
      "main": [
        [
          {
            "node": "Threads answer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Publish to Skool": {
      "main": [
        [
          {
            "node": "Skool answer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "X answer": {
      "main": [
        [
          {
            "node": "Collect the answers",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Threads answer": {
      "main": [
        [
          {
            "node": "Collect the answers",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Skool answer": {
      "main": [
        [
          {
            "node": "Collect the answers",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "Collect the answers": {
      "main": [
        [
          {
            "node": "Sent now?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sent now?": {
      "main": [
        [
          {
            "node": "Read the post",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Checks and schedules",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read the post": {
      "main": [
        [
          {
            "node": "Live yet?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Live yet?": {
      "main": [
        [
          {
            "node": "Report",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait for the post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait for the post": {
      "main": [
        [
          {
            "node": "Read the post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Checks and schedules": {
      "main": [
        [
          {
            "node": "Any error?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Any error?": {
      "main": [
        [
          {
            "node": "A network ended with an error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  }
}
