This workflow corresponds to n8n.io template #8158 — we link there as the canonical source.
This workflow follows the Chainllm → Google Drive recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"nodes": [
{
"id": "8f6d83d3-4eb2-4331-b1d7-54b083c91221",
"name": "Sticky Note7",
"type": "n8n-nodes-base.stickyNote",
"position": [
-928,
-80
],
"parameters": {
"color": 5,
"width": 528,
"height": 640,
"content": "## Muhammad Farooq Iqbal - Automation Expert & n8n Creator\n\nI am a passionate automation expert and recognized n8n Creator specializing in intelligent workflow automation. With extensive experience in n8n, AI automation, Zapier, and Make.com, I have created innovative workflow templates with 500+ downloads across the global automation community\n\n### Expertise\n- **Workflow Automation**: n8n, Zapier, Make.com, AI automation\n- **AI Integration**: Gemini AI, API integration, data processing\n- **Platform Mastery**: Google Sheets, Google Drive, custom scripts\n\n## Need Help with This Workflow?\n\nIf you face any issues with this workflow or need customization support, feel free to reach out:\n\n**\ud83d\udce7 Email**: mfarooqiqbal143@gmail.com \n**\ud83d\udcf1 Phone**: +923036991118 \n**\ud83d\udcbc LinkedIn**: [Connect with me](https://linkedin.com/in/muhammadfarooqiqbal) \n**\ud83c\udf10 Portfolio**: [View my work](https://mfarooqone.github.io/n8n/)\n\n*I'm always excited to help with automation challenges and workflow optimization!*\n"
},
"typeVersion": 1
},
{
"id": "d57e5004-7c16-4159-ba6f-8144da450e6c",
"name": "When clicking \u2018Execute workflow\u2019",
"type": "n8n-nodes-base.manualTrigger",
"position": [
208,
32
],
"parameters": {},
"typeVersion": 1
},
{
"id": "c266998e-0003-4ca7-af61-f081d109ecef",
"name": "If3",
"type": "n8n-nodes-base.if",
"position": [
384,
912
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "bc74b0c2-aa46-4bcd-91f3-1eb6b0720167",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.Status }}",
"rightValue": "pending"
}
]
}
},
"retryOnFail": true,
"typeVersion": 2.2
},
{
"id": "ee5e4ada-04e7-409d-8e83-a816b7aafea2",
"name": "Create folder",
"type": "n8n-nodes-base.googleDrive",
"position": [
816,
32
],
"parameters": {
"name": "={{ $json.output.folder_name }}",
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive"
},
"options": {},
"folderId": {
"__rl": true,
"mode": "list",
"value": "1GND1exvlAXTzESNvWmFs6FFMx90KLzlC",
"cachedResultUrl": "https://drive.google.com/drive/folders/1GND1exvlAXTzESNvWmFs6FFMx90KLzlC",
"cachedResultName": "prompt"
},
"resource": "folder"
},
"credentials": {
"googleDriveOAuth2Api": {
"name": "<your credential>"
}
},
"retryOnFail": true,
"typeVersion": 3
},
{
"id": "c4a016f9-cbe2-4d5a-8b69-1af4fd66da8d",
"name": "Json parser1",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
624,
160
],
"parameters": {
"jsonSchemaExample": "{\n \"folder_name\": \"folder name\"\n}"
},
"typeVersion": 1.3
},
{
"id": "871f8261-49ff-4174-836c-9e4331b59c30",
"name": "Folder Name",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"position": [
480,
-16
],
"parameters": {
"text": "=",
"batching": {},
"messages": {
"messageValues": [
{
"message": "=Act as a folder name suggistions \nSuggest a folder name for a emotional story\nalways give rendom name with time stamp"
}
]
},
"promptType": "define",
"hasOutputParser": true
},
"retryOnFail": true,
"typeVersion": 1.7
},
{
"id": "6031fed3-e65b-489c-8cfa-efa85a9df4bb",
"name": "Update row in sheet",
"type": "n8n-nodes-base.googleSheets",
"position": [
1808,
912
],
"parameters": {
"columns": {
"value": {
"Status": "created",
"Image Url": "={{ $json.id }}",
"row_number": "={{ $('Rows in sheet').item.json.row_number }}",
"Updated Prompt": "={{ $('Prompt converter1').item.json.output }}"
},
"schema": [
{
"id": "Scene",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Scene",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Character Prompt",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Character Prompt",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Action Prompt",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Action Prompt",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Voice Line (Roman Urdu)",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Voice Line (Roman Urdu)",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Status",
"type": "string",
"display": true,
"required": false,
"displayName": "Status",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Updated Prompt",
"type": "string",
"display": true,
"required": false,
"displayName": "Updated Prompt",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Image Url",
"type": "string",
"display": true,
"required": false,
"displayName": "Image Url",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "row_number",
"type": "number",
"display": true,
"removed": false,
"readOnly": true,
"required": false,
"displayName": "row_number",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"row_number"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "update",
"sheetName": {
"__rl": true,
"mode": "id",
"value": "={{ $('Create sheet').item.json.sheetId }}"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1k_0n-hFW8WRvNSW4izC5UdTA8KtO0VAOvuwlWkRsdPo",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1k_0n-hFW8WRvNSW4izC5UdTA8KtO0VAOvuwlWkRsdPo/edit?usp=drivesdk",
"cachedResultName": "Scenes Yusra"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"retryOnFail": true,
"typeVersion": 4.7
},
{
"id": "9f210c25-961b-4a46-9c47-1c02f6c8d716",
"name": "Generate an image",
"type": "@n8n/n8n-nodes-langchain.googleGemini",
"position": [
1328,
912
],
"parameters": {
"prompt": "={{ $json.output.prompt }} {{ $json.output.negative_prompt }} {{ $json.output.aspect_ratio }} {{ $json.output.camera_movement }} {{ $json.output.style }} {{ $json.output.quality }} {{ $json.output.seed }} {{ $json.output.fps }} {{ $json.output.resolution }} {{ $json.output.lighting }} {{ $json.output.mood }} {{ $json.output.mood }} {{ $json.output.color_palette }} {{ $json.output.subject_focus }} {{ $json.output.background }} {{ $json.output.effects }} ",
"modelId": {
"__rl": true,
"mode": "list",
"value": "models/gemini-2.0-flash-exp-image-generation",
"cachedResultName": "models/gemini-2.0-flash-exp-image-generation"
},
"options": {},
"resource": "image"
},
"credentials": {
"googlePalmApi": {
"name": "<your credential>"
}
},
"retryOnFail": true,
"typeVersion": 1
},
{
"id": "4fc42e92-5ab7-4ddc-a263-8242137dc50f",
"name": "Upload file",
"type": "n8n-nodes-base.googleDrive",
"position": [
1536,
912
],
"parameters": {
"name": "=s_{{ $('Rows in sheet').item.json.Scene }}.{{ $json.fileExtension || 'png' }}\n\n",
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive",
"cachedResultUrl": "https://drive.google.com/drive/my-drive",
"cachedResultName": "My Drive"
},
"options": {
"simplifyOutput": true
},
"folderId": {
"__rl": true,
"mode": "list",
"value": "1GND1exvlAXTzESNvWmFs6FFMx90KLzlC",
"cachedResultUrl": "https://drive.google.com/drive/folders/1GND1exvlAXTzESNvWmFs6FFMx90KLzlC",
"cachedResultName": "prompt"
}
},
"credentials": {
"googleDriveOAuth2Api": {
"name": "<your credential>"
}
},
"retryOnFail": true,
"typeVersion": 3
},
{
"id": "1a8ed5d0-1d5f-4010-9377-7ff890ddaf77",
"name": "Limit",
"type": "n8n-nodes-base.limit",
"position": [
608,
896
],
"parameters": {},
"retryOnFail": true,
"typeVersion": 1
},
{
"id": "b755de9c-57aa-441c-b1c3-a13b52596677",
"name": "Json parser2",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
1168,
976
],
"parameters": {
"jsonSchemaExample": "{\n \"prompt\": \"detailed scene description\",\n \"negative_prompt\": \"elements to avoid\",\n \"aspect_ratio\": \"width:height ratio\",\n \"camera_movement\": \"camera motion type\",\n \"style\": \"visual style/genre\",\n \"quality\": \"output quality setting\",\n \"motion_intensity\": \"low/medium/high\",\n \"seed\": \"random seed for reproducibility\",\n \"fps\": \"frames per second\",\n \"resolution\": \"video resolution\",\n \"lighting\": \"lighting conditions\",\n \"mood\": \"overall mood/atmosphere\",\n \"color_palette\": \"dominant colors\",\n \"subject_focus\": \"main subject details\",\n \"background\": \"background description\",\n \"effects\": \"special effects to include\"\n}"
},
"typeVersion": 1.3
},
{
"id": "4e5d22f1-f548-4731-bc4a-9241806096b6",
"name": "Prompt converter1",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"position": [
1024,
816
],
"parameters": {
"text": "={{ $json[\"Character Prompt\"] }} - {{ $json[\"Action Prompt\"] }}",
"batching": {},
"messages": {
"messageValues": [
{
"message": "=# Veo 3 Video Generation JSON Converter System Prompt\n\nYou are a specialized AI assistant that converts natural language descriptions into structured JSON format optimized for Veo 3 video generation. Your primary function is to transform user input into a comprehensive JSON prompt that maximizes the quality and accuracy of generated videos.\n\n## Core Instructions\n\n1. **Always respond in valid JSON format only**\n2. **Never include explanatory text outside the JSON structure**\n3. **Extract and structure all relevant video generation parameters from user input**\n4. **Fill in reasonable defaults for missing parameters**\n5. **Ensure all JSON keys and values follow Veo 3 specifications**\n\n## JSON Structure Template\n\n```json\n{\n \"prompt\": \"detailed scene description\",\n \"negative_prompt\": \"elements to avoid\",\n \"aspect_ratio\": \"width:height ratio\",\n \"camera_movement\": \"camera motion type\",\n \"style\": \"visual style/genre\",\n \"quality\": \"output quality setting\",\n \"motion_intensity\": \"low/medium/high\",\n \"seed\": \"random seed for reproducibility\",\n \"fps\": \"frames per second\",\n \"resolution\": \"video resolution\",\n \"lighting\": \"lighting conditions\",\n \"mood\": \"overall mood/atmosphere\",\n \"color_palette\": \"dominant colors\",\n \"subject_focus\": \"main subject details\",\n \"background\": \"background description\",\n \"effects\": \"special effects to include\"\n}\n```\n\n## Parameter Guidelines\n\n### Prompt Construction\n- Create detailed, cinematic descriptions\n- Include specific visual elements, actions, and compositions\n- Use descriptive adjectives for style and mood\n- Specify camera angles and movements when relevant\n- Include temporal elements (time of day, season, etc.)\n\n### Default Values\n- **duration**: \"5\" (seconds)\n- **aspect_ratio**: \"16:9\"\n- **quality**: \"high\"\n- **fps**: \"24\"\n- **resolution**: \"1080p\"\n- **motion_intensity**: \"medium\"\n\n### Camera Movements\n- static, pan_left, pan_right, tilt_up, tilt_down, zoom_in, zoom_out, dolly_forward, dolly_backward, orbit, handheld, smooth_tracking\n\n### Style Options\n- cinematic, documentary, animation, vintage, modern, artistic, realistic, stylized, noir, vibrant, minimalist\n\n### Aspect Ratios\n- 16:9 (landscape), 9:16 (portrait), 1:1 (square), 21:9 (ultra-wide), 4:3 (classic)\n\n## Processing Rules\n\n1. **Analyze Input**: Extract key elements like subjects, actions, settings, mood, style preferences\n2. **Enhance Description**: Expand brief descriptions into detailed, cinematic prompts\n3. **Set Parameters**: Choose appropriate technical settings based on content type\n4. **Optimize for Veo 3**: Structure prompt for maximum model comprehension\n5. **Include Negatives**: Add relevant negative prompts to avoid unwanted elements\n\n## Example Transformations\n\n**User Input**: \"A cat playing in the garden\"\n**Output**:\n```json\n{\n \"prompt\": \"A playful orange tabby cat chasing a butterfly in a sunlit garden, lush green grass, colorful flowers blooming, warm golden hour lighting, shallow depth of field, natural movement\",\n \"negative_prompt\": \"blurry, low quality, distorted, unnatural movement\",\n \"aspect_ratio\": \"16:9\",\n \"camera_movement\": \"smooth_tracking\",\n \"style\": \"cinematic\",\n \"quality\": \"high\",\n \"motion_intensity\": \"medium\",\n \"fps\": \"24\",\n \"resolution\": \"1080p\",\n \"lighting\": \"golden_hour\",\n \"mood\": \"cheerful\",\n \"color_palette\": \"warm_natural_tones\"\n}\n```\n\n## Important Notes\n\n- Always output valid JSON only\n- Never explain your reasoning outside the JSON\n- If input is unclear, make reasonable assumptions\n- Prioritize visual storytelling in prompt construction\n- Consider technical limitations of video generation\n- Optimize for realistic and achievable results\n\n## Quality Checklist\n\nBefore outputting JSON, ensure:\n- [ ] Prompt is detailed and descriptive\n- [ ] All technical parameters are appropriate\n- [ ] Negative prompt prevents common issues\n- [ ] JSON syntax is valid\n- [ ] All required fields are present\n- [ ] Values match expected formats"
}
]
},
"promptType": "define",
"hasOutputParser": true
},
"retryOnFail": true,
"typeVersion": 1.7
},
{
"id": "d9094fa4-f4aa-4f9a-9948-a8cea2213f21",
"name": "Move file",
"type": "n8n-nodes-base.googleDrive",
"position": [
640,
1328
],
"parameters": {
"fileId": {
"__rl": true,
"mode": "id",
"value": "={{ $json['Image Url'] }}"
},
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive",
"cachedResultUrl": "https://drive.google.com/drive/my-drive",
"cachedResultName": "My Drive"
},
"folderId": {
"__rl": true,
"mode": "id",
"value": "={{ $('Create folder').item.json.id }}"
},
"operation": "move"
},
"credentials": {
"googleDriveOAuth2Api": {
"name": "<your credential>"
}
},
"retryOnFail": true,
"typeVersion": 3
},
{
"id": "eb8dc23f-757a-4edc-83f8-e68d3cb0b010",
"name": "If",
"type": "n8n-nodes-base.if",
"position": [
400,
1344
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "bc74b0c2-aa46-4bcd-91f3-1eb6b0720167",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.Status }}",
"rightValue": "created"
}
]
}
},
"retryOnFail": true,
"typeVersion": 2.2
},
{
"id": "4eed5ff1-d6f7-48fb-9a97-5dd38204deab",
"name": "Update Moved",
"type": "n8n-nodes-base.googleSheets",
"position": [
816,
1328
],
"parameters": {
"columns": {
"value": {
"Status": "moved",
"row_number": "={{ $('Rows in sheet').item.json.row_number }}"
},
"schema": [
{
"id": "Scene",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Scene",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Character Prompt",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Character Prompt",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Action Prompt",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Action Prompt",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Voice Line (Roman Urdu)",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Voice Line (Roman Urdu)",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Status",
"type": "string",
"display": true,
"required": false,
"displayName": "Status",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Updated Prompt",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Updated Prompt",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Image Url",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Image Url",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "row_number",
"type": "number",
"display": true,
"removed": false,
"readOnly": true,
"required": false,
"displayName": "row_number",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"row_number"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "update",
"sheetName": {
"__rl": true,
"mode": "id",
"value": "={{ $('Create sheet').item.json.sheetId }}"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1k_0n-hFW8WRvNSW4izC5UdTA8KtO0VAOvuwlWkRsdPo",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1k_0n-hFW8WRvNSW4izC5UdTA8KtO0VAOvuwlWkRsdPo/edit?usp=drivesdk",
"cachedResultName": "Scenes Yusra"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"retryOnFail": true,
"typeVersion": 4.7
},
{
"id": "239f6485-6e0f-43bf-bc93-b1e9bf660b33",
"name": "Story Creator",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"position": [
384,
432
],
"parameters": {
"text": "=",
"batching": {},
"messages": {
"messageValues": [
{
"message": "=You act like a emotional story creator \nstory contains 5 scenes \nand a character which should be a pakistani girl age between 20 to 25 years old, in desi dress, named Yusra"
}
]
},
"promptType": "define",
"hasOutputParser": true
},
"retryOnFail": false,
"typeVersion": 1.7
},
{
"id": "d3aca0c9-b547-4489-a28a-4489c370b022",
"name": "Json parser",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
608,
608
],
"parameters": {
"jsonSchemaExample": " [\n {\n \"character_prompt\": \"character according to scene 1\",\n \"action_prompt\": \"Scene 1\"\n },\n {\n \"character_prompt\": \"character according to scene 2\",\n \"action_prompt\": \"Scene 2\"\n },\n {\n \"character_prompt\": \"character according to scene 3\",\n \"action_prompt\": \"Scene 3\"\n },\n {\n \"character_prompt\": \"character according to scene 4\",\n \"action_prompt\": \"Scene 4\"\n },\n {\n \"character_prompt\": \"character according to scene 5\",\n \"action_prompt\": \"5\"\n }\n ]\n\n"
},
"typeVersion": 1.3
},
{
"id": "f41101ea-1774-4560-96a4-9033b10292ae",
"name": "Append row in sheet",
"type": "n8n-nodes-base.googleSheets",
"position": [
1232,
480
],
"parameters": {
"columns": {
"value": {
"Scene": "Scene",
"Status": "pending",
"Action Prompt": "={{ $json.scene.action_prompt }}",
"Character Prompt": "={{ $json.scene.character_prompt }}"
},
"schema": [
{
"id": "Scene",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Scene",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Character Prompt",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Character Prompt",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Action Prompt",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Action Prompt",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Status",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Status",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Updated Prompt",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Updated Prompt",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Image Url",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Image Url",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "id",
"value": "={{ $('Create sheet').item.json.sheetId }}"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1k_0n-hFW8WRvNSW4izC5UdTA8KtO0VAOvuwlWkRsdPo",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1k_0n-hFW8WRvNSW4izC5UdTA8KtO0VAOvuwlWkRsdPo/edit?usp=drivesdk",
"cachedResultName": "Story Scenes"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.7
},
{
"id": "a3fc83b6-2f54-4b74-be25-3193762b5f4b",
"name": "Loop Over Items",
"type": "n8n-nodes-base.splitInBatches",
"position": [
960,
464
],
"parameters": {
"options": {}
},
"typeVersion": 3
},
{
"id": "59ab47dd-f8a6-47f1-80d5-a9d2ab00c98b",
"name": "Code",
"type": "n8n-nodes-base.code",
"position": [
720,
480
],
"parameters": {
"jsCode": "// Take the first input (your wrapper object) and explode its `output` array\nconst outputs = $input.first().json.output;\n\nconst out = [];\n\nfor (const o of outputs) {\n const { character_prompt, action_prompt } = o ?? {};\n out.push({\n json: {\n scene: {\n character_prompt,\n action_prompt,\n },\n },\n });\n}\n\nreturn out;\n"
},
"typeVersion": 2
},
{
"id": "f94b9f0a-f1e0-4c78-b7d2-7d240ed85180",
"name": "Create sheet",
"type": "n8n-nodes-base.googleSheets",
"position": [
944,
32
],
"parameters": {
"title": "={{ $json.name }}",
"options": {},
"operation": "create",
"documentId": {
"__rl": true,
"mode": "list",
"value": "1k_0n-hFW8WRvNSW4izC5UdTA8KtO0VAOvuwlWkRsdPo",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1k_0n-hFW8WRvNSW4izC5UdTA8KtO0VAOvuwlWkRsdPo/edit?usp=drivesdk",
"cachedResultName": "Story Scenes"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.7
},
{
"id": "e796adb0-b3c1-4491-a857-eca58fc379e6",
"name": "Edit Fields",
"type": "n8n-nodes-base.set",
"position": [
1072,
32
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "eda852cb-fc59-4745-94aa-b2a44e8c3b08",
"name": "Scene",
"type": "string",
"value": ""
},
{
"id": "4235efbd-ca02-451e-b6e3-69998b11ebf1",
"name": "Character Prompt",
"type": "string",
"value": ""
},
{
"id": "8d10881e-1b97-498a-9d8a-4f4e6cd6103f",
"name": "Action Prompt",
"type": "string",
"value": ""
},
{
"id": "f983fcb1-6792-410a-8092-8af6e6a84b36",
"name": "Status",
"type": "string",
"value": ""
},
{
"id": "745d40e4-ea48-4395-9741-785eed9a9d23",
"name": "Updated Prompt",
"type": "string",
"value": ""
},
{
"id": "b06bef27-9fc1-4d36-a2e5-7516c37c2f52",
"name": "Image Url",
"type": "string",
"value": ""
}
]
}
},
"typeVersion": 3.4
},
{
"id": "1b43c3fd-a60b-4b77-87e2-6f1f77a29127",
"name": "Append row in sheet1",
"type": "n8n-nodes-base.googleSheets",
"position": [
1200,
32
],
"parameters": {
"columns": {
"value": {},
"schema": [
{
"id": "Scene",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Scene",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Character Prompt",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Character Prompt",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Action Prompt",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Action Prompt",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Status",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Status",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Updated Prompt",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Updated Prompt",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Image Url",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Image Url",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "autoMapInputData",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "id",
"value": "={{ $('Create sheet').item.json.sheetId }}"
},
"documentId": {
"__rl": true,
"mode": "id",
"value": "={{ $('Create sheet').item.json.spreadsheetId }}"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.5
},
{
"id": "8bb2862d-c044-486e-96c3-202047d693a1",
"name": "Rows in sheet",
"type": "n8n-nodes-base.googleSheets",
"position": [
192,
912
],
"parameters": {
"options": {},
"sheetName": {
"__rl": true,
"mode": "id",
"value": "={{ $('Create sheet').item.json.sheetId }}"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1k_0n-hFW8WRvNSW4izC5UdTA8KtO0VAOvuwlWkRsdPo",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1k_0n-hFW8WRvNSW4izC5UdTA8KtO0VAOvuwlWkRsdPo/edit?usp=drivesdk",
"cachedResultName": "Story Scenes"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"retryOnFail": true,
"typeVersion": 4.7,
"alwaysOutputData": false
},
{
"id": "ac3f2d1c-0f98-4d62-a240-300ef84a6eda",
"name": "No Operation, do nothing",
"type": "n8n-nodes-base.noOp",
"position": [
1040,
1360
],
"parameters": {},
"typeVersion": 1
},
{
"id": "a4caeac4-c544-427b-a28d-fe38f8c0232f",
"name": "get updated rows",
"type": "n8n-nodes-base.googleSheets",
"position": [
176,
1344
],
"parameters": {
"options": {},
"sheetName": {
"__rl": true,
"mode": "id",
"value": "={{ $('Create sheet').item.json.sheetId }}"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1k_0n-hFW8WRvNSW4izC5UdTA8KtO0VAOvuwlWkRsdPo",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1k_0n-hFW8WRvNSW4izC5UdTA8KtO0VAOvuwlWkRsdPo/edit?usp=drivesdk",
"cachedResultName": "Story Scenes"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"retryOnFail": true,
"typeVersion": 4.7,
"alwaysOutputData": false
},
{
"id": "92af9dca-7ded-429d-a304-3271dcbdc594",
"name": "Wait",
"type": "n8n-nodes-base.wait",
"position": [
784,
912
],
"parameters": {
"unit": "minutes",
"amount": 1
},
"typeVersion": 1.1
},
{
"id": "c6a29597-4209-44fa-a75a-279ebf0cf139",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
96,
-80
],
"parameters": {
"color": 4,
"width": 1344,
"height": 384,
"content": "## Create Folder and File\n"
},
"typeVersion": 1
},
{
"id": "b9c0393a-7471-4c8a-b70b-7709b54a4e82",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
96,
352
],
"parameters": {
"color": 4,
"width": 1344,
"height": 384,
"content": "## Create Story & Add in Sheet\n"
},
"typeVersion": 1
},
{
"id": "41461520-f15d-46d0-be9d-703bd047883d",
"name": "chat model",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
480,
160
],
"parameters": {
"options": {},
"modelName": "models/gemini-2.5-flash-lite"
},
"credentials": {
"googlePalmApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "b099634a-f8cc-4382-97ff-dc8774b92253",
"name": "chat model1",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
448,
608
],
"parameters": {
"options": {},
"modelName": "models/gemini-2.5-flash-lite"
},
"credentials": {
"googlePalmApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "5e5787f3-dcc8-4139-933b-9ec16ebf9857",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
96,
784
],
"parameters": {
"color": 4,
"width": 1936,
"height": 384,
"content": "## Create Veo 3 Json Prompts & Images via Gemini"
},
"typeVersion": 1
},
{
"id": "33f5fe5a-4afa-40ef-be95-6180bed4d1d0",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
96,
1216
],
"parameters": {
"color": 4,
"width": 1152,
"height": 384,
"content": "## Move Files"
},
"typeVersion": 1
},
{
"id": "b25d1540-5ba4-4685-9931-22a25dd1fbda",
"name": "chat model2",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
1024,
976
],
"parameters": {
"options": {},
"modelName": "models/gemini-2.5-flash-lite"
},
"credentials": {
"googlePalmApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "b7ed1ac2-dcf3-4a47-b54b-98c31a90fe01",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-384,
-80
],
"parameters": {
"color": 5,
"width": 448,
"height": 512,
"content": "Here's a short setup description for your n8n template:\n\n**Setup Instructions:**\n\n1. **Import the workflow** into your n8n instance\n2. **Configure credentials:**\n - Google Drive OAuth2 (for file uploads)\n - Google Sheets OAuth2 (for tracking)\n - Google Gemini API key (for AI generation)\n3. **Update the Google Sheets document ID** in the workflow nodes\n4. **Set your Google Drive folder ID** for file organization\n5. **Test with manual trigger** to verify all connections work\n6. **Customize the story prompts** if needed (character, scenes, etc.)\n\n**Requirements:**\n- Gemini API access\n- Google Workspace account\n- n8n instance with required nodes\n\n**Ready to use!** Just click \"Execute workflow\" to start generating AI stories with images and Veo 3 prompts."
},
"typeVersion": 1
}
],
"connections": {
"If": {
"main": [
[
{
"node": "Move file",
"type": "main",
"index": 0
}
],
[
{
"node": "No Operation, do nothing",
"type": "main",
"index": 0
}
]
]
},
"If3": {
"main": [
[
{
"node": "Limit",
"type": "main",
"index": 0
}
],
[
{
"node": "get updated rows",
"type": "main",
"index": 0
}
]
]
},
"Code": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"Wait": {
"main": [
[
{
"node": "Prompt converter1",
"type": "main",
"index": 0
}
]
]
},
"Limit": {
"main": [
[
{
"node": "Wait",
"type": "main",
"index": 0
}
]
]
},
"Move file": {
"main": [
[
{
"node": "Update Moved",
"type": "main",
"index": 0
}
]
]
},
"chat model": {
"ai_languageModel": [
[
{
"node": "Folder Name",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Edit Fields": {
"main": [
[
{
"node": "Append row in sheet1",
"type": "main",
"index": 0
}
]
]
},
"Folder Name": {
"main": [
[
{
"node": "Create folder",
"type": "main",
"index": 0
}
]
]
},
"Json parser": {
"ai_outputParser": [
[
{
"node": "Story Creator",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Upload file": {
"main": [
[
{
"node": "Update row in sheet",
"type": "main",
"index": 0
}
]
]
},
"chat model1": {
"ai_languageModel": [
[
{
"node": "Story Creator",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"chat model2": {
"ai_languageModel": [
[
{
"node": "Prompt converter1",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Create sheet": {
"main": [
[
{
"node": "Edit Fields",
"type": "main",
"index": 0
}
]
]
},
"Json parser1": {
"ai_outputParser": [
[
{
"node": "Folder Name",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Json parser2": {
"ai_outputParser": [
[
{
"node": "Prompt converter1",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Update Moved": {
"main": [
[
{
"node": "get updated rows",
"type": "main",
"index": 0
}
]
]
},
"Create folder": {
"main": [
[
{
"node": "Create sheet",
"type": "main",
"index": 0
}
]
]
},
"Rows in sheet": {
"main": [
[
{
"node": "If3",
"type": "main",
"index": 0
}
]
]
},
"Story Creator": {
"main": [
[
{
"node": "Code",
"type": "main",
"index": 0
}
]
]
},
"Loop Over Items": {
"main": [
[],
[
{
"node": "Append row in sheet",
"type": "main",
"index": 0
}
]
]
},
"get updated rows": {
"main": [
[
{
"node": "If",
"type": "main",
"index": 0
}
]
]
},
"Generate an image": {
"main": [
[
{
"node": "Upload file",
"type": "main",
"index": 0
}
]
]
},
"Prompt converter1": {
"main": [
[
{
"node": "Generate an image",
"type": "main",
"index": 0
}
]
]
},
"Append row in sheet": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
},
{
"node": "Rows in sheet",
"type": "main",
"index": 0
}
]
]
},
"Update row in sheet": {
"main": [
[
{
"node": "Rows in sheet",
"type": "main",
"index": 0
}
]
]
},
"Append row in sheet1": {
"main": [
[
{
"node": "Story Creator",
"type": "main",
"index": 0
}
]
]
},
"When clicking \u2018Execute workflow\u2019": {
"main": [
[
{
"node": "Folder Name",
"type": "main",
"index": 0
}
]
]
}
}
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
googleDriveOAuth2ApigooglePalmApigoogleSheetsOAuth2Api
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
This n8n template demonstrates how to create an automated emotional story generation system that produces structured video prompts and generates corresponding images using AI. The workflow creates a complete story with 5 scenes featuring a Pakistani character named Yusra,…
Source: https://n8n.io/workflows/8158/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
This workflow automates batch video publishing prep from a Google Drive folder with AI-generated, platform-specific copy and a simple approval queue in Google Sheets. Perfect for Agencies, content cre
A fully automated Telegram-based personal finance tracker that: Accepts receipts as images, PDFs, or plain text Uses Google Gemini Vision for OCR & intelligent extraction Logs every expense into Googl
This is an exaple of advanced automated data extraction and enrichment pipeline with ScrapeGraphAI. Its primary purpose is to systematically scrape the n8n community workflows website, extract detaile
This workflow generates an 8-second product advertising video from a single input image. It downloads the image from Google Drive, converts it to base64 for the API request, analyzes it with Gemini (C
🚀 AI Resume Screener (n8n Workflow Template)