Usar Gemini Nano Banana con JotForm y Google Sheets para generar fotos de productos de IA
Este es unautomatización que contiene 24 nodos.Utiliza principalmente nodos como If, Set, Merge, Aggregate, GoogleDrive. Usar Gemini Nano Banana para generar fotos de productos de AI con JotForm y Google Sheets
- •Credenciales de API de Google Drive
- •Pueden requerirse credenciales de autenticación para la API de destino
- •Credenciales de API de Google Sheets
Nodos utilizados (24)
Categoría
{
"nodes": [
{
"id": "e71df02d-0562-4cce-a478-a7dc7fd1d243",
"name": "Al hacer clic en 'Ejecutar flujo de trabajo'",
"type": "n8n-nodes-base.manualTrigger",
"position": [
-240,
-80
],
"parameters": {},
"typeVersion": 1
},
{
"id": "a75b5a3c-6c0e-4baf-a392-491f33a857e6",
"name": "Obtener fila(s) en hoja",
"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": "Enviar mensaje a un modelo",
"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": "Obtener contenido de imagen",
"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": "Subir a 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": "Convertir a archivo",
"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": "Extraer de archivo",
"type": "n8n-nodes-base.extractFromFile",
"position": [
1344,
-80
],
"parameters": {
"options": {},
"operation": "binaryToPropery"
},
"typeVersion": 1
},
{
"id": "50a5cf60-9ab3-4f7d-ac22-4749f0ab9d84",
"name": "Producto",
"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": "Imagen de referencia 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": "Imagen de referencia 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": "Combinar",
"type": "n8n-nodes-base.merge",
"position": [
1152,
-128
],
"parameters": {
"numberInputs": 3
},
"typeVersion": 3.2
},
{
"id": "a56adec8-21dd-46e6-97ef-638feae54fad",
"name": "Agregar",
"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": "Actualizar fila en hoja",
"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": "Activador programado",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
-240,
-240
],
"parameters": {
"rule": {
"interval": [
{
"field": "hours"
}
]
}
},
"typeVersion": 1.2
},
{
"id": "cba50728-4600-4fb7-b1b1-5b6f0f336896",
"name": "Activador de JotForm",
"type": "n8n-nodes-base.jotFormTrigger",
"position": [
-176,
352
],
"webhookId": "a148daa2-8925-4acf-93be-5710745fdafb",
"parameters": {
"form": "252856264643060"
},
"typeVersion": 1
},
{
"id": "dc416865-d5cb-495d-b2fd-200273ff51f9",
"name": "Si",
"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": "Agregar fila en hoja",
"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": "Editar campos",
"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": "Nota adhesiva",
"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": "Nota adhesiva1",
"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": "Nota adhesiva2",
"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": "Nota adhesiva3",
"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": "Nota adhesiva4",
"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": {
"dc416865-d5cb-495d-b2fd-200273ff51f9": {
"main": [
[
{
"node": "e6e97e70-26ae-47a2-a52f-e837cf5a81b9",
"type": "main",
"index": 0
}
],
[
{
"node": "d7303fbc-13f6-4efa-a31a-3760b5650965",
"type": "main",
"index": 0
}
]
]
},
"5687cc9c-f5b5-4fee-b4b2-92e34851947e": {
"main": [
[
{
"node": "e36ee194-147c-40e6-8a76-ef40f9a77adc",
"type": "main",
"index": 0
}
]
]
},
"50a5cf60-9ab3-4f7d-ac22-4749f0ab9d84": {
"main": [
[
{
"node": "5687cc9c-f5b5-4fee-b4b2-92e34851947e",
"type": "main",
"index": 0
}
]
]
},
"a56adec8-21dd-46e6-97ef-638feae54fad": {
"main": [
[
{
"node": "7d1905dd-c4c0-417a-ab8d-fff552072586",
"type": "main",
"index": 0
}
]
]
},
"1da62ce5-fff7-487e-8df8-3298733fca87": {
"main": [
[
{
"node": "18ce7b03-7ff8-4385-957c-61b7f27accd5",
"type": "main",
"index": 0
}
]
]
},
"3c09fc45-ace9-46f0-a360-4a41d06c7bea": {
"main": [
[
{
"node": "1a7630c1-81de-4116-aaff-6f4dd59d0efc",
"type": "main",
"index": 0
}
]
]
},
"cba50728-4600-4fb7-b1b1-5b6f0f336896": {
"main": [
[
{
"node": "1da62ce5-fff7-487e-8df8-3298733fca87",
"type": "main",
"index": 0
}
]
]
},
"18ce7b03-7ff8-4385-957c-61b7f27accd5": {
"main": [
[
{
"node": "50a5cf60-9ab3-4f7d-ac22-4749f0ab9d84",
"type": "main",
"index": 0
},
{
"node": "5a106c94-7701-4182-afff-1585a0f9bc6b",
"type": "main",
"index": 0
},
{
"node": "67288856-65b9-4c0c-8740-dbda2277b32f",
"type": "main",
"index": 0
}
]
]
},
"1a7630c1-81de-4116-aaff-6f4dd59d0efc": {
"main": [
[
{
"node": "dc416865-d5cb-495d-b2fd-200273ff51f9",
"type": "main",
"index": 0
}
]
]
},
"b7d366da-2337-4e1f-8814-569868db76c3": {
"main": [
[
{
"node": "a75b5a3c-6c0e-4baf-a392-491f33a857e6",
"type": "main",
"index": 0
}
]
]
},
"e36ee194-147c-40e6-8a76-ef40f9a77adc": {
"main": [
[
{
"node": "a56adec8-21dd-46e6-97ef-638feae54fad",
"type": "main",
"index": 0
}
]
]
},
"5a106c94-7701-4182-afff-1585a0f9bc6b": {
"main": [
[
{
"node": "5687cc9c-f5b5-4fee-b4b2-92e34851947e",
"type": "main",
"index": 1
}
]
]
},
"67288856-65b9-4c0c-8740-dbda2277b32f": {
"main": [
[
{
"node": "5687cc9c-f5b5-4fee-b4b2-92e34851947e",
"type": "main",
"index": 2
}
]
]
},
"7d1905dd-c4c0-417a-ab8d-fff552072586": {
"main": [
[
{
"node": "ddeb1d41-ba0c-4904-a854-d34dd46c846e",
"type": "main",
"index": 0
}
]
]
},
"ddeb1d41-ba0c-4904-a854-d34dd46c846e": {
"main": [
[
{
"node": "3c09fc45-ace9-46f0-a360-4a41d06c7bea",
"type": "main",
"index": 0
}
]
]
},
"a75b5a3c-6c0e-4baf-a392-491f33a857e6": {
"main": [
[
{
"node": "1da62ce5-fff7-487e-8df8-3298733fca87",
"type": "main",
"index": 0
}
]
]
},
"e71df02d-0562-4cce-a478-a7dc7fd1d243": {
"main": [
[
{
"node": "a75b5a3c-6c0e-4baf-a392-491f33a857e6",
"type": "main",
"index": 0
}
]
]
}
}
}¿Cómo usar este flujo de trabajo?
Copie el código de configuración JSON de arriba, cree un nuevo flujo de trabajo en su instancia de n8n y seleccione "Importar desde JSON", pegue la configuración y luego modifique la configuración de credenciales según sea necesario.
¿En qué escenarios es adecuado este flujo de trabajo?
Avanzado
¿Es de pago?
Este flujo de trabajo es completamente gratuito, puede importarlo y usarlo directamente. Sin embargo, tenga en cuenta que los servicios de terceros utilizados en el flujo de trabajo (como la API de OpenAI) pueden requerir un pago por su cuenta.
Flujos de trabajo relacionados recomendados
Zain Khan
@zainI partner with businesses to streamline processes and accelerate growth through intelligent AI automation and Web/mobile Development. Leveraging deep expertise in GPT-4, LangChain, and n8n, I develop AI-powered agents and sophisticated LLM pipelines.
Compartir este flujo de trabajo