💥 Generación de videos promocionales UGC para comercio electrónico con Blotato y Sora 2
Este es unContent Creation, Multimodal AIflujo de automatización del dominio deautomatización que contiene 34 nodos.Utiliza principalmente nodos como If, Set, Code, Wait, Merge. Generar videos promocionales UGC para comercio electrónico con OpenAI, Sora 2 y Blotato
- •Bot Token de Telegram
- •Pueden requerirse credenciales de autenticación para la API de destino
- •Clave de API de OpenAI
Nodos utilizados (34)
Categoría
{
"id": "do5lGSCHCPT5YhMr",
"meta": {
"instanceId": "de822f81f3a2367cef7d9549771a77783236bc9596481be2ae65c05fbcc4b4fd",
"templateCredsSetupCompleted": true
},
"name": "💥 Generate UGC Promo Videos with Blotato and Sora 2 for eCommerce vi",
"tags": [],
"nodes": [
{
"id": "9e45bc31-7369-48b0-8d37-93cf2faa5418",
"name": "Telegram Trigger",
"type": "n8n-nodes-base.telegramTrigger",
"position": [
-25824,
2112
],
"webhookId": "f923f8b2-db4f-4e83-bf4c-f4567278577e",
"parameters": {
"updates": [
"message"
],
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"id": "zgSdbTYtyudxXPgU",
"name": "Telegram_sora2"
}
},
"typeVersion": 1.2
},
{
"id": "d118bd83-021e-470c-b6e2-f45fdced945b",
"name": "Configuración del Flujo de Trabajo",
"type": "n8n-nodes-base.set",
"position": [
-25504,
2112
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "id-4",
"name": "maxPollingAttempts",
"type": "number",
"value": 20
},
{
"id": "id-5",
"name": "falApiKey",
"type": "string",
"value": "YOUR_API_falApiKey"
},
{
"id": "8b717e51-3c27-4787-b358-019f1438ea6c",
"name": "Model",
"type": "string",
"value": "sora-2"
},
{
"id": "c48eceea-cfec-4a6f-a379-127a3af40ad2",
"name": "aspect_ratio",
"type": "string",
"value": "9:16"
},
{
"id": "385e9561-7491-4df9-8f92-10b1a70180a8",
"name": "duration",
"type": "string",
"value": "12"
}
]
},
"includeOtherFields": true
},
"typeVersion": 3.4
},
{
"id": "f6b90f3d-c3a2-4ac4-94ec-dbcad40cc333",
"name": "Analizar Respuesta del Script",
"type": "n8n-nodes-base.code",
"position": [
-24256,
2112
],
"parameters": {
"jsCode": "const response = $input.first().json;\nconst chatId = $('Extract Photo and text').first().json?.message?.chat?.id;\n\nif (!chatId) {\n throw new Error('Chat ID not found in workflow data');\n}\n\n// OpenAI node with JSON output returns parsed object directly in message.content\nconst scriptContent = response?.message?.content || response?.content || {};\n\nreturn [{\n json: {\n script: JSON.stringify(scriptContent),\n frames: scriptContent.frames || [],\n hashtags: scriptContent.hashtags || [],\n chatId: chatId\n }\n}];"
},
"typeVersion": 2
},
{
"id": "5ab4832e-f0f0-48c6-961e-066ef12b23a9",
"name": "Enviar a Sora 2 API",
"type": "n8n-nodes-base.httpRequest",
"position": [
-25824,
2416
],
"parameters": {
"url": "https://queue.fal.run/fal-ai/sora-2/image-to-video",
"method": "POST",
"options": {},
"jsonBody": "={\n \"prompt\": \"{{ JSON.stringify($('Parse Script Response').first().json.script.replaceAll(/\\\\n/g, '')).slice(1, -1) }}\",\n \"resolution\": \"auto\",\n \"aspect_ratio\": \"9:16\",\n \"duration\": {{ $('Workflow Configuration').item.json.duration }},\n \"image_url\": \"{{ $json.data.url.replace(/^http:\\/\\/tmpfiles\\.org\\/(\\d+)\\/(.*)$/i, 'https://tmpfiles.org/dl/$1/$2') }}\"\n}\n",
"sendBody": true,
"sendHeaders": true,
"specifyBody": "json",
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "={{ 'Key ' + $('Workflow Configuration').first().json.falApiKey }}"
},
{
"name": "Content-Type",
"value": "application/json"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "14948abc-ed10-44d4-92c8-02ccc2c6c207",
"name": "Extraer ID del Trabajo de Video",
"type": "n8n-nodes-base.code",
"position": [
-25600,
2416
],
"parameters": {
"jsCode": "const response = $input.first().json;\nconst chatId = $('Extract Photo and text').first().json?.message?.chat?.id;\n\nif (!response?.request_id) {\n throw new Error('Request ID not found in API response');\n}\n\nif (!chatId) {\n throw new Error('Chat ID not found in workflow data');\n}\n\nreturn [{\n json: {\n requestId: response.request_id,\n chatId: chatId,\n pollingAttempt: 0\n }\n}];"
},
"typeVersion": 2
},
{
"id": "1522a6fd-be95-4fe2-910f-57e60e19ac64",
"name": "Esperar 15 Segundos",
"type": "n8n-nodes-base.wait",
"position": [
-25376,
2416
],
"webhookId": "541fabb9-5832-4085-a6a1-67cb764cd9ca",
"parameters": {
"amount": 1
},
"typeVersion": 1.1
},
{
"id": "4f83db5c-7a5a-4fc9-9a5a-a1239caa6c57",
"name": "Verificar Estado del Video",
"type": "n8n-nodes-base.httpRequest",
"position": [
-25152,
2416
],
"parameters": {
"url": "=https://queue.fal.run/fal-ai/sora-2/requests/{{ $json.requestId }}/status",
"options": {},
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "={{ 'Key ' + $('Workflow Configuration').first().json.falApiKey }}"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "ad3a9068-d0f2-4982-8093-bf8d4c332409",
"name": "Analizar Respuesta de Estado",
"type": "n8n-nodes-base.code",
"position": [
-24928,
2416
],
"parameters": {
"jsCode": "const response = $input.first().json;\nconst previousData = $('Extract Video Job ID').first().json;\n\nif (!previousData) {\n throw new Error('Previous polling data not found');\n}\n\nreturn [{\n json: {\n status: response?.status || 'UNKNOWN',\n videoUrl: response?.video?.url || null,\n requestId: previousData.requestId,\n chatId: previousData.chatId,\n pollingAttempt: (previousData.pollingAttempt || 0) + 1\n }\n}];"
},
"typeVersion": 2
},
{
"id": "d684fc56-82ab-4c97-b53f-4068526a9f6d",
"name": "Verificar si está Completo",
"type": "n8n-nodes-base.if",
"position": [
-24256,
2416
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "or",
"conditions": [
{
"id": "id-1",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $('Parse Status Response').item.json.status }}",
"rightValue": "COMPLETED"
},
{
"id": "id-2",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $('Parse Status Response').item.json.status }}",
"rightValue": "succeeded"
},
{
"id": "id-3",
"operator": {
"type": "number",
"operation": "gte"
},
"leftValue": "={{ $('Parse Status Response').item.json.pollingAttempt }}",
"rightValue": "={{ $('Workflow Configuration').first().json.maxPollingAttempts }}"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "631abf93-a412-4769-9161-941e666fb3bb",
"name": "Descargar Archivo de Video",
"type": "n8n-nodes-base.httpRequest",
"position": [
-23808,
2400
],
"parameters": {
"url": "=https://queue.fal.run/fal-ai/sora-2/requests/{{ $json.requestId }}",
"options": {},
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "={{ 'Key ' + $('Workflow Configuration').first().json.falApiKey }}"
},
{
"name": "Content-Type",
"value": "application/json"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "9c4e387d-d47b-44b2-9fd4-2b08cf029a43",
"name": "Enviar Video a Telegram",
"type": "n8n-nodes-base.telegram",
"position": [
-25296,
2864
],
"webhookId": "d9da2536-a395-44dd-b680-5de6163e36cb",
"parameters": {
"file": "={{ $json.video.url }}",
"chatId": "={{ $('Telegram Trigger').first().json.message.chat.id }}",
"operation": "sendVideo",
"additionalFields": {
"caption": "=Your UGC video is ready! 🎥 {{ $json.video.url }}"
}
},
"credentials": {
"telegramApi": {
"id": "zgSdbTYtyudxXPgU",
"name": "Telegram_sora2"
}
},
"typeVersion": 1.2
},
{
"id": "2dad18e3-3b7a-47f6-b948-4c327fa60c1d",
"name": "Enviar Mensaje de Error",
"type": "n8n-nodes-base.telegram",
"position": [
-24016,
2432
],
"webhookId": "4df1ee60-06c0-4389-afb0-f6002132b0aa",
"parameters": {
"text": "Video generation timed out or failed. Please try again with a different product image or description.",
"chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"id": "zgSdbTYtyudxXPgU",
"name": "Telegram_sora2"
}
},
"typeVersion": 1.2
},
{
"id": "dcfa0e97-1b56-48a4-aacc-bf0f7dfb1257",
"name": "Analizar Imagen del Producto (Vision API)",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
-24832,
2112
],
"parameters": {
"text": "=Analyze this product image and extract: 1) Product name and category, 2) Key features and benefits, 3) Target audience, 4) Visual elements (colors, style, packaging). Promotion objective: {{ $('Extract Photo and text').item.json.promotionText }}",
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini",
"cachedResultName": "GPT-4O-MINI"
},
"options": {},
"resource": "image",
"inputType": "base64",
"operation": "analyze"
},
"credentials": {
"openAiApi": {
"id": "QmtwfFk8iBkuCXOX",
"name": "n8n free OpenAI API credits"
}
},
"typeVersion": 1.8
},
{
"id": "918f735a-2b6a-4515-8c6f-61778196300f",
"name": "Obtener Archivo de Foto de Telegram",
"type": "n8n-nodes-base.telegram",
"position": [
-25056,
2112
],
"webhookId": "8f993dc8-22f5-4b69-99e4-b16c0f6487ab",
"parameters": {
"fileId": "={{ $json.photoUrl }}",
"resource": "file",
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"id": "zgSdbTYtyudxXPgU",
"name": "Telegram_sora2"
}
},
"typeVersion": 1.2
},
{
"id": "9cae8d6a-31a4-462d-8482-93ac5b591125",
"name": "Extraer Foto y Texto",
"type": "n8n-nodes-base.set",
"position": [
-25280,
2112
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "id-1",
"name": "photoUrl",
"type": "string",
"value": "={{ $json.message.photo ? $json.message.photo[$json.message.photo.length - 1].file_id : '' }}"
},
{
"id": "id-2",
"name": "promotionText",
"type": "string",
"value": "={{ $json.message.caption || $json.message.text }}"
}
]
},
"includeOtherFields": true
},
"typeVersion": 3.4
},
{
"id": "ea8c58ec-28d1-47ac-b891-5f520a197d47",
"name": "Generar Guion UGC (OpenAI)",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
-24608,
2112
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "id",
"value": "gpt-4o-mini"
},
"options": {
"temperature": 0.8
},
"messages": {
"values": [
{
"role": "system",
"content": "You are a UGC video script writer. Create a 12-second video script with frame-by-frame breakdown, natural dialogue, camera movements, and captions. Format as JSON with fields: frames (array of {timestamp, scene, dialogue, camera, caption}), hashtags (array)."
},
{
"content": "={{ 'Product Analysis: ' + $json.content + '\\n\\nPromotion Objective: ' + $('Extract Photo and text').first().json.promotionText + '\\n\\nCreate a compelling 12-second UGC video script.' }}"
}
]
},
"jsonOutput": true
},
"credentials": {
"openAiApi": {
"id": "QmtwfFk8iBkuCXOX",
"name": "n8n free OpenAI API credits"
}
},
"typeVersion": 1.8
},
{
"id": "cf8da3a8-e430-42b9-bcbe-d771ff736a85",
"name": "Construir URL Pública de Imagen",
"type": "n8n-nodes-base.httpRequest",
"position": [
-24832,
1952
],
"parameters": {
"url": "https://tmpfiles.org/api/v1/upload",
"method": "POST",
"options": {
"response": {
"response": {
"responseFormat": "json"
}
}
},
"sendBody": true,
"contentType": "multipart-form-data",
"bodyParameters": {
"parameters": [
{
"name": "file",
"parameterType": "formBinaryData",
"inputDataFieldName": "data"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "e8db0d52-21e4-47a1-bf83-2b90fadeeddd",
"name": "Combinar",
"type": "n8n-nodes-base.merge",
"position": [
-23824,
2096
],
"parameters": {},
"typeVersion": 3.2
},
{
"id": "34552393-86ff-4988-b40a-dae3c0d0d34b",
"name": "Paso 5 - Publicación",
"type": "n8n-nodes-base.stickyNote",
"position": [
-25904,
2672
],
"parameters": {
"color": 5,
"width": 2220,
"height": 404,
"content": "# 📤 STEP 5: PUBLISHING & TRACKING\n\n### Install the Blotato [Blotato](https://blotato.com/?ref=firas) Node in n8n (Community Nodes)\n1. In n8n, open **Settings → Community Nodes**. \n2. Click **Install**, then add: `@blotato/n8n-nodes-blotato`. \n3. Log in to **Blotato**. \n4. Go to **Settings → API Keys**. \n5. In n8n → **Credentials → New**. \n6. Choose **Blotato API** \n(provided by the community node you installed). \n\n2. TikTok Publishing (Blotato):\n • Pre-configured to auto-publish\n • Uses caption from GPT-4\n • Privacy: Public\n • Requires Blotato API key from Step 2"
},
"typeVersion": 1
},
{
"id": "cb7916cc-10d4-435d-a893-6d6a613811b5",
"name": "Subir Video a BLOTATO",
"type": "@blotato/n8n-nodes-blotato.blotato",
"position": [
-24720,
2864
],
"parameters": {
"mediaUrl": "={{ $('Download Video File').item.json.video.url }}",
"resource": "media"
},
"credentials": {
"blotatoApi": {
"id": "wozsYJYLfCZO37j8",
"name": "Blotato account"
}
},
"typeVersion": 2
},
{
"id": "8fa12c0b-cceb-4ef0-80d4-533435d017f1",
"name": "Youtube",
"type": "@blotato/n8n-nodes-blotato.blotato",
"position": [
-24192,
2864
],
"parameters": {
"options": {},
"platform": "youtube",
"accountId": {
"__rl": true,
"mode": "list",
"value": "8047",
"cachedResultUrl": "https://backend.blotato.com/v2/accounts/8047",
"cachedResultName": "DR FIRASS (Dr. Firas)"
},
"postContentText": "={{ $('Generate Caption with GPT-4').item.json.message.content }}",
"postContentMediaUrls": "={{ $json.url }}",
"postCreateYoutubeOptionTitle": "={{ $('Generate UGC Script (OpenAI)').first().json.message.content.hashtags[0] }}",
"postCreateYoutubeOptionPrivacyStatus": "private",
"postCreateYoutubeOptionShouldNotifySubscribers": false
},
"credentials": {
"blotatoApi": {
"id": "wozsYJYLfCZO37j8",
"name": "Blotato account"
}
},
"typeVersion": 2
},
{
"id": "c85dd58e-e7c3-49fe-bc5b-56db1931ce02",
"name": "Tiktok",
"type": "@blotato/n8n-nodes-blotato.blotato",
"position": [
-24512,
2704
],
"parameters": {
"options": {},
"platform": "tiktok",
"accountId": {
"__rl": true,
"mode": "list",
"value": "2079",
"cachedResultUrl": "https://backend.blotato.com/v2/accounts/2079",
"cachedResultName": "elitecybzcs"
},
"postContentText": "={{ $('Generate Caption with GPT-4').item.json.message.content }}",
"postContentMediaUrls": "={{ $json.url }}"
},
"credentials": {
"blotatoApi": {
"id": "wozsYJYLfCZO37j8",
"name": "Blotato account"
}
},
"typeVersion": 2
},
{
"id": "7862107b-f886-4d41-8f2e-0523f7a8f2ce",
"name": "Linkedin",
"type": "@blotato/n8n-nodes-blotato.blotato",
"position": [
-24352,
2704
],
"parameters": {
"options": {},
"platform": "linkedin",
"accountId": {
"__rl": true,
"mode": "list",
"value": "1446",
"cachedResultUrl": "https://backend.blotato.com/v2/accounts/1446",
"cachedResultName": "Samuel Amalric"
},
"postContentText": "={{ $('Generate Caption with GPT-4').item.json.message.content }}",
"postContentMediaUrls": "={{ $json.url }}"
},
"credentials": {
"blotatoApi": {
"id": "wozsYJYLfCZO37j8",
"name": "Blotato account"
}
},
"typeVersion": 2
},
{
"id": "6cd5c506-f060-4d32-8425-383ff2b030b7",
"name": "Facebook",
"type": "@blotato/n8n-nodes-blotato.blotato",
"position": [
-24192,
2704
],
"parameters": {
"options": {},
"platform": "facebook",
"accountId": {
"__rl": true,
"mode": "list",
"value": "1759",
"cachedResultUrl": "https://backend.blotato.com/v2/accounts/1759",
"cachedResultName": "Firass Ben"
},
"facebookPageId": {
"__rl": true,
"mode": "list",
"value": "101603614680195",
"cachedResultUrl": "https://backend.blotato.com/v2/accounts/1759/subaccounts/101603614680195",
"cachedResultName": "Dr. Firas"
},
"postContentText": "={{ $('Generate Caption with GPT-4').item.json.message.content }}",
"postContentMediaUrls": "={{ $json.url }}"
},
"credentials": {
"blotatoApi": {
"id": "wozsYJYLfCZO37j8",
"name": "Blotato account"
}
},
"typeVersion": 2
},
{
"id": "6560abd1-2f85-492b-bd6c-22b80dff52d1",
"name": "Instagram",
"type": "@blotato/n8n-nodes-blotato.blotato",
"position": [
-24512,
2864
],
"parameters": {
"options": {},
"accountId": {
"__rl": true,
"mode": "list",
"value": "1687",
"cachedResultUrl": "https://backend.blotato.com/v2/accounts/1687",
"cachedResultName": "acces.a.vie"
},
"postContentText": "={{ $('Generate Caption with GPT-4').item.json.message.content }}",
"postContentMediaUrls": "={{ $json.url }}"
},
"credentials": {
"blotatoApi": {
"id": "wozsYJYLfCZO37j8",
"name": "Blotato account"
}
},
"typeVersion": 2
},
{
"id": "9d7bce3c-c612-4f2d-aee0-04cd913a95b0",
"name": "Twitter (X)",
"type": "@blotato/n8n-nodes-blotato.blotato",
"position": [
-24352,
2864
],
"parameters": {
"options": {},
"platform": "twitter",
"accountId": {
"__rl": true,
"mode": "list",
"value": "1289",
"cachedResultUrl": "https://backend.blotato.com/v2/accounts/1289",
"cachedResultName": "Docteur_Firas"
},
"postContentText": "={{ $('Generate Caption with GPT-4').item.json.message.content }}",
"postContentMediaUrls": "={{ $json.url }}"
},
"credentials": {
"blotatoApi": {
"id": "wozsYJYLfCZO37j8",
"name": "Blotato account"
}
},
"typeVersion": 2
},
{
"id": "7b249aeb-b539-45d2-ba07-c6b41de4f491",
"name": "Combinar1",
"type": "n8n-nodes-base.merge",
"position": [
-23984,
2720
],
"parameters": {
"mode": "chooseBranch",
"numberInputs": 6
},
"typeVersion": 3.2
},
{
"id": "4ae0f34b-7d81-426c-9b8f-4a01ad24409a",
"name": "Enviar un mensaje de texto",
"type": "n8n-nodes-base.telegram",
"position": [
-23824,
2784
],
"webhookId": "fe254b6f-f102-4441-96a6-d80efe3c766d",
"parameters": {
"text": "Published",
"chatId": "={{ $('Telegram Trigger').first().json.message.chat.id }}",
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"id": "zgSdbTYtyudxXPgU",
"name": "Telegram_sora2"
}
},
"typeVersion": 1.2
},
{
"id": "41eb8c26-670d-4940-9bc9-ba90613e74c2",
"name": "Generar Leyenda con GPT-4",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
-25072,
2864
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "id",
"value": "gpt-4o-mini"
},
"options": {},
"messages": {
"values": [
{
"content": "=Create an engaging TikTok caption for a video about: {{ $('Telegram Trigger').first().json.message.caption }}\n\nBased on these trends: {{ $('Generate UGC Script (OpenAI)').first().json.message.content.hashtags[0] }}{{ $('Generate UGC Script (OpenAI)').first().json.message.content.hashtags[1] }}{{ $('Generate UGC Script (OpenAI)').first().json.message.content.hashtags[2] }}\n\nRequirements:\n- Catchy hook in first line\n- Include 5-8 relevant trending hashtags\n- Keep it concise and engaging\n- Optimize for TikTok algorithm\n- Return ONLY the caption text with hashtags, nothing else"
}
]
}
},
"credentials": {
"openAiApi": {
"id": "QmtwfFk8iBkuCXOX",
"name": "n8n free OpenAI API credits"
}
},
"typeVersion": 1.8
},
{
"id": "ac940182-725e-4875-be7a-45f874be7f7b",
"name": "Paso 1 - Configuración de Telegram",
"type": "n8n-nodes-base.stickyNote",
"position": [
-25408,
1120
],
"parameters": {
"color": 3,
"width": 420,
"height": 820,
"content": "# 📱 STEP 1: TELEGRAM BOT SETUP\n\n## 📄 **Documentation**: [Notion Guide](https://automatisation.notion.site/Generate-UGC-Promo-Videos-with-Blotato-and-Sora-2-for-eCommerce-2a23d6550fd980898426fe195192da6d?source=copy_link)\n\n## Create Your Telegram Bot:\n1. Open Telegram and search for @BotFather\n2. Send /newbot command\n3. Choose a name for your bot (e.g., \"UGC Video Generator\")\n4. Choose a username (must end with 'bot', e.g., \"myugc_video_bot\")\n5. Copy the API token provided\n\n## Configure Telegram Trigger Node:\n1. Click on \"Telegram Trigger\" node\n2. Create new credential\n3. Paste your bot token\n4. Save credential\n\n## Configure Telegram Nodes:\nThe following nodes need the same credential:\n• Get Photo File from Telegram\n• Send Video to Telegram\n• Send Error Message\n\n## Test Your Bot:\n1. Activate this workflow\n2. Find your bot in Telegram\n3. Send /start to begin\n4. Send a product image with caption"
},
"typeVersion": 1
},
{
"id": "41d17c01-3d6b-4390-a3e0-ddbe5e1e011c",
"name": "Paso 2 - Configuración",
"type": "n8n-nodes-base.stickyNote",
"position": [
-24976,
1120
],
"parameters": {
"color": 6,
"width": 420,
"height": 820,
"content": "# ⚙️ STEP 2: API KEYS CONFIGURATION\n\n## Workflow Configuration Node:\nThis node stores all API keys and settings.\n\n### 1. FAL.ai API Key:\n• Go to https://fal.ai/\n• Sign up / Log in\n• Navigate to Dashboard → API Keys\n• Create new API key\n• Copy and paste in 'falApiKey' field\n\n### 2. OpenAI API Key:\n• Already configured with n8n free credits\n• Or use your own: https://platform.openai.com/api-keys\n\n### 3. Video Settings (Pre-configured):\n• maxPollingAttempts: 20 (max wait cycles)\n• Model: sora-2\n• aspect_ratio: 9:16 (vertical video)\n• duration: 12 (seconds)\n\n💡 You can adjust these values based on your needs:\n- Change duration: 5, 10, or 12 seconds\n- Change aspect_ratio: 16:9, 9:16, or 1:1"
},
"typeVersion": 1
},
{
"id": "334f22f1-d976-4c69-9d08-803a94e395eb",
"name": "Paso 3 - Análisis de IA",
"type": "n8n-nodes-base.stickyNote",
"position": [
-24544,
1120
],
"parameters": {
"color": 5,
"width": 420,
"height": 820,
"content": "# 🤖 STEP 3: AI ANALYSIS & SCRIPT GENERATION\n\n## How It Works:\n\n### Extract Photo and Text:\n• Extracts the highest quality photo from Telegram\n• Captures your promotion text/caption\n\n### Get Photo File from Telegram:\n• Downloads the actual image file\n• Prepares it for AI analysis\n\n### Build Public Image URL:\n• Uploads image to tmpfiles.org\n• Creates publicly accessible URL\n• Required for Sora 2 API\n\n### Analyze Product Image (Vision API):\n• Uses GPT-4o-mini with vision\n• Analyzes: product features, target audience, visual style\n• Extracts key selling points\n\n### Generate UGC Script (OpenAI):\n• Creates 12-second video script\n• Frame-by-frame breakdown\n• Natural dialogue and camera movements\n• Generates trending hashtags\n• Output: JSON format with frames array\n\n✅ No configuration needed - already set up!"
},
"typeVersion": 1
},
{
"id": "76c4ca21-2f00-4ecc-ac7b-1fbb05f2b8df",
"name": "Paso 4 - Generación de Video",
"type": "n8n-nodes-base.stickyNote",
"position": [
-24112,
1120
],
"parameters": {
"color": 7,
"width": 420,
"height": 820,
"content": "# 🎥 STEP 4: VIDEO GENERATION WITH SORA 2\n\n## Process Flow:\n\n### 1. Submit to Sora 2 API:\n• Sends image URL + script to FAL.ai\n• Uses Sora 2 image-to-video model\n• Returns job request_id\n\n### 2. Polling Loop (Wait → Check → Parse):\n• Waits 15 seconds between checks\n• Checks video generation status\n• Continues until complete or timeout\n• Max attempts: 20 (configurable)\n\n### 3. Check If Complete:\nRoutes based on status:\n• ✅ COMPLETED/succeeded → Download video\n• ⏳ IN_PROGRESS → Continue polling\n• ❌ Timeout → Send error message\n\n### 4. Download Video File:\n• Retrieves final video from FAL.ai\n• Prepares for Telegram delivery\n\n### 5. Send Video to Telegram:\n• Delivers video to your chat\n• Includes video URL in caption"
},
"typeVersion": 1
},
{
"id": "3cab5acb-c563-4dd6-bea5-8e379eb184d3",
"name": "Resumen del Flujo de Trabajo",
"type": "n8n-nodes-base.stickyNote",
"position": [
-25904,
1120
],
"parameters": {
"color": 4,
"width": 480,
"height": 816,
"content": "# 🎬 AUTOMATED UGC VIDEO GENERATOR\n\n### 🎥 Watch This Tutorial\n\n@[youtube](SZMWXW8Vk8E)\n\n## 📋 What This Workflow Does:\nTransforms product images into professional UGC marketing videos automatically:\n\n1️⃣ Receives product image + description via Telegram\n2️⃣ AI analyzes product features and target audience\n3️⃣ Generates engaging 12-second video script\n4️⃣ Creates video using Sora 2 AI (image-to-video)\n5️⃣ Delivers final video back to Telegram\n\n## 📬 Need Help or Want to Customize This?\n**Contact me for consulting and support:** [LinkedIn](https://www.linkedin.com/in/dr-firas/) / [YouTube](https://www.youtube.com/@DRFIRASS) / [🚀 Mes Ateliers n8n ](https://hotm.art/formation-n8n)"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "5bc27066-9611-429d-b92c-0322e7781b5d",
"connections": {
"e8db0d52-21e4-47a1-bf83-2b90fadeeddd": {
"main": [
[
{
"node": "5ab4832e-f0f0-48c6-961e-066ef12b23a9",
"type": "main",
"index": 0
}
]
]
},
"7b249aeb-b539-45d2-ba07-c6b41de4f491": {
"main": [
[
{
"node": "4ae0f34b-7d81-426c-9b8f-4a01ad24409a",
"type": "main",
"index": 0
}
]
]
},
"c85dd58e-e7c3-49fe-bc5b-56db1931ce02": {
"main": [
[
{
"node": "7b249aeb-b539-45d2-ba07-c6b41de4f491",
"type": "main",
"index": 0
}
]
]
},
"8fa12c0b-cceb-4ef0-80d4-533435d017f1": {
"main": [
[
{
"node": "7b249aeb-b539-45d2-ba07-c6b41de4f491",
"type": "main",
"index": 5
}
]
]
},
"6cd5c506-f060-4d32-8425-383ff2b030b7": {
"main": [
[
{
"node": "7b249aeb-b539-45d2-ba07-c6b41de4f491",
"type": "main",
"index": 2
}
]
]
},
"7862107b-f886-4d41-8f2e-0523f7a8f2ce": {
"main": [
[
{
"node": "7b249aeb-b539-45d2-ba07-c6b41de4f491",
"type": "main",
"index": 1
}
]
]
},
"6560abd1-2f85-492b-bd6c-22b80dff52d1": {
"main": [
[
{
"node": "7b249aeb-b539-45d2-ba07-c6b41de4f491",
"type": "main",
"index": 3
}
]
]
},
"9d7bce3c-c612-4f2d-aee0-04cd913a95b0": {
"main": [
[
{
"node": "7b249aeb-b539-45d2-ba07-c6b41de4f491",
"type": "main",
"index": 4
}
]
]
},
"1522a6fd-be95-4fe2-910f-57e60e19ac64": {
"main": [
[
{
"node": "4f83db5c-7a5a-4fc9-9a5a-a1239caa6c57",
"type": "main",
"index": 0
}
]
]
},
"9e45bc31-7369-48b0-8d37-93cf2faa5418": {
"main": [
[
{
"node": "d118bd83-021e-470c-b6e2-f45fdced945b",
"type": "main",
"index": 0
}
]
]
},
"d684fc56-82ab-4c97-b53f-4068526a9f6d": {
"main": [
[
{
"node": "631abf93-a412-4769-9161-941e666fb3bb",
"type": "main",
"index": 0
}
],
[
{
"node": "1522a6fd-be95-4fe2-910f-57e60e19ac64",
"type": "main",
"index": 0
},
{
"node": "2dad18e3-3b7a-47f6-b948-4c327fa60c1d",
"type": "main",
"index": 0
}
]
]
},
"4f83db5c-7a5a-4fc9-9a5a-a1239caa6c57": {
"main": [
[
{
"node": "ad3a9068-d0f2-4982-8093-bf8d4c332409",
"type": "main",
"index": 0
}
]
]
},
"631abf93-a412-4769-9161-941e666fb3bb": {
"main": [
[
{
"node": "9c4e387d-d47b-44b2-9fd4-2b08cf029a43",
"type": "main",
"index": 0
}
]
]
},
"14948abc-ed10-44d4-92c8-02ccc2c6c207": {
"main": [
[
{
"node": "1522a6fd-be95-4fe2-910f-57e60e19ac64",
"type": "main",
"index": 0
}
]
]
},
"5ab4832e-f0f0-48c6-961e-066ef12b23a9": {
"main": [
[
{
"node": "14948abc-ed10-44d4-92c8-02ccc2c6c207",
"type": "main",
"index": 0
}
]
]
},
"f6b90f3d-c3a2-4ac4-94ec-dbcad40cc333": {
"main": [
[
{
"node": "e8db0d52-21e4-47a1-bf83-2b90fadeeddd",
"type": "main",
"index": 1
}
]
]
},
"ad3a9068-d0f2-4982-8093-bf8d4c332409": {
"main": [
[
{
"node": "d684fc56-82ab-4c97-b53f-4068526a9f6d",
"type": "main",
"index": 0
}
]
]
},
"cf8da3a8-e430-42b9-bcbe-d771ff736a85": {
"main": [
[
{
"node": "e8db0d52-21e4-47a1-bf83-2b90fadeeddd",
"type": "main",
"index": 0
}
]
]
},
"9cae8d6a-31a4-462d-8482-93ac5b591125": {
"main": [
[
{
"node": "918f735a-2b6a-4515-8c6f-61778196300f",
"type": "main",
"index": 0
}
]
]
},
"9c4e387d-d47b-44b2-9fd4-2b08cf029a43": {
"main": [
[
{
"node": "41eb8c26-670d-4940-9bc9-ba90613e74c2",
"type": "main",
"index": 0
}
]
]
},
"d118bd83-021e-470c-b6e2-f45fdced945b": {
"main": [
[
{
"node": "9cae8d6a-31a4-462d-8482-93ac5b591125",
"type": "main",
"index": 0
}
]
]
},
"cb7916cc-10d4-435d-a893-6d6a613811b5": {
"main": [
[
{
"node": "c85dd58e-e7c3-49fe-bc5b-56db1931ce02",
"type": "main",
"index": 0
},
{
"node": "7862107b-f886-4d41-8f2e-0523f7a8f2ce",
"type": "main",
"index": 0
},
{
"node": "6cd5c506-f060-4d32-8425-383ff2b030b7",
"type": "main",
"index": 0
},
{
"node": "6560abd1-2f85-492b-bd6c-22b80dff52d1",
"type": "main",
"index": 0
},
{
"node": "9d7bce3c-c612-4f2d-aee0-04cd913a95b0",
"type": "main",
"index": 0
},
{
"node": "8fa12c0b-cceb-4ef0-80d4-533435d017f1",
"type": "main",
"index": 0
}
]
]
},
"41eb8c26-670d-4940-9bc9-ba90613e74c2": {
"main": [
[
{
"node": "cb7916cc-10d4-435d-a893-6d6a613811b5",
"type": "main",
"index": 0
}
]
]
},
"ea8c58ec-28d1-47ac-b891-5f520a197d47": {
"main": [
[
{
"node": "f6b90f3d-c3a2-4ac4-94ec-dbcad40cc333",
"type": "main",
"index": 0
}
]
]
},
"918f735a-2b6a-4515-8c6f-61778196300f": {
"main": [
[
{
"node": "dcfa0e97-1b56-48a4-aacc-bf0f7dfb1257",
"type": "main",
"index": 0
},
{
"node": "cf8da3a8-e430-42b9-bcbe-d771ff736a85",
"type": "main",
"index": 0
}
]
]
},
"dcfa0e97-1b56-48a4-aacc-bf0f7dfb1257": {
"main": [
[
{
"node": "ea8c58ec-28d1-47ac-b891-5f520a197d47",
"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 - 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
Dr. Firas
@drfirasAutomation expert and certified trainer. I create hands-on courses to master automation with n8n. Contact me to access my exclusive training and start building powerful workflows today. 🚀
Compartir este flujo de trabajo