Generador de imágenes UGC a través de formularios usando NanoBanana 🍌 y Telegram
Este es unContent Creation, Multimodal AIflujo de automatización del dominio deautomatización que contiene 15 nodos.Utiliza principalmente nodos como Set, Code, Merge, Telegram, FormTrigger. Generar imágenes UGC a partir de envíos de formularios con Google Gemini y Telegram
- •Bot Token de Telegram
- •Pueden requerirse credenciales de autenticación para la API de destino
Nodos utilizados (15)
Categoría
{
"id": "UM5yN01ZX3V2f256",
"meta": {
"instanceId": "237139412ba2bdccb5393d058ace6ee50c6bb809e4f130ea2f9b24f70a336b94",
"templateCredsSetupCompleted": true
},
"name": "UGC Image Generator from Form Submission using NanoBanana 🍌 and Telegram",
"tags": [],
"nodes": [
{
"id": "15aee33e-9193-4bb2-9f9a-cc4ed5cd8eb5",
"name": "Google gemini",
"type": "n8n-nodes-base.httpRequest",
"position": [
1168,
0
],
"parameters": {
"url": "https://openrouter.ai/api/v1/chat/completions",
"method": "POST",
"options": {},
"jsonBody": "={\n \"model\": \"google/gemini-2.5-flash-image-preview\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"Create a realistic and engaging UGC image highlighting this Character product. : {{ $json.personnage }}. Style: lifestyle photo, taken on a smartphone, natural, authentic, and spontaneous atmosphere. Context: the subject holds/uses the product in a simple and natural way: natural light, simple background (living room, office, or urban outdoor setting), soft colors, mid-body framing. Objective: to give the impression that it is a real person recommending the product in UGC content.\"\n },\n {\n \"type\": \"image_url\",\n \"image_url\": {\n \"url\": \"{{ $json.image }}\"\n }\n }\n ]\n }\n ]\n}",
"sendBody": true,
"specifyBody": "json",
"authentication": "predefinedCredentialType",
"nodeCredentialType": "openRouterApi"
},
"credentials": {
"openRouterApi": {
"id": "JGTQZSwkY8TvDVDW",
"name": "OpenRouter account 2"
}
},
"typeVersion": 4.2
},
{
"id": "4d644794-edfa-411e-950e-2a35aee608bf",
"name": "Mapeo",
"type": "n8n-nodes-base.set",
"position": [
976,
0
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "5ba24889-ccd2-4b28-be4e-ba85eb4a1827",
"name": "image",
"type": "string",
"value": "={{ $json.image_url }}"
},
{
"id": "cd52d79a-16b7-41ad-8673-e8a01fc0bd28",
"name": "personnage",
"type": "string",
"value": "={{ $json.modele_personnage }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "813f07a4-a764-4284-9388-cc3a46b50c13",
"name": "Enviar un mensaje con foto",
"type": "n8n-nodes-base.telegram",
"position": [
1808,
0
],
"webhookId": "441e3c91-85fd-4b25-bf68-0f28b0d6d697",
"parameters": {
"chatId": "@assistantjaures",
"operation": "sendPhoto",
"binaryData": true,
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"id": "LPcm8lL2x487aGuB",
"name": "Test"
}
},
"typeVersion": 1.2
},
{
"id": "1a80e40a-b565-4a94-8d50-18ed5a12f2ff",
"name": "Envío de formulario con tipo de personaje e imagen",
"type": "n8n-nodes-base.formTrigger",
"position": [
-144,
-16
],
"webhookId": "251cf601-cb55-403d-86f7-f64f8f52e45a",
"parameters": {
"options": {
"appendAttribution": false
},
"formTitle": "Advertising image generator",
"formFields": {
"values": [
{
"fieldType": "file",
"fieldLabel": "Product image",
"multipleFiles": false,
"requiredField": true,
"acceptFileTypes": ".jpg, .png, .jpeg"
},
{
"fieldType": "dropdown",
"fieldLabel": "Character model",
"fieldOptions": {
"values": [
{
"option": "Homme"
},
{
"option": "Femme"
}
]
},
"requiredField": true
}
]
},
"formDescription": "Turn simple product images into high-quality advertising images"
},
"typeVersion": 2.2
},
{
"id": "76f275ec-0500-4df8-a533-1afd5e5ccf7a",
"name": "Extraer el archivo del formulario",
"type": "n8n-nodes-base.extractFromFile",
"position": [
256,
64
],
"parameters": {
"options": {},
"operation": "binaryToPropery",
"destinationKey": "image_base64",
"binaryPropertyName": "Image_du_produit"
},
"typeVersion": 1
},
{
"id": "68788867-9960-4c5e-a08c-802ce0604215",
"name": "Combinar los dos conjuntos de datos",
"type": "n8n-nodes-base.merge",
"position": [
528,
0
],
"parameters": {
"mode": "combine",
"options": {},
"combineBy": "combineByPosition"
},
"typeVersion": 3.2
},
{
"id": "b95becf0-1bdd-4e55-9040-a428cd6eb3e3",
"name": "Crear una URL de datos",
"type": "n8n-nodes-base.code",
"position": [
752,
0
],
"parameters": {
"jsCode": "// We take the first item.\nconst item = $input.item.json;\n\n// Character model retrieval\nconst modele = item[\"Modèle de personnage\"];\n\n// Base64 recovery\nconst imageBase64 = item[\"image_base64\"];\n\n// Creating a Data URL that can be used in an API\n// ⚡ Change “image/jpeg” if your image is PNG.\nconst imageUrl = `data:image/jpeg;base64,${imageBase64}`;\n\n// Turn everything over\nreturn [\n {\n json: {\n modele_personnage: modele,\n image_url: imageUrl\n }\n }\n];\n"
},
"typeVersion": 2
},
{
"id": "80f40071-4c24-4dd5-bc6a-9cab0fcfa7e6",
"name": "Transformar datos de URL",
"type": "n8n-nodes-base.code",
"position": [
1376,
0
],
"parameters": {
"jsCode": "const output = items[0].json;\n\n// Extraire le base64 depuis choices[0].message.images[0].image_url.url\nlet base64Data = output.choices[0].message.images[0].image_url.url;\n\n// Enlever le préfixe \"data:image/png;base64,\"\nbase64Data = base64Data.replace(/^data:image\\/\\w+;base64,/, \"\");\n\n// Retourner dans un champ \"data\" → Convert to File va l'utiliser\nreturn [\n {\n json: {\n data: base64Data\n }\n }\n];\n"
},
"typeVersion": 2
},
{
"id": "ef8c6191-80bf-40fb-ad4d-f7d9ad0d3978",
"name": "Descargar el archivo",
"type": "n8n-nodes-base.convertToFile",
"position": [
1584,
0
],
"parameters": {
"options": {},
"operation": "toBinary",
"sourceProperty": "data"
},
"typeVersion": 1.1
},
{
"id": "23860a70-7beb-494d-a49b-bb7f83febb7d",
"name": "Nota adhesiva 1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-224,
-128
],
"parameters": {
"color": 6,
"width": 288,
"height": 368,
"content": "## Form Submission with Character Type and Image"
},
"typeVersion": 1
},
{
"id": "e9f831db-eeb7-4780-8a96-6b237b6637f8",
"name": "Nota adhesiva 2",
"type": "n8n-nodes-base.stickyNote",
"position": [
144,
-128
],
"parameters": {
"color": 6,
"width": 560,
"height": 368,
"content": "## Extract the Form File & Merge the Two Data Sets"
},
"typeVersion": 1
},
{
"id": "b8431775-7a92-4174-a6aa-9da3ccb55ff3",
"name": "Nota adhesiva 3",
"type": "n8n-nodes-base.stickyNote",
"position": [
896,
-128
],
"parameters": {
"color": 6,
"width": 592,
"height": 368,
"content": "## NanoBanana UGC image generator "
},
"typeVersion": 1
},
{
"id": "48eb75e1-ed81-471a-a774-d4caf3d52bbd",
"name": "Nota adhesiva 4",
"type": "n8n-nodes-base.stickyNote",
"position": [
1552,
-128
],
"parameters": {
"color": 6,
"width": 496,
"height": 368,
"content": "## UGCImage generated sent to Telegram"
},
"typeVersion": 1
},
{
"id": "1cb6780e-468d-4b9e-87d2-dd5d0152db53",
"name": "Nota adhesiva",
"type": "n8n-nodes-base.stickyNote",
"position": [
-288,
-352
],
"parameters": {
"color": 7,
"width": 2400,
"height": 752,
"content": "## This workflow automates the creation of UGC (User-Generated Content) images by allowing users to submit a form containing:\n\nA character type selection (e.g., male or female)\n\nAn uploaded image (e.g., a photo or artwork)\n\nIt then processes the input, sends it to an AI model (Google Gemini via OpenRouter) to generate a creative response or description, and finally posts the image + AI-generated content to a Telegram channel."
},
"typeVersion": 1
},
{
"id": "fd1e5d7b-bbcb-4478-aa8e-18d85503c8e9",
"name": "Nota adhesiva 6",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1072,
-352
],
"parameters": {
"width": 720,
"height": 1344,
"content": "## This workflow automates the process of generating personalized UGC (User-Generated Content) images based on form submissions.\n\nIt accepts a form with a character type (e.g., male/female) and an uploaded image, merges them, sends them to an AI model (Google Gemini via OpenRouter) for creative generation, and posts the resulting content as a Telegram photo message.\n\n## Who’s it for\n\nThis automation template is designed for marketers, AI creators, content teams, or interactive community platforms that want to let users submit content (image + character type), enrich it with AI-generated descriptions, and instantly publish results to Telegram — without writing a single line of code.\n\n## How it works\n\n- Trigger: Workflow starts when a form is submitted by a user.\n\n- Extract file: The uploaded image file is converted to a Base64 string.\n\n- Merge data: The character type and image data are combined into one payload.\n\n- Format to Data URL: The image is wrapped as a proper data:image/... format for API use.\n\n- Prepare payload: The text and image are mapped into a structure compatible with Gemini API.\n\n- Generate AI content: Sends the input to Google Gemini (via OpenRouter) to generate a UGC description.\n\n- Transform response: Cleans and extracts the result from Gemini’s response.\n\n- Convert back to file: Transforms the Base64 image back into a real image file.\n\n- Send to Telegram: The image and its AI-generated description are sent as a photo message to your Telegram channel.\n\n## How to use\n\n- Set up a form with a dropdown for character type (e.g., Male/Female) and an image upload field.\n\n- Configure the Gemini API access through OpenRouter.\n\n- Connect your Telegram bot and channel to receive the final result.\n\n- Start the workflow → users submit the form, and their data is processed and shared as AI-enhanced UGC.\n\n## Requirements\n\n- OpenRouter API key to access Google Gemini.\n\n- A Telegram Bot connected to your Telegram channel.\n\n## ❓ Need help\n\n**Contact me for consulting and support:** [LinkedIn](https://www.linkedin.com/in/jaures-nya-83a033270/) / [YouTube](https://www.youtube.com/@jauresnya) / [Skool](https://www.skool.com/gaia-4903/about?ref=e0430e4c35b645ac8976b952768e9d55) "
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "45583225-c701-4d95-8ca6-6f650fdd08ad",
"connections": {
"4d644794-edfa-411e-950e-2a35aee608bf": {
"main": [
[
{
"node": "15aee33e-9193-4bb2-9f9a-cc4ed5cd8eb5",
"type": "main",
"index": 0
}
]
]
},
"15aee33e-9193-4bb2-9f9a-cc4ed5cd8eb5": {
"main": [
[
{
"node": "80f40071-4c24-4dd5-bc6a-9cab0fcfa7e6",
"type": "main",
"index": 0
}
]
]
},
"ef8c6191-80bf-40fb-ad4d-f7d9ad0d3978": {
"main": [
[
{
"node": "813f07a4-a764-4284-9388-cc3a46b50c13",
"type": "main",
"index": 0
}
]
]
},
"80f40071-4c24-4dd5-bc6a-9cab0fcfa7e6": {
"main": [
[
{
"node": "ef8c6191-80bf-40fb-ad4d-f7d9ad0d3978",
"type": "main",
"index": 0
}
]
]
},
"b95becf0-1bdd-4e55-9040-a428cd6eb3e3": {
"main": [
[
{
"node": "4d644794-edfa-411e-950e-2a35aee608bf",
"type": "main",
"index": 0
}
]
]
},
"76f275ec-0500-4df8-a533-1afd5e5ccf7a": {
"main": [
[
{
"node": "68788867-9960-4c5e-a08c-802ce0604215",
"type": "main",
"index": 1
}
]
]
},
"68788867-9960-4c5e-a08c-802ce0604215": {
"main": [
[
{
"node": "b95becf0-1bdd-4e55-9040-a428cd6eb3e3",
"type": "main",
"index": 0
}
]
]
},
"1a80e40a-b565-4a94-8d50-18ed5a12f2ff": {
"main": [
[
{
"node": "68788867-9960-4c5e-a08c-802ce0604215",
"type": "main",
"index": 0
},
{
"node": "76f275ec-0500-4df8-a533-1afd5e5ccf7a",
"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?
Intermedio - Creación de contenido, IA Multimodal
¿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
Compartir este flujo de trabajo