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": "付箋ノート7",
"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**📧 Email**: mfarooqiqbal143@gmail.com \n**📱 Phone**: +923036991118 \n**💼 LinkedIn**: [Connect with me](https://linkedin.com/in/muhammadfarooqiqbal) \n**🌐 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": "ワークフロー実行時",
"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 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": "フォルダ名",
"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 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": "プロンプト変換器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 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": "シートに行を追加",
"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": "## Create Folder and File\n"
},
"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": "## Create Story & Add in Sheet\n"
},
"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": "## Create Veo 3 Json Prompts & Images via Gemini"
},
"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": "## Move Files"
},
"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": "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
}
],
"pinData": {},
"connections": {
"eb8dc23f-757a-4edc-83f8-e68d3cb0b010": {
"main": [
[
{
"node": "d9094fa4-f4aa-4f9a-9948-a8cea2213f21",
"type": "main",
"index": 0
}
],
[
{
"node": "ac3f2d1c-0f98-4d62-a240-300ef84a6eda",
"type": "main",
"index": 0
}
]
]
},
"c266998e-0003-4ca7-af61-f081d109ecef": {
"main": [
[
{
"node": "1a8ed5d0-1d5f-4010-9377-7ff890ddaf77",
"type": "main",
"index": 0
}
],
[
{
"node": "a4caeac4-c544-427b-a28d-fe38f8c0232f",
"type": "main",
"index": 0
}
]
]
},
"59ab47dd-f8a6-47f1-80d5-a9d2ab00c98b": {
"main": [
[
{
"node": "a3fc83b6-2f54-4b74-be25-3193762b5f4b",
"type": "main",
"index": 0
}
]
]
},
"92af9dca-7ded-429d-a304-3271dcbdc594": {
"main": [
[
{
"node": "4e5d22f1-f548-4731-bc4a-9241806096b6",
"type": "main",
"index": 0
}
]
]
},
"1a8ed5d0-1d5f-4010-9377-7ff890ddaf77": {
"main": [
[
{
"node": "92af9dca-7ded-429d-a304-3271dcbdc594",
"type": "main",
"index": 0
}
]
]
},
"d9094fa4-f4aa-4f9a-9948-a8cea2213f21": {
"main": [
[
{
"node": "4eed5ff1-d6f7-48fb-9a97-5dd38204deab",
"type": "main",
"index": 0
}
]
]
},
"41461520-f15d-46d0-be9d-703bd047883d": {
"ai_languageModel": [
[
{
"node": "871f8261-49ff-4174-836c-9e4331b59c30",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"e796adb0-b3c1-4491-a857-eca58fc379e6": {
"main": [
[
{
"node": "1b43c3fd-a60b-4b77-87e2-6f1f77a29127",
"type": "main",
"index": 0
}
]
]
},
"871f8261-49ff-4174-836c-9e4331b59c30": {
"main": [
[
{
"node": "ee5e4ada-04e7-409d-8e83-a816b7aafea2",
"type": "main",
"index": 0
}
]
]
},
"d3aca0c9-b547-4489-a28a-4489c370b022": {
"ai_outputParser": [
[
{
"node": "239f6485-6e0f-43bf-bc93-b1e9bf660b33",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"4fc42e92-5ab7-4ddc-a263-8242137dc50f": {
"main": [
[
{
"node": "6031fed3-e65b-489c-8cfa-efa85a9df4bb",
"type": "main",
"index": 0
}
]
]
},
"b099634a-f8cc-4382-97ff-dc8774b92253": {
"ai_languageModel": [
[
{
"node": "239f6485-6e0f-43bf-bc93-b1e9bf660b33",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"b25d1540-5ba4-4685-9931-22a25dd1fbda": {
"ai_languageModel": [
[
{
"node": "4e5d22f1-f548-4731-bc4a-9241806096b6",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"f94b9f0a-f1e0-4c78-b7d2-7d240ed85180": {
"main": [
[
{
"node": "e796adb0-b3c1-4491-a857-eca58fc379e6",
"type": "main",
"index": 0
}
]
]
},
"c4a016f9-cbe2-4d5a-8b69-1af4fd66da8d": {
"ai_outputParser": [
[
{
"node": "871f8261-49ff-4174-836c-9e4331b59c30",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"b755de9c-57aa-441c-b1c3-a13b52596677": {
"ai_outputParser": [
[
{
"node": "4e5d22f1-f548-4731-bc4a-9241806096b6",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"4eed5ff1-d6f7-48fb-9a97-5dd38204deab": {
"main": [
[
{
"node": "a4caeac4-c544-427b-a28d-fe38f8c0232f",
"type": "main",
"index": 0
}
]
]
},
"ee5e4ada-04e7-409d-8e83-a816b7aafea2": {
"main": [
[
{
"node": "f94b9f0a-f1e0-4c78-b7d2-7d240ed85180",
"type": "main",
"index": 0
}
]
]
},
"8bb2862d-c044-486e-96c3-202047d693a1": {
"main": [
[
{
"node": "c266998e-0003-4ca7-af61-f081d109ecef",
"type": "main",
"index": 0
}
]
]
},
"239f6485-6e0f-43bf-bc93-b1e9bf660b33": {
"main": [
[
{
"node": "59ab47dd-f8a6-47f1-80d5-a9d2ab00c98b",
"type": "main",
"index": 0
}
]
]
},
"a3fc83b6-2f54-4b74-be25-3193762b5f4b": {
"main": [
[],
[
{
"node": "f41101ea-1774-4560-96a4-9033b10292ae",
"type": "main",
"index": 0
}
]
]
},
"a4caeac4-c544-427b-a28d-fe38f8c0232f": {
"main": [
[
{
"node": "eb8dc23f-757a-4edc-83f8-e68d3cb0b010",
"type": "main",
"index": 0
}
]
]
},
"9f210c25-961b-4a46-9c47-1c02f6c8d716": {
"main": [
[
{
"node": "4fc42e92-5ab7-4ddc-a263-8242137dc50f",
"type": "main",
"index": 0
}
]
]
},
"4e5d22f1-f548-4731-bc4a-9241806096b6": {
"main": [
[
{
"node": "9f210c25-961b-4a46-9c47-1c02f6c8d716",
"type": "main",
"index": 0
}
]
]
},
"f41101ea-1774-4560-96a4-9033b10292ae": {
"main": [
[
{
"node": "a3fc83b6-2f54-4b74-be25-3193762b5f4b",
"type": "main",
"index": 0
},
{
"node": "8bb2862d-c044-486e-96c3-202047d693a1",
"type": "main",
"index": 0
}
]
]
},
"6031fed3-e65b-489c-8cfa-efa85a9df4bb": {
"main": [
[
{
"node": "8bb2862d-c044-486e-96c3-202047d693a1",
"type": "main",
"index": 0
}
]
]
},
"1b43c3fd-a60b-4b77-87e2-6f1f77a29127": {
"main": [
[
{
"node": "239f6485-6e0f-43bf-bc93-b1e9bf660b33",
"type": "main",
"index": 0
}
]
]
},
"d57e5004-7c16-4159-ba6f-8144da450e6c": {
"main": [
[
{
"node": "871f8261-49ff-4174-836c-9e4331b59c30",
"type": "main",
"index": 0
}
]
]
}
}
}よくある質問
このワークフローの使い方は?
上記のJSON設定コードをコピーし、n8nインスタンスで新しいワークフローを作成して「JSONからインポート」を選択、設定を貼り付けて認証情報を必要に応じて変更してください。
このワークフローはどんな場面に適していますか?
上級 - コンテンツ作成, マルチモーダルAI
有料ですか?
このワークフローは完全無料です。ただし、ワークフローで使用するサードパーティサービス(OpenAI APIなど)は別途料金が発生する場合があります。
関連ワークフロー
Gemini AI と Airtable から画像で Shopify 製品一覧を生成
Gemini AI と Airtable を使用して、画像からShopify製品一覧を生成する
If
Set
Code
+
If
Set
Code
33 ノードMANISH KUMAR
コンテンツ作成
OpenAI、RunwayML、ElevenLabsを使って無顔の短い動画を自動化
OpenAI、RunwayML、ElevenLabs を使ってアニメ顔の短い動画を自動化:スクリプトからソーシャルメディアへ
Set
Code
Wait
+
Set
Code
Wait
56 ノードLeeWei
コンテンツ作成
WordPressブログの自動化プロフェッショナル版(先端研究)v2.1マーケットプラグイン
GPT-4o、Perplexity AI、そして多言語対応を使ったSEO最適化ブログ作成の自動化
If
Set
Xml
+
If
Set
Xml
125 ノードDaniel Ng
コンテンツ作成
LinkedInおよびXウイルスのなコンテンツ自動エンジン
AIを使ってLinkedInとXにウイルスのなコンテンツを自動生成して公開する
If
Set
Wait
+
If
Set
Wait
156 ノードDiptamoy Barman
コンテンツ作成
壁紙
Gemini 2.0、Google Sheets、Google Drive を使ってテキストプロンプトから AI 画像を生成
If
Code
Limit
+
If
Code
Limit
12 ノードMuhammad Farooq Iqbal
コンテンツ作成
Apollo データスクレイピングとタッチアウトフロー 1 ✅
Apollo、AI による解析と計画されたメール.follow-up によるリード生成の自動化
If
Code
Wait
+
If
Code
Wait
39 ノードDeniz
コンテンツ作成