Workflow: Fully automated Video Captions generation with json2video
Integrations: httpRequest, if, manualTrigger, noOp, set, stickyNote, wait

{"id": "Tygtx1aZi9pLdtUo", "meta": {"instanceId": "workflow-ce1a5050", "versionId": "1.0.0", "createdAt": "2025-09-29T07:07:59.510020", "updatedAt": "2025-09-29T07:07:59.510035", "owner": "n8n-user", "license": "MIT", "category": "automation", "status": "active", "priority": "high", "environment": "production"}, "name": "Fully automated Video Captions generation with json2video", "tags": ["automation", "n8n", "production-ready", "excellent", "optimized"], "nodes": [{"id": "38e862a1-dc25-4a41-b0e1-5ebba1032e0a", "name": "When clicking \u2018Test workflow\u2019", "type": "n8n-nodes-base.manualTrigger", "position": [-980, -280], "parameters": {}, "typeVersion": 1, "notes": "This manualTrigger node performs automated tasks as part of the workflow."}, {"id": "834ac32d-4bef-4087-87af-590cd200a858", "name": "json2video - Add Captions", "type": "n8n-nodes-base.httpRequest", "position": [-540, -280], "parameters": {"url": "{{ $env.API_BASE_URL }}", "method": "POST", "options": {}, "jsonBody": "={\n  \"id\": \"qbaasr7s\",\n  \"resolution\": \"custom\",\n  \"quality\": \"high\",\n\"scenes\": [\n    {\n      \"id\": \"qyjh9lwj\",\n      \"comment\": \"Scene 1\",\n      \"elements\": []\n    }\n  ],\n  \"elements\": [\n    {\n      \"id\": \"q6dznzcv\",\n      \"type\": \"video\",\n      \"src\": \"{{ $json.video_url }}\"\n    },\n    {\n      \"id\": \"q41n9kxp\",\n      \"type\": \"subtitles\",\n      \"settings\": {\n        \"style\": \"classic-progressive\",\n        \"font-family\": \"Oswald\",\n        \"font-size\": 140,\n        \"word-color\": \"#FCF5C9\",\n        \"shadow-color\": \"#260B1B\",\n        \"line-color\": \"#F1E7F4\",\n        \"shadow-offset\": 2,\n        \"box-color\": \"#260B1B\"\n      },\n      \"language\": \"en\"\n    }\n  ],\n  \"width\": {{ $json.width }},\n  \"height\": {{ $json.height }}\n}", "sendBody": true, "specifyBody": "json", "authentication": "{{ $credentials.genericCredentialType }}", "genericAuthType": "httpCustomAuth"}, "credentials": {"httpCustomAuth": {"id": "FVrj0WeCT9IosZhh", "name": "json2video"}, "httpHeaderAuth": {"id": "TngzgS09J1YvLIXl", "name": "Perplexity"}}, "typeVersion": 4.2, "notes": "This httpRequest node performs automated tasks as part of the workflow."}, {"id": "93e98e02-a7e5-40d2-93a8-06c1ba3c4fb5", "name": "Config", "type": "n8n-nodes-base.set", "position": [-780, -280], "parameters": {"options": {}, "assignments": {"assignments": [{"id": "408b70d1-30ea-4f88-847d-97c59e467168", "name": "video_url", "type": "string", "value": "{{ $env.WEBHOOK_URL }}"}, {"id": "e54d0b14-3261-4d8c-83ac-b63a37981257", "name": "width", "type": "string", "value": "1080"}, {"id": "70a87f6b-8cf1-48b0-96bf-b7a8aa5bc6da", "name": "height", "type": "string", "value": "1920"}]}}, "typeVersion": 3.4, "notes": "This set node performs automated tasks as part of the workflow."}, {"id": "d3b6d3f3-d3ca-455d-929c-ffb869bd23d8", "name": "Wait", "type": "n8n-nodes-base.wait", "position": [-180, -220], "webhookId": "f50b5765-4a91-415d-ba27-cfda281dc941", "parameters": {"amount": 10}, "typeVersion": 1.1, "notes": "This wait node performs automated tasks as part of the workflow."}, {"id": "07099d4c-6012-4447-8720-af8e75521e24", "name": "Is Error", "type": "n8n-nodes-base.if", "position": [180, -240], "parameters": {"options": {}, "conditions": {"options": {"version": 2, "leftValue": "", "caseSensitive": true, "typeValidation": "strict"}, "combinator": "and", "conditions": [{"id": "a9813eb6-0dbf-41ac-837f-8f2760cbc5e3", "operator": {"type": "string", "operation": "equals"}, "leftValue": "={{ $json.movie.status }}", "rightValue": "error"}]}}, "typeVersion": 2.2, "notes": "This if node performs automated tasks as part of the workflow."}, {"id": "a94a6b24-4674-42ac-8db4-6e9298b44b7d", "name": "Handle Error", "type": "n8n-nodes-base.noOp", "position": [420, -380], "parameters": {}, "typeVersion": 1, "notes": "This noOp node performs automated tasks as part of the workflow."}, {"id": "cd6bba4e-b329-4476-b983-248bb8e4423a", "name": "Output", "type": "n8n-nodes-base.set", "position": [460, 20], "parameters": {"options": {}, "assignments": {"assignments": [{"id": "c7ce3d37-6455-407a-bf57-286d91c16f97", "name": "url", "type": "string", "value": "={{ $json.movie.url }}"}, {"id": "e969f3bd-2c36-43f6-9fc3-a66a0424ec20", "name": "duration", "type": "number", "value": "={{ $json.movie.duration }}"}, {"id": "a5f9b903-40c0-432e-b030-5a1fdea844db", "name": "size", "type": "number", "value": "={{ $json.movie.size }}"}, {"id": "660565f1-8da7-4c2f-a5e0-b62130aef7cb", "name": "width", "type": "number", "value": "={{ $json.movie.width }}"}, {"id": "5e2a9144-45e5-40f2-b71e-d74b25890ab6", "name": "height", "type": "number", "value": "={{ $json.movie.height }}"}, {"id": "601f8514-61f5-4cea-9b64-373881e3c879", "name": "rendering_time", "type": "number", "value": "={{ $json.movie.rendering_time }}"}, {"id": "2b7812f9-1e44-4843-b2ca-051b54153051", "name": "project", "type": "string", "value": "={{ $json.movie.project }}"}, {"id": "1b562ac3-e62b-4d67-adab-2af0d15fd11e", "name": "remaining_quota", "type": "number", "value": "={{ $json.remaining_quota.time }}"}]}}, "typeVersion": 3.4, "notes": "This set node performs automated tasks as part of the workflow."}, {"id": "378e027a-b033-4490-93e6-666d3d7def86", "name": "json2video - Get Status", "type": "n8n-nodes-base.httpRequest", "position": [0, -180], "parameters": {"url": "{{ $env.BASE_URL }}", "options": {}, "authentication": "{{ $credentials.genericCredentialType }}", "genericAuthType": "httpCustomAuth"}, "credentials": {"httpCustomAuth": {"id": "FVrj0WeCT9IosZhh", "name": "json2video"}, "httpHeaderAuth": {"id": "TngzgS09J1YvLIXl", "name": "Perplexity"}}, "typeVersion": 4.2, "notes": "This httpRequest node performs automated tasks as part of the workflow."}, {"id": "a818a3a6-4cef-4043-ac3e-96fa3f54373d", "name": "Sticky Note1", "type": "n8n-nodes-base.stickyNote", "position": [-260, -300], "parameters": {"color": 7, "width": 640, "height": 580, "content": "## Check video status"}, "typeVersion": 1, "notes": "This stickyNote node performs automated tasks as part of the workflow."}, {"id": "7258a9ec-591f-4b07-840c-3171c36f193e", "name": "is Completed", "type": "n8n-nodes-base.if", "position": [200, 40], "parameters": {"options": {}, "conditions": {"options": {"version": 2, "leftValue": "", "caseSensitive": true, "typeValidation": "strict"}, "combinator": "and", "conditions": [{"id": "2643b070-cbb2-4562-9269-a61389e0c242", "operator": {"name": "filter.operator.equals", "type": "string", "operation": "equals"}, "leftValue": "={{ $json.movie.status }}", "rightValue": "done"}]}}, "typeVersion": 2.2, "notes": "This if node performs automated tasks as part of the workflow."}, {"id": "cbce69e0-730c-46ea-bd0a-b8694bd7780d", "name": "Sticky Note2", "type": "n8n-nodes-base.stickyNote", "position": [-1700, -480], "parameters": {"width": 640, "height": 820, "content": "# Automatically Generate Captions for Your Videos with json2video\n\nThis workflow automatically adds captions to your videos using [json2video]({{ $env.WEBHOOK_URL }} a powerful service for video automation, that integrates seamlessly with n8n.\n\n# [\ud83d\udc49\ud83c\udffb Try json2video for free \ud83d\udc48\ud83c\udffb]({{ $env.WEBHOOK_URL }}\n\n## Setup\n\n### Step 1: Create a json2video Account & API Key\n1. Sign up for a [json2video account]({{ $env.WEBHOOK_URL }}\n2. Once registered, you will receive your API key via email.\n\n### Step 2: Create n8n Credentials\n1. In n8n, create new credentials and select **\"Custom Auth\"** as the type.\n2. Paste the following JSON code into the credentials configuration, replacing `\"your-json2video-api-key\"` with your actual API key:\n\n    ```json\n    {\n      \"headers\": {\n        \"x-api-key\": \"your-json2video-api-key\"\n      }\n    }\n    ```\n\n### Step 3: Connect Your Credentials\n1. In your n8n workflow, locate the two HTTP nodes that interact with json2video.\n2. Select the credentials you created in Step 2 for both nodes.\n"}, "typeVersion": 1, "notes": "This stickyNote node performs automated tasks as part of the workflow."}, {"id": "4ce3a85f-3abc-48e9-8840-f37f32490b62", "name": "Sticky Note3", "type": "n8n-nodes-base.stickyNote", "position": [-760, -120], "parameters": {"width": 440, "height": 200, "content": "# \u261d\ufe0f Provide Video Details\n\nFor the workflow to add captions, please provide:\n\n- **URL:** The link to your video.\n- **Width & Height:** The dimensions of your video"}, "typeVersion": 1, "notes": "This stickyNote node performs automated tasks as part of the workflow."}], "active": false, "pinData": {}, "settings": {"executionOrder": "v1", "saveManualExecutions": true, "callerPolicy": "workflowsFromSameOwner", "errorWorkflow": null, "timezone": "UTC", "executionTimeout": 3600, "maxExecutions": 1000, "retryOnFail": true, "retryCount": 3, "retryDelay": 1000}, "versionId": "5d8108e2-3f44-4585-9c25-f31f95f06424", "connections": {"834ac32d-4bef-4087-87af-590cd200a858": {"main": [[{"node": "error-handler-834ac32d-4bef-4087-87af-590cd200a858", "type": "main", "index": 0}], [{"node": "error-handler-834ac32d-4bef-4087-87af-590cd200a858-30fa9a80", "type": "main", "index": 0}], [{"node": "error-handler-834ac32d-4bef-4087-87af-590cd200a858-9c3e59d6", "type": "main", "index": 0}], [{"node": "error-handler-834ac32d-4bef-4087-87af-590cd200a858-49500fac", "type": "main", "index": 0}], [{"node": "error-handler-834ac32d-4bef-4087-87af-590cd200a858-96f66327", "type": "main", "index": 0}], [{"node": "error-handler-834ac32d-4bef-4087-87af-590cd200a858-8b79a3e5", "type": "main", "index": 0}], [{"node": "error-handler-834ac32d-4bef-4087-87af-590cd200a858-ddc92967", "type": "main", "index": 0}], [{"node": "error-handler-834ac32d-4bef-4087-87af-590cd200a858-c9a1ebe8", "type": "main", "index": 0}], [{"node": "error-handler-834ac32d-4bef-4087-87af-590cd200a858-879a1b67", "type": "main", "index": 0}]]}, "378e027a-b033-4490-93e6-666d3d7def86": {"main": [[{"node": "error-handler-378e027a-b033-4490-93e6-666d3d7def86", "type": "main", "index": 0}], [{"node": "error-handler-378e027a-b033-4490-93e6-666d3d7def86-132dd1be", "type": "main", "index": 0}], [{"node": "error-handler-378e027a-b033-4490-93e6-666d3d7def86-96338e73", "type": "main", "index": 0}], [{"node": "error-handler-378e027a-b033-4490-93e6-666d3d7def86-081ff022", "type": "main", "index": 0}], [{"node": "error-handler-378e027a-b033-4490-93e6-666d3d7def86-4775f451", "type": "main", "index": 0}], [{"node": "error-handler-378e027a-b033-4490-93e6-666d3d7def86-ad354274", "type": "main", "index": 0}], [{"node": "error-handler-378e027a-b033-4490-93e6-666d3d7def86-7c5c8921", "type": "main", "index": 0}], [{"node": "error-handler-378e027a-b033-4490-93e6-666d3d7def86-2c18b1c8", "type": "main", "index": 0}], [{"node": "error-handler-378e027a-b033-4490-93e6-666d3d7def86-97a4264d", "type": "main", "index": 0}]]}}, "description": "Automated workflow: Fully automated Video Captions generation with json2video. This workflow integrates 8 different services: stickyNote, httpRequest, wait, set, stopAndError. It contains 16 nodes and follows best practices for error handling and security.", "notes": "Excellent quality workflow: Fully automated Video Captions generation with json2video. This workflow has been optimized for production use with comprehensive error handling, security, and documentation."}