AutomationFlowsAI & RAG › Generate Images from Google Sheets

Generate Images from Google Sheets

Original n8n title: D27 Image Generate

d27-image-generate. Uses googleSheets, googleGemini, googleDrive, googleSheetsTrigger. Event-driven trigger; 7 nodes.

Event trigger★★★★☆ complexityAI-powered7 nodesGoogle SheetsGoogle GeminiGoogle DriveGoogle Sheets Trigger
AI & RAG Trigger: Event Nodes: 7 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow follows the Google Drive → Googlegemini recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "createdAt": "2025-09-23T03:58:39.755Z",
  "updatedAt": "2025-09-23T06:51:37.382Z",
  "id": "ugpaNC0nSgjhklT5",
  "name": "d27-image-generate",
  "active": false,
  "isArchived": false,
  "nodes": [
    {
      "parameters": {},
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        160,
        112
      ],
      "id": "4e3145af-4bc0-400e-afba-213eb6b506d8",
      "name": "When clicking \u2018Execute workflow\u2019"
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "1L2aG1su8TDETxXvqAUpgKC_n0WWpaeyRETAwJP0eOUM",
          "mode": "list",
          "cachedResultName": "\u6587\u6848\u4e3b\u984c\u898f\u5283\u8868",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1L2aG1su8TDETxXvqAUpgKC_n0WWpaeyRETAwJP0eOUM/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "\u5de5\u4f5c\u88681",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1L2aG1su8TDETxXvqAUpgKC_n0WWpaeyRETAwJP0eOUM/edit#gid=0"
        },
        "filtersUI": {
          "values": [
            {
              "lookupColumn": "\u78ba\u8a8d\u4f7f\u7528\u6587\u5b57\u5716\u7247\u5efa\u8b70",
              "lookupValue": "o"
            },
            {
              "lookupColumn": "\u751f\u6210\u5716\u7247\u9023\u7d50"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        384,
        208
      ],
      "id": "f7f43ca9-c870-4c51-83a5-d079e9f69242",
      "name": "Get row(s) in sheet"
    },
    {
      "parameters": {
        "resource": "image",
        "modelId": {
          "__rl": true,
          "value": "models/gemini-2.0-flash-preview-image-generation",
          "mode": "list",
          "cachedResultName": "models/gemini-2.0-flash-preview-image-generation"
        },
        "prompt": "=Generate a high-resolution image for {{ $json['\u8f38\u51fa\u5e73\u53f0'] }}, in the style of {{ $json['\u5716\u7247\u98a8\u683c\u5efa\u8b70'] }}, visually appealing for social media, with harmonious colors, subtle lighting and shadows, clean and balanced composition, leaving some empty space, no text included, and automatically adjusted aspect ratio for the platform (e.g., Instagram 1:1, Facebook 1.91:1, Twitter 16:9).",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.googleGemini",
      "typeVersion": 1,
      "position": [
        832,
        136
      ],
      "id": "486169d2-5b42-407d-acfe-90f00ad9ce2c",
      "name": "Generate an image"
    },
    {
      "parameters": {
        "name": "={{ $('Get row(s) in sheet').item.json.ID }}.png",
        "driveId": {
          "__rl": true,
          "value": "My Drive",
          "mode": "list",
          "cachedResultName": "My Drive",
          "cachedResultUrl": "https://drive.google.com/drive/my-drive"
        },
        "folderId": {
          "__rl": true,
          "value": "1rFriDskHNxBxBBUUwjm148AtPPi8mky1",
          "mode": "list",
          "cachedResultName": "\u6587\u6848\u4e3b\u984c\u5716\u7247\u751f\u6210",
          "cachedResultUrl": "https://drive.google.com/drive/folders/1rFriDskHNxBxBBUUwjm148AtPPi8mky1"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [
        1056,
        136
      ],
      "id": "dfca105c-dd45-4b38-a7e3-ef9a8761b60b",
      "name": "Upload file"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "n8n-nodes-base.splitInBatches",
      "typeVersion": 3,
      "position": [
        608,
        208
      ],
      "id": "4aa6cd49-ac8d-434d-a45c-20e3a7cfc6be",
      "name": "Loop Over Items"
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "1L2aG1su8TDETxXvqAUpgKC_n0WWpaeyRETAwJP0eOUM",
          "mode": "list",
          "cachedResultName": "\u6587\u6848\u4e3b\u984c\u898f\u5283\u8868",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1L2aG1su8TDETxXvqAUpgKC_n0WWpaeyRETAwJP0eOUM/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "\u5de5\u4f5c\u88681",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1L2aG1su8TDETxXvqAUpgKC_n0WWpaeyRETAwJP0eOUM/edit#gid=0"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "ID": "={{ $('Loop Over Items').item.json.ID }}",
            "\u751f\u6210\u5716\u7247\u9023\u7d50": "={{ $json.webViewLink }}"
          },
          "matchingColumns": [
            "ID"
          ],
          "schema": [
            {
              "id": "ID",
              "displayName": "ID",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "\u4e3b\u984c",
              "displayName": "\u4e3b\u984c",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "\u95dc\u9375\u5b57",
              "displayName": "\u95dc\u9375\u5b57",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "\u6587\u6848\u98a8\u683c",
              "displayName": "\u6587\u6848\u98a8\u683c",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "\u76ee\u6a19\u53d7\u773e",
              "displayName": "\u76ee\u6a19\u53d7\u773e",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "\u5b57\u6578\u9650\u5236",
              "displayName": "\u5b57\u6578\u9650\u5236",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "\u8f38\u51fa\u5e73\u53f0",
              "displayName": "\u8f38\u51fa\u5e73\u53f0",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "\u5099\u8a3b",
              "displayName": "\u5099\u8a3b",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "\u751f\u6210\u8349\u7a3f",
              "displayName": "\u751f\u6210\u8349\u7a3f",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "\u5716\u7247\u98a8\u683c\u5efa\u8b70",
              "displayName": "\u5716\u7247\u98a8\u683c\u5efa\u8b70",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "\u78ba\u8a8d\u4f7f\u7528\u6587\u5b57\u5716\u7247\u5efa\u8b70",
              "displayName": "\u78ba\u8a8d\u4f7f\u7528\u6587\u5b57\u5716\u7247\u5efa\u8b70",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "\u751f\u6210\u5716\u7247\u9023\u7d50",
              "displayName": "\u751f\u6210\u5716\u7247\u9023\u7d50",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "\u78ba\u8a8d\u4f7f\u7528\u5716\u6587",
              "displayName": "\u78ba\u8a8d\u4f7f\u7528\u5716\u6587",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "FB \u9023\u7d50",
              "displayName": "FB \u9023\u7d50",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "row_number",
              "displayName": "row_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "number",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        1280,
        208
      ],
      "id": "01946105-73b1-4c37-a789-833d539fd1e3",
      "name": "Update row in sheet"
    },
    {
      "parameters": {
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        },
        "documentId": {
          "__rl": true,
          "value": "1L2aG1su8TDETxXvqAUpgKC_n0WWpaeyRETAwJP0eOUM",
          "mode": "list",
          "cachedResultName": "\u6587\u6848\u4e3b\u984c\u898f\u5283\u8868",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1L2aG1su8TDETxXvqAUpgKC_n0WWpaeyRETAwJP0eOUM/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "\u5de5\u4f5c\u88681",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1L2aG1su8TDETxXvqAUpgKC_n0WWpaeyRETAwJP0eOUM/edit#gid=0"
        },
        "event": "rowUpdate",
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheetsTrigger",
      "typeVersion": 1,
      "position": [
        160,
        304
      ],
      "id": "87a2fd99-2fca-436d-ae4c-a77e33aeb25e",
      "name": "Google Sheets Trigger"
    }
  ],
  "connections": {
    "When clicking \u2018Execute workflow\u2019": {
      "main": [
        [
          {
            "node": "Get row(s) in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get row(s) in sheet": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate an image": {
      "main": [
        [
          {
            "node": "Upload file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload file": {
      "main": [
        [
          {
            "node": "Update row in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Generate an image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update row in sheet": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets Trigger": {
      "main": [
        [
          {
            "node": "Get row(s) in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "staticData": null,
  "meta": null,
  "versionId": "b79ea9ef-a60c-4f22-96ba-833133499551",
  "triggerCount": 0,
  "shared": [
    {
      "createdAt": "2025-09-23T03:58:39.755Z",
      "updatedAt": "2025-09-23T03:58:39.755Z",
      "role": "workflow:owner",
      "workflowId": "ugpaNC0nSgjhklT5",
      "projectId": "6NV7foKyOeJG8Mz6"
    }
  ],
  "tags": [
    {
      "createdAt": "2025-09-14T06:27:04.834Z",
      "updatedAt": "2025-09-14T06:27:04.834Z",
      "id": "S14KyMmdLj6QsyYh",
      "name": "ithome"
    }
  ]
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

d27-image-generate. Uses googleSheets, googleGemini, googleDrive, googleSheetsTrigger. Event-driven trigger; 7 nodes.

Source: https://github.com/021up/n8n-learning/blob/main/ITHome/ugpaNC0nSgjhklT5.json — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

Monitor a Google Drive folder, process each image based on the prompt defined in and save the new image to the specified output Google Drive folder. Maintain a processing log in Google Sheets.

Google Drive Trigger, Google Drive, HTTP Request +2
AI & RAG

Understand your customers before you build for them. This workflow, Market Segmentation: Buyer Persona Pain Point Report, automates the grueling process of primary market research. By scraping real-wo

Form Trigger, Google Gemini, N8N Nodes Olostep +3
AI & RAG

An n8n-based automation that generates client proposals from a form, lets you review everything in one place, and sends the proposal only when you approve it.

Form Trigger, Google Sheets Trigger, OpenAI +4
AI & RAG

This workflow is designed for content creators, marketers, and automation enthusiasts who want to produce professional AI-generated videos and publish them automatically on social media — without edit

OpenAI, HTTP Request, Google Drive +3
AI & RAG

Automate your product visuals! This n8n workflow instantly processes new product photography requests from Jotform or Google Sheets, uses an AI agent (Gemini Nano Banana) to generate professional AI p

Google Sheets, Google Gemini, Google Drive +2