This workflow corresponds to n8n.io template #9712 — we link there as the canonical source.
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 →
{
"nodes": [
{
"id": "e71df02d-0562-4cce-a478-a7dc7fd1d243",
"name": "When clicking \u2018Execute workflow\u2019",
"type": "n8n-nodes-base.manualTrigger",
"position": [
-240,
-80
],
"parameters": {},
"typeVersion": 1
},
{
"id": "a75b5a3c-6c0e-4baf-a392-491f33a857e6",
"name": "Get row(s) in sheet",
"type": "n8n-nodes-base.googleSheets",
"position": [
-32,
-80
],
"parameters": {
"options": {},
"filtersUI": {
"values": [
{
"lookupValue": "Pending",
"lookupColumn": "Status"
}
]
},
"sheetName": {
"__rl": true,
"mode": "list"
},
"documentId": {
"__rl": true,
"mode": "list"
}
},
"typeVersion": 4.6
},
{
"id": "18ce7b03-7ff8-4385-957c-61b7f27accd5",
"name": "Message a model",
"type": "@n8n/n8n-nodes-langchain.googleGemini",
"position": [
416,
-80
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "models/gemini-2.0-flash-lite",
"cachedResultName": "models/gemini-2.0-flash-lite"
},
"options": {},
"messages": {
"values": [
{
"content": "=You are a professional photographer who do Product protography. Below are the details of a product and what type of photogaric image he need.\n\nWrite down a prompt for an AI model to generate that image:\n\nProduct: {{ $json['Product Name'] }}, {{ $json['Product Description'] }}\n\nProduct image: {{ $json['Product Image'] }}\n\nRequirement: {{ $json.Requirement }}\n\nNote: Just provide the prompt directly, no need to write extra text e.g here is the prompt or something"
}
]
}
},
"typeVersion": 1
},
{
"id": "ddeb1d41-ba0c-4904-a854-d34dd46c846e",
"name": "Get Image Contents",
"type": "n8n-nodes-base.set",
"position": [
608,
176
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "021aad70-de11-4387-844e-7e7dfd3b1044",
"name": "image",
"type": "string",
"value": "={{ $json.candidates[0].content.parts.find(part => part.inlineData).inlineData.data }}"
},
{
"id": "62877ef7-2057-4d35-a44b-1d58fa1f1769",
"name": "mimeType",
"type": "string",
"value": "={{ $json.candidates[0].content.parts.find(part => part.inlineData).inlineData.mimeType }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "1a7630c1-81de-4116-aaff-6f4dd59d0efc",
"name": "Upload to Drive",
"type": "n8n-nodes-base.googleDrive",
"position": [
976,
176
],
"parameters": {
"name": "={{ $('Get row(s) in sheet').item.json['Product Name'] }}.{{ $('Get Image Contents').item.json.mimeType.split('/')[1] }}",
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive"
},
"options": {},
"folderId": {
"__rl": true,
"mode": "list",
"value": "root",
"cachedResultName": "/ (Root folder)"
}
},
"typeVersion": 3
},
{
"id": "3c09fc45-ace9-46f0-a360-4a41d06c7bea",
"name": "Convert to File",
"type": "n8n-nodes-base.convertToFile",
"onError": "continueRegularOutput",
"position": [
784,
176
],
"parameters": {
"options": {
"mimeType": "={{ $json.mimeType }}"
},
"operation": "toBinary",
"sourceProperty": "image"
},
"typeVersion": 1.1
},
{
"id": "e36ee194-147c-40e6-8a76-ef40f9a77adc",
"name": "Extract from File",
"type": "n8n-nodes-base.extractFromFile",
"position": [
1344,
-80
],
"parameters": {
"options": {},
"operation": "binaryToPropery"
},
"typeVersion": 1
},
{
"id": "50a5cf60-9ab3-4f7d-ac22-4749f0ab9d84",
"name": "Product",
"type": "n8n-nodes-base.httpRequest",
"position": [
880,
-368
],
"parameters": {
"url": "={{ $('Edit Fields').item.json['Product Image'] }}",
"options": {}
},
"typeVersion": 4.2
},
{
"id": "5a106c94-7701-4182-afff-1585a0f9bc6b",
"name": "Reference Image 1",
"type": "n8n-nodes-base.httpRequest",
"position": [
880,
-224
],
"parameters": {
"url": "={{ $('Edit Fields').item.json['Reference Image 1'] }}",
"options": {}
},
"typeVersion": 4.2
},
{
"id": "67288856-65b9-4c0c-8740-dbda2277b32f",
"name": "Reference Image 2",
"type": "n8n-nodes-base.httpRequest",
"position": [
880,
-80
],
"parameters": {
"url": "={{ $('Edit Fields').item.json['Reference Image 2'] }}",
"options": {}
},
"typeVersion": 4.2
},
{
"id": "5687cc9c-f5b5-4fee-b4b2-92e34851947e",
"name": "Merge",
"type": "n8n-nodes-base.merge",
"position": [
1152,
-128
],
"parameters": {
"numberInputs": 3
},
"typeVersion": 3.2
},
{
"id": "a56adec8-21dd-46e6-97ef-638feae54fad",
"name": "Aggregate",
"type": "n8n-nodes-base.aggregate",
"position": [
1520,
-80
],
"parameters": {
"options": {},
"aggregate": "aggregateAllItemData"
},
"typeVersion": 1
},
{
"id": "7d1905dd-c4c0-417a-ab8d-fff552072586",
"name": "Gemini Nano Banana",
"type": "n8n-nodes-base.httpRequest",
"position": [
416,
176
],
"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\": \"{{ $('Message a model').item.json.content.parts[0].text.replaceAll('\n', '').trim() }}\"\n },\n {\n \"inline_data\": {\n \"mime_type\": \"image/png\",\n \"data\": \"{{ $json.data[0].data }}\"\n }\n },\n {\n \"inline_data\": {\n \"mime_type\": \"image/png\",\n \"data\": \"{{ $json.data[1].data }}\"\n }\n },\n {\n \"inline_data\": {\n \"mime_type\": \"image/png\",\n \"data\": \"{{ $json.data[2].data }}\"\n }\n }\n ]\n }\n ],\n \"generationConfig\": {\n \"responseModalities\": [\n \"TEXT\",\n \"IMAGE\"\n ]\n }\n}",
"sendBody": true,
"specifyBody": "json",
"authentication": "predefinedCredentialType",
"nodeCredentialType": "googlePalmApi"
},
"typeVersion": 4.2
},
{
"id": "e6e97e70-26ae-47a2-a52f-e837cf5a81b9",
"name": "Update row in sheet",
"type": "n8n-nodes-base.googleSheets",
"position": [
1488,
384
],
"parameters": {
"columns": {
"value": {
"Status": "Completed",
"row_number": "={{ $('Edit Fields').item.json.row_number }}",
"Generated Image": "={{ $json.webViewLink }}"
},
"schema": [
{
"id": "Product Name",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Product Name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Product Description",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Product Description",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Product Image",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Product Image",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Requirement",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Requirement",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Reference Image 1",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Reference Image 1",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Reference Image 2",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Reference Image 2",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Status",
"type": "string",
"display": true,
"required": false,
"displayName": "Status",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Generated Image",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Generated Image",
"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": "list"
},
"documentId": {
"__rl": true,
"mode": "list"
}
},
"typeVersion": 4.6
},
{
"id": "b7d366da-2337-4e1f-8814-569868db76c3",
"name": "Schedule Trigger",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
-240,
-240
],
"parameters": {
"rule": {
"interval": [
{
"field": "hours"
}
]
}
},
"typeVersion": 1.2
},
{
"id": "cba50728-4600-4fb7-b1b1-5b6f0f336896",
"name": "JotForm Trigger",
"type": "n8n-nodes-base.jotFormTrigger",
"position": [
-176,
352
],
"parameters": {
"form": "252856264643060"
},
"typeVersion": 1
},
{
"id": "dc416865-d5cb-495d-b2fd-200273ff51f9",
"name": "If",
"type": "n8n-nodes-base.if",
"position": [
1168,
176
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "afb4a31f-694b-454c-8a82-7bd38e8d4a49",
"operator": {
"type": "object",
"operation": "notExists",
"singleValue": true
},
"leftValue": "={{ $('Get row(s) in sheet') }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "d7303fbc-13f6-4efa-a31a-3760b5650965",
"name": "Add row in sheet",
"type": "n8n-nodes-base.googleSheets",
"position": [
1488,
192
],
"parameters": {
"columns": {
"value": {
"Status": "Completed",
"Requirement": "={{ $('Edit Fields').item.json.Requirement }}",
"Product Name": "={{ $('Edit Fields').item.json['Product Name'] }}",
"Product Image": "={{ $('Edit Fields').item.json['Product Image'] }}",
"Generated Image": "={{ $('Upload to Drive').item.json.webViewLink }}",
"Reference Image 1": "={{ $('Edit Fields').item.json['Reference Image 1'] }}",
"Reference Image 2": "={{ $('Edit Fields').item.json['Reference Image 2'] }}",
"Product Description": "={{ $('Edit Fields').item.json['Product Description'] }}"
},
"schema": [
{
"id": "Product Name",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Product Name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Product Description",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Product Description",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Product Image",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Product Image",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Requirement",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Requirement",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Reference Image 1",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Reference Image 1",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Reference Image 2",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Reference Image 2",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Status",
"type": "string",
"display": true,
"required": false,
"displayName": "Status",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Generated Image",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Generated Image",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "row_number",
"type": "number",
"display": true,
"removed": true,
"readOnly": true,
"required": false,
"displayName": "row_number",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"row_number"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list"
},
"documentId": {
"__rl": true,
"mode": "list"
}
},
"typeVersion": 4.6
},
{
"id": "1da62ce5-fff7-487e-8df8-3298733fca87",
"name": "Edit Fields",
"type": "n8n-nodes-base.set",
"position": [
208,
-80
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "d8e834ba-f5aa-4ebb-8680-d77aebf8589d",
"name": "Product Name",
"type": "string",
"value": "={{ $json['Product Name'] }}"
},
{
"id": "34f1b39e-873a-4097-8885-9730453d3576",
"name": "Product Description",
"type": "string",
"value": "={{ $json['Product Description'] }}"
},
{
"id": "b35e3428-df98-4022-b442-0d483b267a72",
"name": "Product Image",
"type": "string",
"value": "={{ $json['Product Image'] }}"
},
{
"id": "3e0d71ef-7281-4666-b3a7-61c95dea9e9b",
"name": "Requirement",
"type": "string",
"value": "={{ $json.Requirement }}"
},
{
"id": "ef9f5a64-6deb-4b31-98c3-89ee2fb526b7",
"name": "Reference Image 1",
"type": "string",
"value": "={{ $json['Reference Image 1'] }}"
},
{
"id": "d273e256-f219-4a24-b051-3c9c00abe6db",
"name": "Reference Image 2",
"type": "string",
"value": "={{ $json['Reference Image 2'] }}"
},
{
"id": "e045d017-3ecb-44a4-8dfc-e85723fca91d",
"name": "row_number",
"type": "string",
"value": "={{ $json.row_number }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "83a2bcf2-156a-4dc2-874a-dcd896113c27",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
720,
-432
],
"parameters": {
"width": 768,
"height": 512,
"content": "## Images Downloader - For AI"
},
"typeVersion": 1
},
{
"id": "2da95b57-343e-47e6-bcd0-ef1bd6dd9833",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
1344,
112
],
"parameters": {
"width": 416,
"height": 416,
"content": "## Logging everything in google sheets"
},
"typeVersion": 1
},
{
"id": "98ed7751-12d6-4a1e-93cc-8dc96fbaf03f",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
384,
112
],
"parameters": {
"width": 384,
"height": 256,
"content": "## Photograph Generation"
},
"typeVersion": 1
},
{
"id": "a005be5a-d645-4bfa-8929-654358e39fcd",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-320,
-304
],
"parameters": {
"width": 416,
"height": 384,
"content": "## Scheduled Execution"
},
"typeVersion": 1
},
{
"id": "430cc952-6778-4148-aef7-e57583ae19d5",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-320,
112
],
"parameters": {
"width": 416,
"height": 416,
"content": "## Start execution whenever a jotform is submitted. Signup here on JotForm: https://www.jotform.com/?partner=zainurrehman"
},
"typeVersion": 1
}
],
"connections": {
"If": {
"main": [
[
{
"node": "Update row in sheet",
"type": "main",
"index": 0
}
],
[
{
"node": "Add row in sheet",
"type": "main",
"index": 0
}
]
]
},
"Merge": {
"main": [
[
{
"node": "Extract from File",
"type": "main",
"index": 0
}
]
]
},
"Product": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 0
}
]
]
},
"Aggregate": {
"main": [
[
{
"node": "Gemini Nano Banana",
"type": "main",
"index": 0
}
]
]
},
"Edit Fields": {
"main": [
[
{
"node": "Message a model",
"type": "main",
"index": 0
}
]
]
},
"Convert to File": {
"main": [
[
{
"node": "Upload to Drive",
"type": "main",
"index": 0
}
]
]
},
"JotForm Trigger": {
"main": [
[
{
"node": "Edit Fields",
"type": "main",
"index": 0
}
]
]
},
"Message a model": {
"main": [
[
{
"node": "Product",
"type": "main",
"index": 0
},
{
"node": "Reference Image 1",
"type": "main",
"index": 0
},
{
"node": "Reference Image 2",
"type": "main",
"index": 0
}
]
]
},
"Upload to Drive": {
"main": [
[
{
"node": "If",
"type": "main",
"index": 0
}
]
]
},
"Schedule Trigger": {
"main": [
[
{
"node": "Get row(s) in sheet",
"type": "main",
"index": 0
}
]
]
},
"Extract from File": {
"main": [
[
{
"node": "Aggregate",
"type": "main",
"index": 0
}
]
]
},
"Reference Image 1": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 1
}
]
]
},
"Reference Image 2": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 2
}
]
]
},
"Gemini Nano Banana": {
"main": [
[
{
"node": "Get Image Contents",
"type": "main",
"index": 0
}
]
]
},
"Get Image Contents": {
"main": [
[
{
"node": "Convert to File",
"type": "main",
"index": 0
}
]
]
},
"Get row(s) in sheet": {
"main": [
[
{
"node": "Edit Fields",
"type": "main",
"index": 0
}
]
]
},
"When clicking \u2018Execute workflow\u2019": {
"main": [
[
{
"node": "Get row(s) in sheet",
"type": "main",
"index": 0
}
]
]
}
}
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
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 product photography based on your product details and reference images, saves…
Source: https://n8n.io/workflows/9712/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
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.
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
The Problem That it Solves
Scrape ads – Pulls Facebook Ad Library data for "ai automation" keywords using Apify Filter & sort – Filters ads by page likes (>1,000) and separates into videos, images, and text ads Analyze creat
This workflow converts emailed timesheets into structured invoice rows in Google Sheets and stores them in the correct Google Drive folder structure.