This workflow automatically generates on-brand, video commercial clips from a submitted brief using AI-agent creative director, video generation and virtual audience validation. It takes a creative brief through a web form, creates an ad concept using GPT-4o, generates AI video clip, and then validates it with Rally's AI personas. Iteratively improving until the audience approves - all while maintaining a complete audit trail in Google Sheets.
Back to n8n Workflows
Rhys Fisher
Video Clip Generator

Generate contextually perfect video clip for commercials using an AI creative director agent, video generation, and AskRally audience validation. Features automatic iteration and improvement until virtual personas understand what is on offer.

Click to expand
Summarize in
OR
Summarize in
OR
Overview
📝 Step-by-Step Instructions
- Form Submission - User submits creatobe brief idea
- Initialize Counter - Sets up iteration tracking starting at attempt #1 for the feedback loop system
- Generate Video Prompt - OpenAI GPT-4o analyzes the brief and creates a detailed video prompt of what the featured video clip should be
- Format Description - Structures the AI-generated description for the image generation prompt
- Create Custom Video - Uses Fal API endpoints to prompt to generate the video
- Upload to Gdrive - Saves the generated video to gdrive
- Rally Audience Testing - Sends the video to Rally's AI personas asking "after watching this video, what is your takeaway?"
- Split Persona Responses - Processes individual responses from each AI persona in the audience simulation
- Format Individual Response - Extracts and structures each persona's reaction for aggregation
- Aggregate All Responses - Combines all persona reactions into a comprehensive response dataset
- Check Image Relevance - Uses GPT-4o to analyze persona feedback and determine if the video is a commercial for a company selling AI personas or synthetic research
- Evaluate Approval - Checks if the image meets relevance standards and iteration count is reasonable
- Log Final Results - Records successful image details to Google Sheets for audit trail
- Increment Counter - If not approved, increases attempt counter for the next iteration
- Rewrite Description - Based on persona feedback, creates an improved video description addressing specific concerns
- Format Improved Description - Structures the revised description for another generation attempt
- Loop Back - Returns to video generation step with improved description until audience approval is achieved
📋 Requirements
Required Integrations
- OpenAI - GPT-4o for image description writing and relevance checking, plus DALL-E for image generation
- Rally API - AI persona validation service for testing image appeal with virtual audiences
- Google Sheets - Complete audit trail and iteration tracking
- Fal.AI API Key - AI video generation tool
- Form Trigger - Web form interface for blog content input
Required Credentials
- OpenAI API key with GPT-4o and DALL-E image generation access
- Rally API Bearer token with persona audience access
- Google Sheets OAuth2 credentials with spreadsheet write permissions
- Fal.AI API Key
Setup Prerequisites
- Active Rally account with configured audience personas
- Google Sheets document for logging image generation sessions
- n8n instance with form trigger capability enabled
- Fal account with API and enough $ in credits (I've defaulted to a cheeper model to test)
🚀 n8n Workflow Template
{
"active": false,
"connections": {
"Call Rally": {
"main": [
[
{
"index": 0,
"node": "Split Out",
"type": "main"
}
]
]
},
"Check Relevance": {
"main": [
[
{
"index": 0,
"node": "IF Relevant",
"type": "main"
}
]
]
},
"Completed?": {
"main": [
[
{
"index": 0,
"node": "Get Url Video",
"type": "main"
}
],
[
{
"index": 0,
"node": "Wait 60 sec.",
"type": "main"
}
]
]
},
"Counter": {
"main": [
[
{
"index": 0,
"node": "IF Relevant",
"type": "main"
}
]
]
},
"Create Video1": {
"main": [
[
{
"index": 0,
"node": "Wait 60 sec.",
"type": "main"
}
]
]
},
"Description": {
"main": [
[
{
"index": 0,
"node": "Create Video1",
"type": "main"
}
]
]
},
"Download Vidoeo": {
"main": [
[
{
"index": 0,
"node": "upload file to rally",
"type": "main"
}
]
]
},
"Get File Video": {
"main": [
[
{
"index": 0,
"node": "Upload Drive",
"type": "main"
}
]
]
},
"Get Url Video": {
"main": [
[
{
"index": 0,
"node": "Get File Video",
"type": "main"
}
]
]
},
"Get status": {
"main": [
[
{
"index": 0,
"node": "Completed?",
"type": "main"
}
]
]
},
"IF Relevant": {
"main": [
[
{
"index": 0,
"node": "Sheets Fields",
"type": "main"
}
],
[
{
"index": 0,
"node": "Increment Counter",
"type": "main"
}
]
]
},
"Increment Counter": {
"main": [
[
{
"index": 0,
"node": "Rewrite Description",
"type": "main"
}
]
]
},
"On form submission": {
"main": [
[
{
"index": 0,
"node": "Write Description",
"type": "main"
},
{
"index": 0,
"node": "Counter",
"type": "main"
}
]
]
},
"Response": {
"main": [
[
{
"index": 0,
"node": "Responses",
"type": "main"
}
]
]
},
"Responses": {
"main": [
[
{
"index": 0,
"node": "Check Relevance",
"type": "main"
}
]
]
},
"Rewrite Description": {
"main": [
[
{
"index": 0,
"node": "Rewritten Description",
"type": "main"
}
]
]
},
"Rewritten Description": {
"main": [
[
{
"index": 0,
"node": "Create Video1",
"type": "main"
}
]
]
},
"Sheets Fields": {
"main": [
[
{
"index": 0,
"node": "Google Sheets",
"type": "main"
}
]
]
},
"Split Out": {
"main": [
[
{
"index": 0,
"node": "Response",
"type": "main"
}
]
]
},
"Upload Drive": {
"main": [
[
{
"index": 0,
"node": "Download Vidoeo",
"type": "main"
}
]
]
},
"Wait 60 sec.": {
"main": [
[
{
"index": 0,
"node": "Get status",
"type": "main"
}
]
]
},
"Write Description": {
"main": [
[
{
"index": 0,
"node": "Description",
"type": "main"
}
]
]
},
"upload file to rally": {
"main": [
[
{
"index": 0,
"node": "Call Rally",
"type": "main"
}
]
]
}
},
"id": "vKcEWBqGHl7A2kZY",
"meta": {
"instanceId": "7921b3cd29c1121b3ec4f2177acf06fe1f1325838297f593db7db4e9563eb98d",
"templateCredsSetupCompleted": true
},
"name": "Video Clip Relevance Testing",
"nodes": [
{
"id": "5e99c32d-af69-4016-b1e8-9b465e14d4a4",
"name": "On form submission",
"parameters": {
"formDescription": "We\u0027ll make an on-brand Rally video for you.",
"formFields": {
"values": [
{
"fieldLabel": "Creative Brief",
"requiredField": true
}
]
},
"formTitle": "Video Generator",
"options": {},
"responseMode": "lastNode"
},
"position": [
60,
140
],
"type": "n8n-nodes-base.formTrigger",
"typeVersion": 2.2,
"webhookId": "5af8d646-c0c7-45e1-a943-757612b2d452"
},
{
"id": "eeb86dcd-bc72-4016-b9f2-f2fd910a1db5",
"name": "Split Out",
"parameters": {
"fieldToSplitOut": "responses",
"options": {}
},
"position": [
1620,
700
],
"type": "n8n-nodes-base.splitOut",
"typeVersion": 1
},
{
"credentials": {
"openAiApi": {
"id": "5LyzIG7SUcgxGxlz",
"name": "OpenAi account 2"
}
},
"id": "526ffa17-8a78-428d-9e21-d8eee0d84d32",
"name": "Write Description",
"parameters": {
"messages": {
"values": [
{
"content": "You are an art director for a professional satire publication, and your job is to describe what the short 9 second video should be about when given a Creative brief. Be brief, and only return the details that are most essential to making an unforgettable image. Only return the description, no other text.",
"role": "system"
},
{
"content": "=Briefly describe what video would make sense for the creative brief on this blog post:\n\n# {{ $json[\"Creative Brief\"] }}\n"
}
]
},
"modelId": {
"__rl": true,
"cachedResultName": "CHATGPT-4O-LATEST",
"mode": "list",
"value": "chatgpt-4o-latest"
},
"options": {}
},
"position": [
280,
140
],
"type": "@n8n/n8n-nodes-langchain.openAi",
"typeVersion": 1.8
},
{
"id": "045a96ac-9211-44ae-aa56-ee9cb228561a",
"name": "Description",
"parameters": {
"assignments": {
"assignments": [
{
"id": "76861df4-8aa5-4ddf-99ba-908ab20f9c6e",
"name": "description",
"type": "string",
"value": "={{ $json.message.content }}"
}
]
},
"options": {}
},
"position": [
680,
140
],
"type": "n8n-nodes-base.set",
"typeVersion": 3.4
},
{
"credentials": {
"httpBearerAuth": {
"id": "wSoUK2sXm0c8MCMq",
"name": "Bearer Auth account 2"
}
},
"id": "22c259cc-35d5-42f2-b7b4-15bb4623c084",
"name": "Call Rally",
"parameters": {
"authentication": "genericCredentialType",
"genericAuthType": "httpBearerAuth",
"jsonBody": "={\n \"smart\": true,\n \"provider\": \"google\",\n \"audience_id\": \"r7ea561c4448543\",\n \"query\": \"after watching this video, what is your takeaway?\",\n \"files\": [\n {\n \"type\": \"video/mp4\",\n \"url\": \"{{ $node[\u0027upload file to rally\u0027].json.url }}\"\n }\n ],\n \"mode\": \"normal\",\n \"voting_mode\": false\n}",
"jsonHeaders": "={\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n}",
"method": "POST",
"options": {},
"sendBody": true,
"sendHeaders": true,
"specifyBody": "json",
"specifyHeaders": "json",
"url": "https://api.askrally.com/api/v1/chat"
},
"position": [
1380,
700
],
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2
},
{
"id": "db489ebc-455d-4d1f-8c17-47a0095748e7",
"name": "Response",
"parameters": {
"assignments": {
"assignments": [
{
"id": "89917b29-0c0e-4fde-aff2-7b0ad0a31ba0",
"name": "response",
"type": "string",
"value": "={{ $json.response }}"
}
]
},
"options": {}
},
"position": [
1820,
700
],
"type": "n8n-nodes-base.set",
"typeVersion": 3.4
},
{
"id": "375d11a3-9f04-402f-9837-f9a862369b48",
"name": "Responses",
"parameters": {
"fieldsToAggregate": {
"fieldToAggregate": [
{
"fieldToAggregate": "response",
"outputFieldName": "responses",
"renameField": true
}
]
},
"options": {}
},
"position": [
2040,
700
],
"type": "n8n-nodes-base.aggregate",
"typeVersion": 1
},
{
"credentials": {
"openAiApi": {
"id": "5LyzIG7SUcgxGxlz",
"name": "OpenAi account 2"
}
},
"id": "500bd660-84d3-45bc-90eb-44fb43fce997",
"name": "Check Relevance",
"parameters": {
"jsonOutput": true,
"messages": {
"values": [
{
"content": "=Do the user reactions to this video indicate that they have understood this is a commercial for a company selling AI personas or synthetic research capabilities?\n\nOnly respond in JSON with key option, value \"YES\", or \"NO\", and key \"feedback\" with brief instructions on what to change to make it more clear this is a commercial promoting AskRally, which lets you run simulations.\n\nResponses: \n{{ $json.responses }}"
}
]
},
"modelId": {
"__rl": true,
"cachedResultName": "CHATGPT-4O-LATEST",
"mode": "list",
"value": "chatgpt-4o-latest"
},
"options": {}
},
"position": [
1780,
940
],
"type": "@n8n/n8n-nodes-langchain.openAi",
"typeVersion": 1.8
},
{
"id": "33b56a24-29e8-490d-a9cf-ffb1d2af9b5f",
"name": "IF Relevant",
"parameters": {
"conditions": {
"combinator": "and",
"conditions": [
{
"id": "5dcad326-00a3-41fc-adb8-d9500454db42",
"leftValue": "={{ $json.message.content.option }}",
"operator": {
"name": "filter.operator.equals",
"operation": "equals",
"type": "string"
},
"rightValue": "=YES"
},
{
"id": "12af9e76-b85b-4a94-8fd8-b8f41edf8e9b",
"leftValue": null,
"operator": {
"operation": "lte",
"type": "number"
},
"rightValue": 3
}
],
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
}
},
"options": {}
},
"position": [
400,
620
],
"type": "n8n-nodes-base.if",
"typeVersion": 2.2
},
{
"credentials": {
"openAiApi": {
"id": "5LyzIG7SUcgxGxlz",
"name": "OpenAi account 2"
}
},
"id": "5a4ed1ce-9368-4542-9e78-494f6a28c9d1",
"name": "Rewrite Description",
"parameters": {
"messages": {
"values": [
{
"content": "You are an art director for a professional publication, and your job is to take some feedback from the users on a video commercial, and give direction on how to improve the image for the blog post. Be brief, and only return the details that are most essential to making an unforgettable image. Only return the description, no other text.",
"role": "system"
},
{
"content": "=Previous Description:\n{{ $(\u0027Description\u0027).item.json.description }}\n\nFeedback on Previous Description:\n{{ $(\u0027Check Relevance\u0027).item.json.message.content.feedback }}\n\nBriefly describe what image would make sense for the featured image on this blog post:\n\n# {{ $(\u0027On form submission\u0027).item.json[\u0027Blog Title\u0027] }}\n\n{{ $(\u0027On form submission\u0027).item.json[\u0027Blog Content\u0027] }}"
}
]
},
"modelId": {
"__rl": true,
"cachedResultName": "CHATGPT-4O-LATEST",
"mode": "list",
"value": "chatgpt-4o-latest"
},
"options": {}
},
"position": [
280,
380
],
"type": "@n8n/n8n-nodes-langchain.openAi",
"typeVersion": 1.8
},
{
"id": "b170ad8a-305a-4805-be24-d467a00bf247",
"name": "Rewritten Description",
"parameters": {
"assignments": {
"assignments": [
{
"id": "76861df4-8aa5-4ddf-99ba-908ab20f9c6e",
"name": "description",
"type": "string",
"value": "={{ $json.message.content }}"
}
]
},
"options": {}
},
"position": [
680,
380
],
"type": "n8n-nodes-base.set",
"typeVersion": 3.4
},
{
"id": "3db2ab65-1764-4928-9e12-f87e232817ca",
"name": "Sheets Fields",
"parameters": {
"assignments": {
"assignments": [
{
"id": "898e7050-6383-435c-874d-b1a391e0cce2",
"name": "creative_brief",
"type": "string",
"value": "="
},
{
"id": "11fe07a1-7a88-4330-b40c-15b469992f1b",
"name": "prompt",
"type": "string",
"value": "="
},
{
"id": "56163736-4341-4971-a169-0948228e86e8",
"name": "video_url",
"type": "string",
"value": "="
}
]
},
"options": {}
},
"position": [
600,
600
],
"type": "n8n-nodes-base.set",
"typeVersion": 3.4
},
{
"id": "c59cdae7-36fd-4d46-b73a-5ac7fbe129ac",
"name": "Increment Counter",
"parameters": {
"jsonOutput": "={{ { \"counter\": $json.counter + 1 } }}",
"mode": "raw",
"options": {}
},
"position": [
0,
620
],
"type": "n8n-nodes-base.set",
"typeVersion": 3.4
},
{
"id": "4f23cc49-0250-4ce8-8d14-9e2069394f90",
"name": "Counter",
"parameters": {
"assignments": {
"assignments": [
{
"id": "3c98c5b9-0080-44cf-bca6-678388569e58",
"name": "counter",
"type": "number",
"value": 1
}
]
},
"options": {}
},
"position": [
200,
620
],
"type": "n8n-nodes-base.set",
"typeVersion": 3.4
},
{
"id": "1864f9a1-d117-4bfd-bc62-31a40576ad14",
"name": "Sticky Note",
"parameters": {
"color": 4,
"content": "## Generate an video",
"height": 560,
"width": 1500
},
"position": [
900,
0
],
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1
},
{
"id": "789e515f-8538-4d47-a1d3-2bb29c5d3fb0",
"name": "Sticky Note1",
"parameters": {
"content": "## Generate a Description",
"height": 560,
"width": 940
},
"position": [
-60,
0
],
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1
},
{
"id": "cd0b5164-bdfc-4767-8bdc-ae9ec91e8f29",
"name": "Sticky Note2",
"parameters": {
"color": 5,
"content": "## Ask Rally Audience",
"height": 620,
"width": 1500
},
"position": [
900,
580
],
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1
},
{
"credentials": {
"httpHeaderAuth": {
"id": "nIInIL9RlBRoMNiE",
"name": "Header Auth account"
}
},
"id": "54a3f3a3-c94f-48ab-bbce-489ccdf30c4b",
"name": "Get status",
"parameters": {
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"options": {},
"url": "=https://queue.fal.run/fal-ai/kling-video/requests/{{ $(\u0027Create Video1\u0027).item.json.request_id }}/status"
},
"position": [
1460,
140
],
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2
},
{
"id": "aa1f210c-568a-414c-87bd-000b6e27947c",
"name": "Wait 60 sec.",
"parameters": {
"amount": 60
},
"position": [
1280,
140
],
"type": "n8n-nodes-base.wait",
"typeVersion": 1.1,
"webhookId": "490facb8-d0ae-402e-ab59-a87720cf0bdd"
},
{
"id": "35ea8af3-7bbc-47f9-bf14-bea3c0ed7b7f",
"name": "Completed?",
"parameters": {
"conditions": {
"combinator": "and",
"conditions": [
{
"id": "383d112e-2cc6-4dd4-8985-f09ce0bd1781",
"leftValue": "={{ $json.status }}",
"operator": {
"name": "filter.operator.equals",
"operation": "equals",
"type": "string"
},
"rightValue": "COMPLETED"
}
],
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
}
},
"options": {}
},
"position": [
1640,
140
],
"type": "n8n-nodes-base.if",
"typeVersion": 2.2
},
{
"credentials": {
"httpHeaderAuth": {
"id": "nIInIL9RlBRoMNiE",
"name": "Header Auth account"
}
},
"id": "efceb49f-2b34-4abb-aa84-adc7fef59c0e",
"name": "Get Url Video",
"parameters": {
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"options": {},
"url": "=https://queue.fal.run/fal-ai/kling-video/requests/{{$node[\"Create Video1\"].json[\"request_id\"]}}\n"
},
"position": [
1880,
140
],
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2
},
{
"credentials": {
"httpHeaderAuth": {
"id": "nIInIL9RlBRoMNiE",
"name": "Header Auth account"
}
},
"id": "26e2bda7-6919-4286-a9b7-afc0548bb338",
"name": "Create Video1",
"parameters": {
"authentication": "genericCredentialType",
"bodyParameters": {
"parameters": [
{
"name": "prompt",
"value": "={{$json.description}}"
}
]
},
"genericAuthType": "httpHeaderAuth",
"headerParameters": {
"parameters": [
{
"name": "Content-Type",
"value": "application/json"
}
]
},
"method": "POST",
"options": {},
"sendBody": true,
"sendHeaders": true,
"url": "https://queue.fal.run/fal-ai/kling-video/v1.6/pro/text-to-video"
},
"position": [
1000,
140
],
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2
},
{
"id": "adafb031-2998-429b-8f31-58946e02c95f",
"name": "Get File Video",
"parameters": {
"options": {},
"url": "={{ $node[\"Get Url Video\"].json.video.url }}"
},
"position": [
2060,
140
],
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2
},
{
"credentials": {
"googleDriveOAuth2Api": {
"id": "lolQfCBJjJ6XjXJ3",
"name": "Google Drive account"
}
},
"id": "fac46061-218d-4829-8036-dd5688bb63fe",
"name": "Upload Drive",
"parameters": {
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive"
},
"folderId": {
"__rl": true,
"mode": "url",
"value": "https://drive.google.com/drive/u/0/folders/1rF0NoHeZNau5RMClN9HNiZLW2v0JxwQO"
},
"options": {}
},
"position": [
1880,
400
],
"type": "n8n-nodes-base.googleDrive",
"typeVersion": 3
},
{
"credentials": {
"googleDriveOAuth2Api": {
"id": "lolQfCBJjJ6XjXJ3",
"name": "Google Drive account"
}
},
"id": "66457188-826d-4ea4-ab3b-a3cda70736a4",
"name": "Download Vidoeo",
"parameters": {
"fileId": {
"__rl": true,
"mode": "id",
"value": "={{ $json.id }}"
},
"operation": "download",
"options": {}
},
"position": [
2100,
400
],
"type": "n8n-nodes-base.googleDrive",
"typeVersion": 3
},
{
"credentials": {
"httpBearerAuth": {
"id": "wSoUK2sXm0c8MCMq",
"name": "Bearer Auth account 2"
}
},
"id": "90dbec42-ebf2-4763-b66b-a4d193a09f25",
"name": "upload file to rally",
"parameters": {
"authentication": "genericCredentialType",
"bodyParameters": {
"parameters": [
{
"inputDataFieldName": "data",
"name": "file",
"parameterType": "formBinaryData"
}
]
},
"contentType": "multipart-form-data",
"genericAuthType": "httpBearerAuth",
"method": "POST",
"options": {},
"sendBody": true,
"url": "https://api.askrally.com/api/v1/files/upload"
},
"position": [
1100,
700
],
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2
},
{
"id": "15593d90-2d00-4340-954b-e8e6c1b69455",
"name": "Sticky Note3",
"parameters": {
"color": 3,
"content": "### Choose your model \u261d\ufe0f \n#### Tip: use a more powerful model for better results. It\u0027s set on a cheaper one.\n",
"height": 120
},
"position": [
940,
320
],
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1
},
{
"id": "5da50c78-b86e-4898-bb60-cb7e9323e621",
"name": "Sticky Note4",
"parameters": {
"color": 3,
"content": "### set correct endpoint settings \ud83d\udc47 ",
"height": 80
},
"position": [
1900,
40
],
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1
},
{
"id": "22e82bc3-4b2c-4fc1-85fb-b8250b1ab8e6",
"name": "Sticky Note5",
"parameters": {
"color": 3,
"content": "### set correct endpoint settings \ud83d\udc47 ",
"height": 80
},
"position": [
1460,
40
],
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1
},
{
"id": "87b3c244-39a1-49c1-a070-4941dd6bbfee",
"name": "Sticky Note6",
"parameters": {
"color": 3,
"content": "### Adjust Prompt \ud83d\udc49",
"height": 80
},
"position": [
1520,
1000
],
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1
},
{
"id": "7766b79f-84b7-4191-b059-d766b16133ef",
"name": "Google Sheets",
"parameters": {
"documentId": {
"__rl": true,
"mode": "list",
"value": ""
},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": ""
}
},
"position": [
800,
600
],
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.6
}
],
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"tags": [],
"versionId": "7e25c527-a1fc-4e26-8025-600e42cda966"
}
About the Author

Rhys Fisher
Rhys Fisher is the COO & Co-Founder of Rally. He previously co-founded a boutique analytics agency called Unvanity, crossed the Pyrenees coast-to-coast via paraglider, and now watches virtual crowds respond to memes. Follow him on Twitter @virtual_rf