使用Google Gemini AI优化电商产品图片

高级

这是一个Content Creation、Multimodal AI领域的自动化工作流,包含 32 个节点。主要使用 Set、GoogleDrive、HttpRequest、GoogleSheets、ConvertToFile 等节点。 使用Google Gemini AI增强电商产品图片质量

前置要求
  • Google Drive API 凭证
  • 可能需要目标 API 的认证凭证
  • Google Sheets API 凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "nodes": [
    {
      "id": "0aa63dbd-bbb8-4caa-a864-6ffea6dd7b9a",
      "name": "文件已创建",
      "type": "n8n-nodes-base.googleDriveTrigger",
      "position": [
        -2064,
        576
      ],
      "parameters": {
        "event": "fileCreated",
        "options": {
          "fileType": "all"
        },
        "pollTimes": {
          "item": [
            {
              "mode": "everyX",
              "unit": "minutes",
              "value": 5
            }
          ]
        },
        "triggerOn": "specificFolder",
        "folderToWatch": {
          "__rl": true,
          "mode": "id",
          "value": ""
        }
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "htidcOV6hR8kh9tB",
          "name": "Google Drive account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "e98ece61-7f83-420b-914a-4236926ab67c",
      "name": "文件已更新",
      "type": "n8n-nodes-base.googleDriveTrigger",
      "position": [
        -2064,
        736
      ],
      "parameters": {
        "event": "fileUpdated",
        "options": {},
        "pollTimes": {
          "item": [
            {
              "mode": "everyX",
              "unit": "minutes",
              "value": 5
            }
          ]
        },
        "triggerOn": "specificFolder",
        "folderToWatch": {
          "__rl": true,
          "mode": "id",
          "value": ""
        }
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "htidcOV6hR8kh9tB",
          "name": "Google Drive account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "7f75e919-7b84-48cd-a60d-dba089ec35d8",
      "name": "设置文件ID",
      "type": "n8n-nodes-base.set",
      "position": [
        -1664,
        672
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "500b4c9d-617a-4d88-9d74-9beb5922a00a",
              "name": "input_file_id",
              "type": "string",
              "value": "={{ $json.id }}"
            },
            {
              "id": "d5779b2e-12fd-4a73-9181-da4b9eec5b67",
              "name": "input_file_name",
              "type": "string",
              "value": "={{ $json.name }}"
            },
            {
              "id": "f79e2578-3375-4e1d-88e0-748e2daac35b",
              "name": "input_file_name_no_ext",
              "type": "string",
              "value": "={{ $json.name.split('.').slice(0, -1).join('.'); }}"
            },
            {
              "id": "45b4ffe8-1ebc-48f8-8234-c497c4081f39",
              "name": "input_mime_type",
              "type": "string",
              "value": "={{ $json.mimeType }}"
            },
            {
              "id": "f61545a2-a33d-484e-a901-5e5bec875628",
              "name": "input_file_url",
              "type": "string",
              "value": "={{ $json.webContentLink }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "c04350a6-3c05-43f7-a26f-5f45e7761864",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        672,
        400
      ],
      "parameters": {
        "color": 7,
        "width": 400,
        "height": 908,
        "content": "## 4. 在 Google Sheets 中更新条目"
      },
      "typeVersion": 1
    },
    {
      "id": "c1ba3367-fbe1-4ae7-ad5e-0bf10551fa94",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -272,
        400
      ],
      "parameters": {
        "color": 7,
        "width": 896,
        "height": 908,
        "content": "## 3. 转换图像"
      },
      "typeVersion": 1
    },
    {
      "id": "c83064ba-22d6-4c21-9d32-6de3dfd95ae2",
      "name": "便签6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -896,
        400
      ],
      "parameters": {
        "color": 7,
        "width": 568,
        "height": 908,
        "content": "## 2. 在 Google Sheets 中创建条目"
      },
      "typeVersion": 1
    },
    {
      "id": "008a490a-b105-4093-a247-25a641c25903",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2160,
        400
      ],
      "parameters": {
        "color": 7,
        "width": 728,
        "height": 908,
        "content": "## 1. 监控 Google Drive 文件夹中的新增和更新图像"
      },
      "typeVersion": 1
    },
    {
      "id": "854076d5-d55a-41d3-aac1-edb63ef4148c",
      "name": "便签4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1376,
        400
      ],
      "parameters": {
        "color": 4,
        "width": 432,
        "height": 448,
        "content": "## ⚙️ 更新工作流配置节点"
      },
      "typeVersion": 1
    },
    {
      "id": "8f8ea999-2d8b-493f-87af-24b6b77095fe",
      "name": "工作流配置",
      "type": "n8n-nodes-base.set",
      "position": [
        -1216,
        672
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "c16e829e-d2f6-49e0-9ffe-ee0c4fca0487",
              "name": "google_sheet_id",
              "type": "string",
              "value": ""
            },
            {
              "id": "4c4d3dc8-d102-40dc-9943-7de13cb2324a",
              "name": "dest_folder_id",
              "type": "string",
              "value": ""
            },
            {
              "id": "9d5a411b-53f8-4f68-80ee-c3ca9f42d276",
              "name": "text_prompt",
              "type": "string",
              "value": "Transform this product photo into a high-quality, studio-style image. - Background: Remove the original background completely and replace it with a clean, light gray gradient (e.g., #f0f0f0 to #e0e0e0).\\n- Lighting: Apply soft, diffused, and balanced lighting to eliminate harsh shadows and highlight the product's details. The lighting should feel natural and professional.\\n- Color & Realism: Perform subtle color correction to enhance vibrancy and ensure colors are true-to-life. Do not oversaturate.\\n- Integrity: Keep the product's shape, texture, and all original details perfectly intact. Do not add, remove, or alter any part of the product itself. If the product contains any text, especially ensure that the text is readable and identical in the new image.\\n- Final Look: The result should be a crisp, modern, and professional image suitable for a high-end e-commerce catalog."
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "5fe5cb99-1fcc-46ec-a781-332593765cd8",
      "name": "便签5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1376,
        880
      ],
      "parameters": {
        "color": 4,
        "width": 432,
        "height": 432,
        "content": "## 🔒 设置凭据"
      },
      "typeVersion": 1
    },
    {
      "id": "6a90fc9c-133a-4f18-9921-86af48ca8cdc",
      "name": "便签7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -864,
        704
      ],
      "parameters": {
        "color": 6,
        "width": 512,
        "height": 592,
        "content": "## 📊 Google Sheets 配置"
      },
      "typeVersion": 1
    },
    {
      "id": "16ba7ad1-328a-4d00-bd76-07ec72a5e4f3",
      "name": "便签8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3248,
        352
      ],
      "parameters": {
        "width": 1036,
        "height": 1024,
        "content": "## 电子商务目录的自动化图像处理"
      },
      "typeVersion": 1
    },
    {
      "id": "fee74492-82f0-41ed-bca8-4d4168aa3cb6",
      "name": "便签9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2112,
        896
      ],
      "parameters": {
        "color": 4,
        "width": 656,
        "height": 384,
        "content": "## ⚙️ 配置"
      },
      "typeVersion": 1
    },
    {
      "id": "e103517d-f85f-46f2-9491-43d20591cf08",
      "name": "从文件提取",
      "type": "n8n-nodes-base.extractFromFile",
      "disabled": true,
      "position": [
        -160,
        1056
      ],
      "parameters": {
        "options": {},
        "operation": "binaryToPropery",
        "destinationKey": "input_file_data_64",
        "binaryPropertyName": "input_file_data"
      },
      "typeVersion": 1
    },
    {
      "id": "60d46eda-a9f0-405d-a77a-2a11c300fce5",
      "name": "获取图像内容",
      "type": "n8n-nodes-base.set",
      "disabled": true,
      "position": [
        224,
        1056
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "021aad70-de11-4387-844e-7e7dfd3b1044",
              "name": "output_file_data_64",
              "type": "string",
              "value": "={{ $json.candidates?.[0]?.content?.parts?.find(part => part.inlineData).inlineData.data }}"
            },
            {
              "id": "62877ef7-2057-4d35-a44b-1d58fa1f1769",
              "name": "output_file_mime_type",
              "type": "string",
              "value": "={{ $json.candidates?.[0]?.content?.parts?.find(part => part.inlineData).inlineData.mimeType }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "570ed095-ac62-42c6-893b-ae8c8473d42e",
      "name": "转换为文件",
      "type": "n8n-nodes-base.convertToFile",
      "onError": "continueRegularOutput",
      "disabled": true,
      "position": [
        416,
        1056
      ],
      "parameters": {
        "options": {
          "mimeType": "={{ $json.output_file_mime_type }}"
        },
        "operation": "toBinary",
        "sourceProperty": "output_file_data_64",
        "binaryPropertyName": "output_file_data"
      },
      "typeVersion": 1.1
    },
    {
      "id": "b268283a-2069-4dd4-b5df-68a563b582b8",
      "name": "保存图像",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        320,
        608
      ],
      "parameters": {
        "name": "={{ $('Set File ID').item.json.input_file_name_no_ext }}_clean.{{ $json.fileExtension }}",
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive"
        },
        "options": {},
        "folderId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Workflow Configuration').item.json.dest_folder_id }}"
        },
        "inputDataFieldName": "output_file_data"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "htidcOV6hR8kh9tB",
          "name": "Google Drive account"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "fdb5e876-5e73-4fd4-bfa7-d18eb58ad220",
      "name": "Gemini 图像",
      "type": "n8n-nodes-base.httpRequest",
      "disabled": true,
      "position": [
        32,
        1056
      ],
      "parameters": {
        "url": "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash-image:generateContent",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"contents\": [\n    {\n      \"parts\": [\n        {\n          \"text\": \"{{ $('Workflow Configuration').item.json.text_prompt }}\"\n        },\n        {\n          \"inline_data\": {\n            \"mime_type\": \"{{ $('Set File ID').item.json.input_mime_type }}\",\n            \"data\": \"{{ $json.input_file_data_64 }}\"\n          }\n        }\n      ]\n    }\n  ],\n  \"generationConfig\": {\n    \"responseModalities\": [\n      \"TEXT\",\n      \"IMAGE\"\n    ]\n  }\n}",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "googlePalmApi"
      },
      "credentials": {
        "googlePalmApi": {
          "id": "7tlny7NnnrQIfupF",
          "name": "Google Gemini(PaLM) Api account"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "9970cfd8-ad69-4bf0-a623-234911af8e92",
      "name": "编辑图像",
      "type": "@n8n/n8n-nodes-langchain.googleGemini",
      "onError": "continueErrorOutput",
      "position": [
        128,
        672
      ],
      "parameters": {
        "images": {
          "values": [
            {
              "binaryPropertyName": "input_file_data"
            }
          ]
        },
        "prompt": "={{ $('Workflow Configuration').item.json.text_prompt }}",
        "options": {
          "binaryPropertyOutput": "output_file_data"
        },
        "resource": "image",
        "operation": "edit"
      },
      "credentials": {
        "googlePalmApi": {
          "id": "7tlny7NnnrQIfupF",
          "name": "Google Gemini(PaLM) Api account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "b11f0837-3508-446c-ae3d-ce665480da8c",
      "name": "下载图片",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -64,
        672
      ],
      "parameters": {
        "fileId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Set File ID').item.json.input_file_id }}"
        },
        "options": {
          "binaryPropertyName": "input_file_data"
        },
        "operation": "download"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "htidcOV6hR8kh9tB",
          "name": "Google Drive account"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "9b5ef10d-66e4-4436-b571-8f06dd53fc5a",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -240,
        896
      ],
      "parameters": {
        "width": 832,
        "height": 384,
        "content": "## 🤓 技术说明"
      },
      "typeVersion": 1
    },
    {
      "id": "b2318f31-dcfb-4562-b5da-b3d302bda9e4",
      "name": "更新条目为完成",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        832,
        608
      ],
      "parameters": {
        "columns": {
          "value": {
            "Status": "Completed",
            "End Time": "={{ $now.format('yyyy-MM-dd hh:mm:ss') }}",
            "Input File": "={{ $('Set File ID').item.json.input_file_url }}",
            "Output File": "={{ $json.webContentLink }}"
          },
          "schema": [
            {
              "id": "File name",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "File name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Status",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Start Time",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Start Time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "End Time",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "End Time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Input File",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Input File",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Output File",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Output File",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Notes",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Notes",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "Input File"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 636612761,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1AA79VkgHlRW6UwkZ7CYqQjnPVPM31lX3jlYlofWQZlU/edit#gid=636612761",
          "cachedResultName": "Photos"
        },
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Workflow Configuration').item.json.google_sheet_id }}"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "HTAGRgrsWTF0cfU2",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "783e886c-b912-454c-8cd4-270626d4c0dd",
      "name": "更新条目为错误",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        832,
        800
      ],
      "parameters": {
        "columns": {
          "value": {
            "Status": "Error",
            "End Time": "={{ $now.format('yyyy-MM-dd hh:mm:ss') }}",
            "Input File": "={{ $('Set File ID').item.json.input_file_url }}",
            "Output File": "={{ $json.webContentLink }}"
          },
          "schema": [
            {
              "id": "File name",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "File name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Status",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Start Time",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Start Time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "End Time",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "End Time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Input File",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Input File",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Output File",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Output File",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Notes",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Notes",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "Input File"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 636612761,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1AA79VkgHlRW6UwkZ7CYqQjnPVPM31lX3jlYlofWQZlU/edit#gid=636612761",
          "cachedResultName": "Photos"
        },
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Workflow Configuration').item.json.google_sheet_id }}"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "HTAGRgrsWTF0cfU2",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "94e0f337-bc82-40f2-87f6-8fe237fe0f37",
      "name": "便签10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1920,
        16
      ],
      "parameters": {
        "color": 5,
        "width": 224,
        "height": 336,
        "content": "## 马克杯 2"
      },
      "typeVersion": 1
    },
    {
      "id": "a26bfb77-40d6-481f-89e7-5e38e4eafd22",
      "name": "便利贴11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        240,
        0
      ],
      "parameters": {
        "color": 5,
        "width": 224,
        "height": 352,
        "content": "## 马克杯 2"
      },
      "typeVersion": 1
    },
    {
      "id": "e821cff4-c02b-4740-9245-ca5b4b4e12d4",
      "name": "便利贴12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2160,
        16
      ],
      "parameters": {
        "color": 5,
        "width": 224,
        "height": 336,
        "content": "## 马克杯 1"
      },
      "typeVersion": 1
    },
    {
      "id": "363fd8c8-f073-4609-9247-1feae8046317",
      "name": "便签13",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        0
      ],
      "parameters": {
        "color": 5,
        "width": 224,
        "height": 352,
        "content": "## 马克杯 1"
      },
      "typeVersion": 1
    },
    {
      "id": "c55c79bf-045a-41e0-aff1-c019f12fea4c",
      "name": "便签14",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1680,
        16
      ],
      "parameters": {
        "color": 5,
        "width": 224,
        "height": 336,
        "content": "## 音箱 ![](https://res.cloudinary.com/dhsktno2q/image/upload/v1759955739/speaker_cugs54.jpg)"
      },
      "typeVersion": 1
    },
    {
      "id": "2c1eb78f-b0f1-4544-b75b-b2a5b54328e2",
      "name": "便签15",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        480,
        0
      ],
      "parameters": {
        "color": 5,
        "width": 224,
        "height": 352,
        "content": "## 音箱 ![](https://res.cloudinary.com/dhsktno2q/image/upload/v1759955738/speaker_clean_cbjmvq.png)"
      },
      "typeVersion": 1
    },
    {
      "id": "b6d8cc04-5fd2-4996-8d9a-c6657c722df3",
      "name": "便签16",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1440,
        16
      ],
      "parameters": {
        "color": 5,
        "width": 352,
        "height": 336,
        "content": "## 花朵"
      },
      "typeVersion": 1
    },
    {
      "id": "946aa565-298a-4d3a-a459-44ef78767d03",
      "name": "便签17",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        720,
        0
      ],
      "parameters": {
        "color": 5,
        "width": 352,
        "height": 352,
        "content": "## 花朵"
      },
      "typeVersion": 1
    },
    {
      "id": "b7ade6bd-5873-44cd-9b7b-56c9a2a7b380",
      "name": "创建条目",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -688,
        544
      ],
      "parameters": {
        "columns": {
          "value": {
            "Status": "Not Started",
            "File name": "={{ $('Set File ID').item.json.input_file_name }}",
            "Input File": "={{ $('Set File ID').item.json.input_file_url }}",
            "Start Time": "={{ $now.format('yyyy-MM-dd hh:mm:ss') }}"
          },
          "schema": [
            {
              "id": "File name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "File name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Status",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Start Time",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Start Time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "End Time",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "End Time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Input File",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Input File",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Output File",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Output File",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Notes",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Notes",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "Input File"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 636612761,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1AA79VkgHlRW6UwkZ7CYqQjnPVPM31lX3jlYlofWQZlU/edit#gid=636612761",
          "cachedResultName": "Photos"
        },
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Workflow Configuration').item.json.google_sheet_id }}"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "HTAGRgrsWTF0cfU2",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.7
    }
  ],
  "connections": {
    "Edit Image": {
      "main": [
        [
          {
            "node": "Save image",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update Entry to Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save image": {
      "main": [
        [
          {
            "node": "Update Entry to Done",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set File ID": {
      "main": [
        [
          {
            "node": "Workflow Configuration",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Entry": {
      "main": [
        [
          {
            "node": "Download Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "File Created": {
      "main": [
        [
          {
            "node": "Set File ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "File Updated": {
      "main": [
        [
          {
            "node": "Set File ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gemini Image": {
      "main": [
        [
          {
            "node": "Get Image Contents",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Image": {
      "main": [
        [
          {
            "node": "Edit Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract from File": {
      "main": [
        [
          {
            "node": "Gemini Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Image Contents": {
      "main": [
        [
          {
            "node": "Convert to File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Workflow Configuration": {
      "main": [
        [
          {
            "node": "Create Entry",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

这是一个高级难度的工作流,适用于Content Creation、Multimodal AI等场景。适合高级用户,包含 16+ 个节点的复杂工作流

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
高级
节点数量32
分类2
节点类型9
难度说明

适合高级用户,包含 16+ 个节点的复杂工作流

外部链接
在 n8n.io 上查看 →

分享此工作流