{ "name": "OpenShorts: video URL in, published-ready clips out (no polling)", "nodes": [ { "parameters": { "content": "## OpenShorts + n8n, the whole loop\n\n**One HTTP request starts the job, one signed webhook ends it.** No polling loop, no wait nodes.\n\n### Setup (3 steps)\n1. Create an API key at [openshorts.app](https://www.openshorts.app/) (account page, starts with `osk_`). Add a **Header Auth** credential: name `Authorization`, value `Bearer osk_...`, and select it in the *Start OpenShorts job* node.\n2. Open the *Clips ready* webhook node, copy its **production** URL, and paste it as `webhook_url` in the *Start OpenShorts job* node body.\n3. Optional: set your own `webhook_secret`. OpenShorts signs the body with HMAC-SHA256 in the `X-OpenShorts-Signature` header (`sha256=`), so you can verify the sender.\n\n### What you get back\n`event`, `job_id`, `status`, and `clips[]` with `title`, `video_url` and a 24h `download_url` per clip. Failed jobs also fire the webhook with an `error` field, so the flow never hangs.\n\nAPI docs: https://api.openshorts.app/docs \u00b7 Self-hosted works the same on your own machine (MIT).", "height": 460, "width": 480 }, "id": "note-setup", "name": "Sticky Note", "type": "n8n-nodes-base.stickyNote", "typeVersion": 1, "position": [ -560, -80 ] }, { "parameters": { "formTitle": "Clip a video with OpenShorts", "formDescription": "Paste a YouTube link (or any public video URL). You get 3-15 vertical clips with subtitles back.", "formFields": { "values": [ { "fieldLabel": "Video URL", "requiredField": true } ] }, "options": {} }, "id": "form-trigger", "name": "Video URL form", "type": "n8n-nodes-base.formTrigger", "typeVersion": 2, "position": [ -80, 0 ] }, { "parameters": { "method": "POST", "url": "https://api.openshorts.app/api/process", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendBody": true, "specifyBody": "json", "jsonBody": "={\n \"url\": \"{{ $json['Video URL'] }}\",\n \"acknowledged\": true,\n \"webhook_url\": \"PASTE_THE_PRODUCTION_URL_OF_THE_CLIPS-READY_WEBHOOK_NODE_HERE\",\n \"webhook_secret\": \"change-me\"\n}", "options": {} }, "id": "start-job", "name": "Start OpenShorts job", "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.2, "position": [ 180, 0 ], "credentials": { "httpHeaderAuth": { "name": "OpenShorts API key" } } }, { "parameters": { "assignments": { "assignments": [ { "id": "a1", "name": "job_id", "value": "={{ $json.job_id }}", "type": "string" }, { "id": "a2", "name": "status", "value": "={{ $json.status }}", "type": "string" } ] }, "options": {} }, "id": "job-queued", "name": "Job queued", "type": "n8n-nodes-base.set", "typeVersion": 3.4, "position": [ 440, 0 ] }, { "parameters": { "httpMethod": "POST", "path": "openshorts-clips-ready", "options": {} }, "id": "clips-webhook", "name": "Clips ready (webhook)", "type": "n8n-nodes-base.webhook", "typeVersion": 2, "position": [ -80, 320 ], "webhookId": "2f8351c1-d51d-4af7-bab3-57f21e07956d" }, { "parameters": { "conditions": { "options": { "caseSensitive": true, "typeValidation": "strict", "version": 2 }, "conditions": [ { "id": "c1", "leftValue": "={{ $json.body.event }}", "rightValue": "job.completed", "operator": { "type": "string", "operation": "equals" } } ], "combinator": "and" }, "options": {} }, "id": "if-completed", "name": "Job completed?", "type": "n8n-nodes-base.if", "typeVersion": 2.2, "position": [ 180, 320 ] }, { "parameters": { "fieldToSplitOut": "body.clips", "options": {} }, "id": "split-clips", "name": "One item per clip", "type": "n8n-nodes-base.splitOut", "typeVersion": 1, "position": [ 440, 220 ] }, { "parameters": { "assignments": { "assignments": [ { "id": "b1", "name": "title", "value": "={{ $json.title }}", "type": "string" }, { "id": "b2", "name": "download_url", "value": "={{ $json.download_url || $json.video_url }}", "type": "string" } ] }, "options": {} }, "id": "clip-links", "name": "Clip title + download link", "type": "n8n-nodes-base.set", "typeVersion": 3.4, "position": [ 700, 220 ] }, { "parameters": { "assignments": { "assignments": [ { "id": "e1", "name": "job_id", "value": "={{ $json.body.job_id }}", "type": "string" }, { "id": "e2", "name": "error", "value": "={{ $json.body.error }}", "type": "string" } ] }, "options": {} }, "id": "job-failed", "name": "Job failed", "type": "n8n-nodes-base.set", "typeVersion": 3.4, "position": [ 440, 420 ] }, { "parameters": { "content": "## Do something with the clips\n\nConnect *Clip title + download link* to whatever comes next: a Slack or email notification, a Google Sheet log, or post them directly via `POST /api/social/post`.\n\nEach item here is one finished 9:16 clip with subtitles burned in.", "height": 220, "width": 340 }, "id": "note-next", "name": "Sticky Note 2", "type": "n8n-nodes-base.stickyNote", "typeVersion": 1, "position": [ 960, 180 ] } ], "connections": { "Video URL form": { "main": [ [ { "node": "Start OpenShorts job", "type": "main", "index": 0 } ] ] }, "Start OpenShorts job": { "main": [ [ { "node": "Job queued", "type": "main", "index": 0 } ] ] }, "Clips ready (webhook)": { "main": [ [ { "node": "Job completed?", "type": "main", "index": 0 } ] ] }, "Job completed?": { "main": [ [ { "node": "One item per clip", "type": "main", "index": 0 } ], [ { "node": "Job failed", "type": "main", "index": 0 } ] ] }, "One item per clip": { "main": [ [ { "node": "Clip title + download link", "type": "main", "index": 0 } ] ] } }, "settings": { "executionOrder": "v1" }, "pinData": {} }