Invalid JSON:Expected double-quoted property name in JSONat line 195, column 13
| { | |
| "name": "UGC Single Video Generator", | |
| "nodes": [ | |
| { | |
| "parameters": { | |
| "conditions": { | |
| "options": { | |
| "caseSensitive": true, | |
| "leftValue": "", | |
| "typeValidation": "strict", | |
| "version": 1 | |
| }, | |
| "conditions": [ | |
| { | |
| "id": "c6c12c9a-3622-427b-b12c-fee98864612b", | |
| "leftValue": "=={{ $json.generate_script ? 'yes' : '' }}", | |
| "rightValue": "true", | |
| "operator": { | |
| "type": "string", | |
| "operation": "notEmpty", | |
| "singleValue": true | |
| } | |
| } | |
| ], | |
| "combinator": "and" | |
| }, | |
| "options": {} | |
| }, | |
| "name": "Script Decision", | |
| "type": "n8n-nodes-base.if", | |
| "typeVersion": 2, | |
| "position": [ | |
| -2704, | |
| 144 | |
| ], | |
| "id": "9a304dcc-d4a5-4f73-b9c4-3c38e166d23e" | |
| }, | |
| { | |
| "parameters": { | |
| "jsCode": "const video_description = $json.video_description || '';\nconst influencer_type = $json.influencer_type || '';\nconst custom_script = $json.custom_script || '';\nconst generate_script = $json.generate_script === true || $json.generate_script === 'true';\nconst aspect_ratio = $json.aspect_ratio || '9:16';\nconst model = 'veo3_fast';\n\n// Decide which script to use\nlet final_script = '';\nif (generate_script) {\n final_script = `Based on your description: ${video_description}`;\n} else {\n final_script = custom_script || video_description;\n}\n\nreturn [{\n json: {\n video_description,\n influencer_type,\n aspect_ratio,\n model,\n final_script\n }\n}];\n" | |
| }, | |
| "name": "Determine Final Script", | |
| "type": "n8n-nodes-base.code", | |
| "typeVersion": 2, | |
| "position": [ | |
| -2208, | |
| 128 | |
| ], | |
| "id": "a4c9891b-1959-411a-8af5-459ef12da255" | |
| }, | |
| { | |
| "parameters": { | |
| "jsCode": "const videoDesc = $json.video_description;\nconst influencerType = $json.influencer_type;\nconst script = $json.final_script;\nconst imageAnalysis = $json.response || 'casual indoor setting with natural lighting';\nconst aspectRatio = $json.aspect_ratio;\nconst referenceImageUrl = $json.reference_image_url;\nconst model = $json.model;\n\n// Create image prompt for generation\nconst imagePrompt = `emotion: relaxed and friendly\\naction: ${videoDesc}\\ncharacter: ${influencerType}\\nsetting: Casual indoor environment with natural lighting, authentic UGC style\\nstyle: iPhone selfie video, slightly uneven framing, authentic amateur quality`;\n\n// Create video prompt with dialogue\nconst videoPrompt = `dialogue: ${script}\\nemotion: Playful, authentic, genuine excitement\\naction: ${videoDesc}, speaking naturally while gesturing, making eye contact with camera\\nvoice_type: ${influencerType} casual male voice\\ncharacter: ${influencerType}\\nsetting: ${imageAnalysis}`;\n\nreturn [{\n json: {\n image_prompt: imagePrompt,\n video_prompt: videoPrompt,\n aspect_ratio: aspectRatio,\n reference_image_url: referenceImageUrl,\n model: model\n }\n}];" | |
| }, | |
| "name": "Create Prompts", | |
| "type": "n8n-nodes-base.code", | |
| "typeVersion": 2, | |
| "position": [ | |
| -2000, | |
| 128 | |
| ], | |
| "id": "d06ee6f4-db8d-4e76-ae32-26cd56bf5457" | |
| }, | |
| { | |
| "parameters": { | |
| "method": "POST", | |
| "url": "https://api.kie.ai/api/v1/veo/generate", | |
| "sendHeaders": true, | |
| "headerParameters": { | |
| "parameters": [ | |
| { | |
| "name": "Authorization", | |
| "value": "Bearer {{ $env.API_KEY }}" | |
| }, | |
| { | |
| "name": "Content-Type", | |
| "value": "application/json" | |
| } | |
| ] | |
| }, | |
| "sendBody": true, | |
| "bodyParameters": { | |
| "parameters": [ | |
| { | |
| "name": "prompt", | |
| "value": "={{ $json.video_prompt }}" | |
| }, | |
| { | |
| "name": "model", | |
| "value": "veo3_fast" | |
| }, | |
| { | |
| "name": "aspectRatio", | |
| "value": "9:16" | |
| } | |
| ] | |
| }, | |
| "options": {} | |
| }, | |
| "name": "Generate Video", | |
| "type": "n8n-nodes-base.httpRequest", | |
| "typeVersion": 4.2, | |
| "position": [ | |
| -1808, | |
| 128 | |
| ], | |
| "id": "80681c35-dc58-465b-a97d-0af508e3d8e3", | |
| "alwaysOutputData": true | |
| }, | |
| { | |
| "parameters": { | |
| "conditions": { | |
| "options": { | |
| "caseSensitive": true, | |
| "leftValue": "", | |
| "typeValidation": "strict", | |
| "version": 1 | |
| }, | |
| "conditions": [ | |
| { | |
| "id": "7d311e3b-504a-4904-8461-7b277f71c859", | |
| "leftValue": "={{ $json.code }}\n\n\n\n\n", | |
| "rightValue": "={{ 200 }}", | |
| "operator": { | |
| "type": "dateTime", | |
| "operation": "equals" | |
| } | |
| } | |
| ], | |
| "combinator": "and" | |
| }, | |
| "options": {} | |
| }, | |
| "name": "Check Video Success", | |
| "type": "n8n-nodes-base.if", | |
| "typeVersion": 2, | |
| "position": [ | |
| -1616, | |
| 128 | |
| ], | |
| "id": "546cb7a2-9502-4666-a403-0000eea5b95d" | |
| }, | |
| { | |
| "parameters": { | |
| "url": "=https://api.kie.ai/api/v1/veo/record-info?taskId={{ $json.data.taskId }}\n", | |
| "sendHeaders": true, | |
| "headerParameters": { | |
| "parameters": [ | |
| { | |
| "name": "Authorization", | |
| "value": "Bearer {{ $env.API_KEY }}" | |
| }, | |
| { | |
| "name": "Content-Type", | |
| "value": "application/json" | |
| } | |
| ] | |
| }, | |
| "options": {} | |
| }, | |
| "name": "Get Video File", | |
| "type": "n8n-nodes-base.httpRequest", | |
| "typeVersion": 4.2, | |
| "position": [ | |
| -1408, | |
| 16 | |
| ], | |
| "id": "83062bfd-a67a-47bd-a98b-8944a968eb02" | |
| }, | |
| { | |
| "parameters": { | |
| "jsCode": "return [{\n json: {\n video_url: $json.data?.response?.resultUrls?.[0] || null,\n status: ($json.data?.successFlag === 1 && ($json.data?.errorCode == null)) ? 'completed' : 'unknown',\n task_id: $json.data?.taskId,\n resolution: $json.data?.response?.resolution || null\n }\n}];\n" | |
| }, | |
| "name": "Output Result", | |
| "type": "n8n-nodes-base.code", | |
| "typeVersion": 2, | |
| "position": [ | |
| -1216, | |
| 16 | |
| ], | |
| "id": "0d3f9890-60ba-45f0-bd92-8b19073bf26d" | |
| }, | |
| { | |
| "parameters": { | |
| "method": "POST", | |
| "url": "https://api.anthropic.com/v1/messages", | |
| "authentication": "genericCredentialType", | |
| "genericAuthType": "httpHeaderAuth", | |
| "sendHeaders": true, | |
| "headerParameters": { | |
| "parameters": [ | |
| { | |
| "name": "x-api-key", | |
| "value": "Bearer {{ $env.API_KEY }}", | |
| { | |
| "name": "anthropic-version", | |
| "value": "2023-06-01" | |
| } | |
| ] | |
| }, | |
| "sendBody": true, | |
| "specifyBody": "json", | |
| "jsonBody": "={\n \"model\": \"claude-sonnet-4-5\",\n \"max_tokens\": 200,\n \"messages\": [{\n \"role\": \"user\",\n \"content\": \"Generate a casual UGC script for: {{ $json.video_description }}. Influencer type: {{ $json.influencer_type }}. Keep it under 200 characters, natural and conversational.\"\n }]\n}\n", | |
| "options": {} | |
| }, | |
| "type": "n8n-nodes-base.httpRequest", | |
| "typeVersion": 4.2, | |
| "position": [ | |
| -2448, | |
| 128 | |
| ], | |
| "id": "c0c75304-7527-4ff1-ba9e-83909fb4c5d4", | |
| "name": "HTTP Request", | |
| "credentials": { | |
| "httpHeaderAuth": { | |
| "id": "L6V0FSG3iJYjCx9v", | |
| "name": "Header Auth account" | |
| } | |
| } | |
| }, | |
| { | |
| "parameters": { | |
| "httpMethod": "POST", | |
| "path": "UGC Video Generator", | |
| "responseMode": "lastNode", | |
| "options": {} | |
| }, | |
| "type": "n8n-nodes-base.webhook", | |
| "typeVersion": 2.1, | |
| "position": [ | |
| -944, | |
| 0 | |
| ], | |
| "id": "5a4ed71f-82fb-45b9-ba06-12e971cf6e5d", | |
| "name": "Webhook", | |
| "webhookId": "2d2f24ff-f822-4786-a865-fd0f162b5db3" | |
| }, | |
| { | |
| "parameters": { | |
| "formTitle": "UGC Video Creator", | |
| "formDescription": "Create UGC (User Generated Videos) instantly — just enter your product details, influencer type, and script (or let the tool generate it automatically).", | |
| "formFields": { | |
| "values": [ | |
| { | |
| "fieldLabel": "Briefly describe what happens in your video", | |
| "fieldType": "textarea", | |
| "placeholder": "Man reviewing a beer brand CherryBrew, holding bottle of CherryBrew and speaking enthusiastically to camera", | |
| "requiredField": true | |
| }, | |
| { | |
| "fieldLabel": "Describe the type of influencer or person you’d like to promote your product — for example, their age, gender, style, tone, or audience.", | |
| "fieldType": "textarea", | |
| "placeholder": "28-year-old German male with short blond hair, casual tshirt, friendly and approachable appearance, speaking in English", | |
| "requiredField": true | |
| }, | |
| { | |
| "fieldLabel": "Generate script automatically based on video description", | |
| "fieldType": "checkbox", | |
| "fieldOptions": { | |
| "values": [ | |
| { | |
| "option": "Generate script automatically based on video description" | |
| } | |
| ] | |
| }, | |
| "limitSelection": "exact" | |
| }, | |
| { | |
| "fieldLabel": "Add custom script", | |
| "placeholder": "Hey everyone! Just tried CherryBrew for the first time — and wow, it’s honestly refreshing! The cherry flavor is bold but not too sweet, and it has that perfect smooth finish. If you’re looking for something new to kick back with this weekend, CherryBrew is a must-try!" | |
| }, | |
| { | |
| "fieldLabel": "Choose an aspect ratio of the video", | |
| "fieldType": "dropdown", | |
| "fieldOptions": { | |
| "values": [ | |
| { | |
| "option": "9:16" | |
| }, | |
| { | |
| "option": "16:9" | |
| } | |
| ] | |
| }, | |
| "requiredField": true | |
| } | |
| ] | |
| }, | |
| "options": {} | |
| }, | |
| "type": "n8n-nodes-base.formTrigger", | |
| "typeVersion": 2.3, | |
| "position": [ | |
| -3088, | |
| 144 | |
| ], | |
| "id": "0a537c3d-49ca-4109-8ee0-34510a5e2260", | |
| "name": "On form submission", | |
| "webhookId": "e835f6da-50a3-46e4-a69f-d5731b9f9323" | |
| }, | |
| { | |
| "parameters": { | |
| "assignments": { | |
| "assignments": [ | |
| { | |
| "id": "32e61eab-e624-49fd-a4d3-f8e5231601a9", | |
| "name": "model", | |
| "value": "veo3_fast", | |
| "type": "string" | |
| } | |
| ] | |
| }, | |
| "includeOtherFields": true, | |
| "options": {} | |
| }, | |
| "type": "n8n-nodes-base.set", | |
| "typeVersion": 3.4, | |
| "position": [ | |
| -2912, | |
| 144 | |
| ], | |
| "id": "2a1ce673-e4c8-4f26-a68f-05025a1bf2fe", | |
| "name": "Edit Fields" | |
| } | |
| ], | |
| "pinData": {}, | |
| "connections": { | |
| "Script Decision": { | |
| "main": [ | |
| [ | |
| { | |
| "node": "HTTP Request", | |
| "type": "main", | |
| "index": 0 | |
| } | |
| ], | |
| [] | |
| ] | |
| }, | |
| "Create Prompts": { | |
| "main": [ | |
| [ | |
| { | |
| "node": "Generate Video", | |
| "type": "main", | |
| "index": 0 | |
| } | |
| ] | |
| ] | |
| }, | |
| "Generate Video": { | |
| "main": [ | |
| [ | |
| { | |
| "node": "Check Video Success", | |
| "type": "main", | |
| "index": 0 | |
| } | |
| ] | |
| ] | |
| }, | |
| "Check Video Success": { | |
| "main": [ | |
| [ | |
| { | |
| "node": "Get Video File", | |
| "type": "main", | |
| "index": 0 | |
| } | |
| ] | |
| ] | |
| }, | |
| "Get Video File": { | |
| "main": [ | |
| [ | |
| { | |
| "node": "Output Result", | |
| "type": "main", | |
| "index": 0 | |
| } | |
| ] | |
| ] | |
| }, | |
| "Determine Final Script": { | |
| "main": [ | |
| [ | |
| { | |
| "node": "Create Prompts", | |
| "type": "main", | |
| "index": 0 | |
| } | |
| ] | |
| ] | |
| }, | |
| "HTTP Request": { | |
| "main": [ | |
| [ | |
| { | |
| "node": "Determine Final Script", | |
| "type": "main", | |
| "index": 0 | |
| } | |
| ] | |
| ] | |
| }, | |
| "Edit Fields": { | |
| "main": [ | |
| [ | |
| { | |
| "node": "Script Decision", | |
| "type": "main", | |
| "index": 0 | |
| } | |
| ] | |
| ] | |
| }, | |
| "On form submission": { | |
| "main": [ | |
| [ | |
| { | |
| "node": "Edit Fields", | |
| "type": "main", | |
| "index": 0 | |
| } | |
| ] | |
| ] | |
| } | |
| }, | |
| "active": false, | |
| "settings": { | |
| "executionOrder": "v1" | |
| }, | |
| "versionId": "c83f8247-8049-43bd-9946-b5217115f904", | |
| "meta": { | |
| "templateCredsSetupCompleted": true, | |
| "instanceId": "33add492471a02583742713d5a307b5c67421a0d97bd40b5c07ae1b0d78c2bd4" | |
| }, | |
| "id": "eiLgIhaurAVr1z1g", | |
| "tags": [] | |
| } |