使用Gemini AI创建情感故事:生成图片和Veo3 JSON提示
高级
这是一个Content Creation、Multimodal AI领域的自动化工作流,包含 35 个节点。主要使用 If、Set、Code、Wait、Limit 等节点。 使用Gemini AI创建情感故事:生成图片和Veo3 JSON提示
前置要求
- •Google Drive API 凭证
- •Google Sheets API 凭证
- •Google Gemini API Key
使用的节点 (35 个)
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"meta": {
"instanceId": "aa8f1cf0c4d8087e25a2eea962da249799481d2fb992314793977a97a5e71d77"
},
"nodes": [
{
"id": "8f6d83d3-4eb2-4331-b1d7-54b083c91221",
"name": "## 试试看!",
"type": "n8n-nodes-base.stickyNote",
"position": [
-928,
-80
],
"parameters": {
"color": 5,
"width": 528,
"height": 640,
"content": "## Muhammad Farooq Iqbal - 自动化专家 & n8n 创作者"
},
"typeVersion": 1
},
{
"id": "d57e5004-7c16-4159-ba6f-8144da450e6c",
"name": "当点击‘执行工作流’时",
"type": "n8n-nodes-base.manualTrigger",
"position": [
208,
32
],
"parameters": {},
"typeVersion": 1
},
{
"id": "c266998e-0003-4ca7-af61-f081d109ecef",
"name": "如果3",
"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": "创建文件夹",
"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": {
"id": "1Bnhm02w1dxE4FO6",
"name": "Farooq Google Drive account"
}
},
"retryOnFail": true,
"typeVersion": 3
},
{
"id": "c4a016f9-cbe2-4d5a-8b69-1af4fd66da8d",
"name": "Json 解析器1",
"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": "文件夹名称",
"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": "更新表格中的行",
"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": {
"id": "bAnK8T185A3Wr7Kj",
"name": "Google Sheets account"
}
},
"retryOnFail": true,
"typeVersion": 4.7
},
{
"id": "9f210c25-961b-4a46-9c47-1c02f6c8d716",
"name": "生成图像",
"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": {
"id": "qzXOJEaYeexWZRUf",
"name": "new key"
}
},
"retryOnFail": true,
"typeVersion": 1
},
{
"id": "4fc42e92-5ab7-4ddc-a263-8242137dc50f",
"name": "上传文件",
"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": {
"id": "1Bnhm02w1dxE4FO6",
"name": "Farooq Google Drive account"
}
},
"retryOnFail": true,
"typeVersion": 3
},
{
"id": "1a8ed5d0-1d5f-4010-9377-7ff890ddaf77",
"name": "限制",
"type": "n8n-nodes-base.limit",
"position": [
608,
896
],
"parameters": {},
"retryOnFail": true,
"typeVersion": 1
},
{
"id": "b755de9c-57aa-441c-b1c3-a13b52596677",
"name": "Json 解析器2",
"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": "提示转换器1",
"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": "移动文件",
"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": {
"id": "1Bnhm02w1dxE4FO6",
"name": "Farooq Google Drive account"
}
},
"retryOnFail": true,
"typeVersion": 3
},
{
"id": "eb8dc23f-757a-4edc-83f8-e68d3cb0b010",
"name": "如果",
"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": "更新已移动",
"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": {
"id": "bAnK8T185A3Wr7Kj",
"name": "Google Sheets account"
}
},
"retryOnFail": true,
"typeVersion": 4.7
},
{
"id": "239f6485-6e0f-43bf-bc93-b1e9bf660b33",
"name": "故事创建器",
"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 解析器",
"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": "在表格中追加行",
"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": {
"id": "bAnK8T185A3Wr7Kj",
"name": "Google Sheets account"
}
},
"typeVersion": 4.7
},
{
"id": "a3fc83b6-2f54-4b74-be25-3193762b5f4b",
"name": "遍历项目",
"type": "n8n-nodes-base.splitInBatches",
"position": [
960,
464
],
"parameters": {
"options": {}
},
"typeVersion": 3
},
{
"id": "59ab47dd-f8a6-47f1-80d5-a9d2ab00c98b",
"name": "代码",
"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": "创建工作表",
"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": {
"id": "bAnK8T185A3Wr7Kj",
"name": "Google Sheets account"
}
},
"typeVersion": 4.7
},
{
"id": "e796adb0-b3c1-4491-a857-eca58fc379e6",
"name": "编辑字段",
"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": "在工作表1中追加行",
"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": {
"id": "bAnK8T185A3Wr7Kj",
"name": "Google Sheets account"
}
},
"typeVersion": 4.5
},
{
"id": "8bb2862d-c044-486e-96c3-202047d693a1",
"name": "工作表中的行",
"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": {
"id": "bAnK8T185A3Wr7Kj",
"name": "Google Sheets account"
}
},
"retryOnFail": true,
"typeVersion": 4.7,
"alwaysOutputData": false
},
{
"id": "ac3f2d1c-0f98-4d62-a240-300ef84a6eda",
"name": "无操作,什么都不做",
"type": "n8n-nodes-base.noOp",
"position": [
1040,
1360
],
"parameters": {},
"typeVersion": 1
},
{
"id": "a4caeac4-c544-427b-a28d-fe38f8c0232f",
"name": "获取更新的行",
"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": {
"id": "bAnK8T185A3Wr7Kj",
"name": "Google Sheets account"
}
},
"retryOnFail": true,
"typeVersion": 4.7,
"alwaysOutputData": false
},
{
"id": "92af9dca-7ded-429d-a304-3271dcbdc594",
"name": "等待",
"type": "n8n-nodes-base.wait",
"position": [
784,
912
],
"webhookId": "e3ecb3b3-9796-4d58-bc3a-1ac354564218",
"parameters": {
"unit": "minutes",
"amount": 1
},
"typeVersion": 1.1
},
{
"id": "c6a29597-4209-44fa-a75a-279ebf0cf139",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
96,
-80
],
"parameters": {
"color": 4,
"width": 1344,
"height": 384,
"content": "## 创建文件夹和文件"
},
"typeVersion": 1
},
{
"id": "b9c0393a-7471-4c8a-b70b-7709b54a4e82",
"name": "便签3",
"type": "n8n-nodes-base.stickyNote",
"position": [
96,
352
],
"parameters": {
"color": 4,
"width": 1344,
"height": 384,
"content": "## 创建故事并添加到工作表"
},
"typeVersion": 1
},
{
"id": "41461520-f15d-46d0-be9d-703bd047883d",
"name": "聊天模型",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
480,
160
],
"parameters": {
"options": {},
"modelName": "models/gemini-2.5-flash-lite"
},
"credentials": {
"googlePalmApi": {
"id": "qzXOJEaYeexWZRUf",
"name": "new key"
}
},
"typeVersion": 1
},
{
"id": "b099634a-f8cc-4382-97ff-dc8774b92253",
"name": "聊天模型1",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
448,
608
],
"parameters": {
"options": {},
"modelName": "models/gemini-2.5-flash-lite"
},
"credentials": {
"googlePalmApi": {
"id": "qzXOJEaYeexWZRUf",
"name": "new key"
}
},
"typeVersion": 1
},
{
"id": "5e5787f3-dcc8-4139-933b-9ec16ebf9857",
"name": "便签4",
"type": "n8n-nodes-base.stickyNote",
"position": [
96,
784
],
"parameters": {
"color": 4,
"width": 1936,
"height": 384,
"content": "## 通过 Gemini 创建 Veo 3 Json 提示和图像"
},
"typeVersion": 1
},
{
"id": "33f5fe5a-4afa-40ef-be95-6180bed4d1d0",
"name": "便签5",
"type": "n8n-nodes-base.stickyNote",
"position": [
96,
1216
],
"parameters": {
"color": 4,
"width": 1152,
"height": 384,
"content": "## 移动文件"
},
"typeVersion": 1
},
{
"id": "b25d1540-5ba4-4685-9931-22a25dd1fbda",
"name": "聊天模型2",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
1024,
976
],
"parameters": {
"options": {},
"modelName": "models/gemini-2.5-flash-lite"
},
"credentials": {
"googlePalmApi": {
"id": "qzXOJEaYeexWZRUf",
"name": "new key"
}
},
"typeVersion": 1
},
{
"id": "b7ed1ac2-dcf3-4a47-b54b-98c31a90fe01",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-384,
-80
],
"parameters": {
"color": 5,
"width": 448,
"height": 512,
"content": "以下是您的 n8n 模板的简短设置说明:"
},
"typeVersion": 1
}
],
"pinData": {},
"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 ‘Execute workflow’": {
"main": [
[
{
"node": "Folder Name",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
这是一个高级难度的工作流,适用于Content Creation、Multimodal AI等场景。适合高级用户,包含 16+ 个节点的复杂工作流
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
使用 Gemini AI 和 Airtable 从图片生成 Shopify 产品列表
使用 Gemini AI 和 Airtable 从图片生成 Shopify 产品列表
If
Set
Code
+16
33 节点MANISH KUMAR
Content Creation
使用OpenAI、RunwayML和ElevenLabs自动化无脸短视频
使用OpenAI、RunwayML和ElevenLabs自动化无脸短视频:从脚本到社交媒体
Set
Code
Wait
+18
56 节点LeeWei
Content Creation
WordPress博客自动化专业版(深度研究)v2.1市场
使用GPT-4o、Perplexity AI和多语言支持自动化SEO优化的博客创建
If
Set
Xml
+27
125 节点Daniel Ng
Content Creation
LinkedIn和X病毒内容自动引擎
使用AI生成和发布自动创建LinkedIn和X的病毒内容
If
Set
Wait
+26
156 节点Diptamoy Barman
Content Creation
AI 电影短片生成器
使用 Gemini、GPT 和 ElevenLabs 将名言转换为社交媒体热门视频
If
Jwt
Set
+17
48 节点LukaszB
Content Creation
壁纸
使用 Gemini 2.0、Google Sheets 和 Drive 从文本提示生成 AI 图像
If
Code
Limit
+7
12 节点Muhammad Farooq Iqbal
Content Creation