Generación de títulos/vírales y miniaturas

Avanzado

Este es unAI, Marketingflujo de automatización del dominio deautomatización que contiene 41 nodos.Utiliza principalmente nodos como If, Set, Code, Html, Wait, combinando tecnología de inteligencia artificial para lograr automatización inteligente. Automatizar la creación de títulos y miniaturas virales para YouTube (FLUX.1 + Apify)

Requisitos previos
  • Pueden requerirse credenciales de autenticación para la API de destino
  • Clave de API de OpenAI
Vista previa del flujo de trabajo
Visualización de las conexiones entre nodos, con soporte para zoom y panorámica
Exportar flujo de trabajo
Copie la siguiente configuración JSON en n8n para importar y usar este flujo de trabajo
{
  "id": "",
  "meta": {
    "instanceId": "",
    "templateCredsSetupCompleted": true
  },
  "name": "Viral Title/Thumbnail Generation",
  "tags": [],
  "nodes": [
    {
      "id": "Al-hacer-clic-en-Probar-flujo-de-trabajo--0",
      "name": "Al hacer clic en 'Probar flujo de trabajo'",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -680,
        20
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "Esperar-1",
      "name": "Esperar",
      "type": "n8n-nodes-base.wait",
      "position": [
        2940,
        -240
      ],
      "webhookId": "",
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "Esperar1-2",
      "name": "Esperar1",
      "type": "n8n-nodes-base.wait",
      "position": [
        120,
        20
      ],
      "webhookId": "",
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "Analizador-de-Salida-Estructurada-3",
      "name": "Analizador de Salida Estructurada",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -40,
        220
      ],
      "parameters": {
        "jsonSchemaExample": "{\n\t\"Keyword1\": \"string\",\n\t\"Keyword2\": \"string\",\n    \"Keyword3\": \"string\"\n}"
      },
      "typeVersion": 1.2
    },
    {
      "id": "Crear-Palabras-Clave-4",
      "name": "Crear Palabras Clave",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        -240,
        20
      ],
      "parameters": {
        "text": "=You are a YouTube content strategist. The input of the request is the following content idea :  {{ $json.query }}",
        "messages": {
          "messageValues": [
            {
              "type": "HumanMessagePromptTemplate",
              "message": "=Given a content idea, extract **three keyword phrases** (1–5 words each) that are: \n- Highly relevant for a YouTube search \n- Based on what people would realistically search for \n- Focused on *actions*, *techniques*, or *tools* not just literal parts of the content idea \n- Avoid abstract or vague terms that would not return good search results  \n\nExample:  \nContent Idea: \"Turn a Zoom call into a viral TikTok\" \nOutput: \n1. \"zoom to tiktok edit\" \n2. \"short form video from meetings\"  \n\nReturn ONLY the three keyword phrases, no explanation."
            }
          ]
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 1.5
    },
    {
      "id": "B-squeda-y-Extracci-n-de-YTB-5",
      "name": "Búsqueda y Extracción de YTB",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        340,
        20
      ],
      "parameters": {
        "url": "https://api.apify.com/v2/acts/streamers~youtube-scraper/runs?token=[YOUR_API_TOKEN]",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n    \"dateFilter\": \"year\",\n    \"lengthFilter\": \"between420\",\n    \"maxResults\": 10,\n    \"searchQueries\": [\n        \"{{ $json.output.Keyword1 }}\",\n        \"{{ $json.output.Keyword2 }}\",\n        \"{{ $json.output.Keyword3 }}\"\n    ],\n    \"sortingOrder\": \"relevance\"\n} ",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "Obtener-Conjunto-de-Datos-6",
      "name": "Obtener Conjunto de Datos",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1320,
        0
      ],
      "parameters": {
        "url": "https://api.apify.com/v2/acts/streamers~youtube-scraper/runs/last/dataset/items?token=[YOUR_API_TOKEN]",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "Modelo-de-Chat-en-la-Nube-Mistral-7",
      "name": "Modelo de Chat en la Nube Mistral",
      "type": "@n8n/n8n-nodes-langchain.lmChatMistralCloud",
      "position": [
        -240,
        220
      ],
      "parameters": {
        "model": "mistral-large-latest",
        "options": {}
      },
      "credentials": {
        "mistralCloudApi": {
          "id": "",
          "name": "Mistral Cloud account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "Si-8",
      "name": "Si",
      "type": "n8n-nodes-base.if",
      "position": [
        900,
        20
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.data.status }}",
              "rightValue": "SUCCEEDED"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "Verificar-Si-Est-Completado-9",
      "name": "Verificar Si Está Completado",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        680,
        20
      ],
      "parameters": {
        "url": "https://api.apify.com/v2/acts/streamers~youtube-scraper/runs/last?token=[YOUR_API_TOKEN]",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "Esperar2-10",
      "name": "Esperar2",
      "type": "n8n-nodes-base.wait",
      "position": [
        1060,
        200
      ],
      "webhookId": "",
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "Modelo-de-Chat-en-la-Nube-Mistral1-11",
      "name": "Modelo de Chat en la Nube Mistral1",
      "type": "@n8n/n8n-nodes-langchain.lmChatMistralCloud",
      "position": [
        2520,
        0
      ],
      "parameters": {
        "model": "mistral-large-latest",
        "options": {}
      },
      "credentials": {
        "mistralCloudApi": {
          "id": "",
          "name": "Mistral Cloud account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "Calcular-CTR-12",
      "name": "Calcular CTR",
      "type": "n8n-nodes-base.code",
      "position": [
        1520,
        200
      ],
      "parameters": {
        "mode": "runOnceForEachItem",
        "jsCode": "const views = $json.viewCount;\nconst subscribers = $json.numberOfSubscribers;\nconst likes = $json.likes;\nconst comments = $json.commentsCount;\nconst publishedAt = $json.date;// ISO string, e.g. \"2024-05-01T12:00:00Z\"\n\n// Defensive check for missing values\nif (!views || !subscribers || !publishedAt) {\n  return { error: \"Missing required data\" };\n}\n\n// Parse dates\nconst publishedDate = new Date(publishedAt);\nconst now = new Date();\n\n// Validate dates\nif (isNaN(publishedDate.getTime())) {\n  return { error: \"Invalid publishedAt date\" };\n}\n\n// Calculate days since upload\nconst msPerDay = 1000 * 60 * 60 * 24;\nconst timeDiff = now.getTime() - publishedDate.getTime();\nconst daysSinceUpload = Math.floor(timeDiff / msPerDay);\n\n// Compute RPI\nconst rpi = (views / subscribers) * ((likes + comments) / views / 10);\n\n// Apply temporal decay factor\nconst decayFactor = Math.exp(-0.015 * daysSinceUpload);\nconst rpiAdjusted = rpi * decayFactor;\n\n// Calculate Pseudo CTR\nconst ctrScore = rpiAdjusted * 100;\n\nreturn {\n   ctrPercent: parseFloat(ctrScore.toFixed(3)), // ← Your CTR-style %\n};\n"
      },
      "typeVersion": 2
    },
    {
      "id": "Combinar-Datos-13",
      "name": "Combinar Datos",
      "type": "n8n-nodes-base.merge",
      "position": [
        1700,
        20
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "combineBy": "combineByPosition"
      },
      "typeVersion": 3
    },
    {
      "id": "Crear-T-tulos-14",
      "name": "Crear Títulos",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        3140,
        -240
      ],
      "parameters": {
        "text": "=You are an expert in YouTube video title optimization.",
        "messages": {
          "messageValues": [
            {
              "type": "HumanMessagePromptTemplate",
              "message": "={{ $json.text }}"
            }
          ]
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 1.5
    },
    {
      "id": "Modelo-de-Chat-en-la-Nube-Mistral2-15",
      "name": "Modelo de Chat en la Nube Mistral2",
      "type": "@n8n/n8n-nodes-langchain.lmChatMistralCloud",
      "position": [
        3060,
        20
      ],
      "parameters": {
        "model": "mistral-large-latest",
        "options": {}
      },
      "credentials": {
        "mistralCloudApi": {
          "id": "",
          "name": "Mistral Cloud account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "Analizador-de-Salida-Estructurada1-16",
      "name": "Analizador de Salida Estructurada1",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        3340,
        20
      ],
      "parameters": {
        "jsonSchemaExample": "{\n  \"title1\": \"string\",\n  \"title2\": \"string\",\n  \"title3\": \"string\",\n  \"title4\": \"string\",\n  \"title5\": \"string\"\n}"
      },
      "typeVersion": 1.2
    },
    {
      "id": "Nota-Adhesiva-17",
      "name": "Nota Adhesiva",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -760,
        -980
      ],
      "parameters": {
        "color": 7,
        "width": 780,
        "height": 320,
        "content": "## How this is Working ?\n**1 -** Enter your content idea in the Edit Fields node in a \"raw\" format. Ex : Boil Eggs Perfectly\n**2 -** LLM create 3 keywords request based on the idea and Apify scrape the YTB Search\n**3 -** Wait until the dataset is completed in Apify\n**4 -** Retrieve Dataset from Apify, calculate approximation of CTR and filter top performing videos\n**5 -** LLM analyze patterns of best performing titles and create a prompt based on it. Another LLM create 5 titles based on these criteria\n**6 -** LLM analyze patterns of best performing thumbnails and create a prompt based on it. Another LLM create 1 thumbnail based on these criteria\n**7 -** Return titles and thumbnail in a HTML Page\n\n\n**📺 Youtube Video Tutorial : https://youtu.be/Upuj9Pi94g0**\n**🛠️ Need Help with Your Workflows ? https://tally.so/r/wayeqB**\n**👨‍💻 More Workflows : https://n8n.io/creators/nasser/**"
      },
      "typeVersion": 1
    },
    {
      "id": "Nota-Adhesiva2-18",
      "name": "Nota Adhesiva2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -760,
        -640
      ],
      "parameters": {
        "color": 7,
        "width": 780,
        "height": 520,
        "content": "## SETUP\n\n**Setup Input Content Idea :** Enter Keyword Related to the niche you want. Trigger can be replaced with anything as long as you retrieve a content idea. For example : Form submission, Database entry, etc ...\n\nIf you want to change the number of keywords, update the data accordingly in the \"Create Keywords\" LLM Chain node ➡️ Structured Output Parser AND in the \"YTB Search Scrape\" HTTP Request Node in Body ➡️ JSON ➡️ searchQueries.\nIf you want to change the number of scraped videos for each keyword, update the data accordingly in the \"Create Videos Dataset\" HTTP Request Node in Body ➡️ JSON ➡️ maxResults.\nIf you want to adjust the CTR Calculation feel free to update it in the Code Node ➡️ Follow the Comments (after \"//\") to find what you're looking for.\nIf you want to adjust the level of virality of the videos kept for analaysis go to Filter Node ➡️ Value.\n\n**Setup Output HTML Page :** You can also replace this part with any type of storage. For example : Airtable Database, Google Drive/Google Sheet, Send to an email, etc ...\n\n**APIs :** For the following third-party integrations, replace [YOUR_API_TOKEN] with your API Token or connect your account via Client ID / Secret to your n8n instance :\n- Apify : https://docs.apify.com/api/v2/getting-started \n- OpenAI : https://platform.openai.com/docs/overview (base URL : https://api.openai.com/v1) OR OpenRouter : https://openrouter.ai/docs/quickstart (base URL : https://openrouter.ai/api/v1)\n- HuggingFace (FLUX.1) : https://huggingface.co/docs"
      },
      "typeVersion": 1
    },
    {
      "id": "Idea-de-Contenido-19",
      "name": "Idea de Contenido",
      "type": "n8n-nodes-base.set",
      "position": [
        -460,
        20
      ],
      "parameters": {
        "mode": "raw",
        "options": {},
        "jsonOutput": "{\n  \"query\": \"create viral title and thumbnail in n8n\"\n}"
      },
      "typeVersion": 3.4
    },
    {
      "id": "Crear-Lista-de-T-tulos-20",
      "name": "Crear Lista de Títulos",
      "type": "n8n-nodes-base.code",
      "position": [
        2380,
        -240
      ],
      "parameters": {
        "jsCode": "const titles = items.map(item => item.json.title);\nreturn [{ json: { titles } }];"
      },
      "typeVersion": 2
    },
    {
      "id": "HTML-21",
      "name": "HTML",
      "type": "n8n-nodes-base.html",
      "position": [
        3800,
        40
      ],
      "parameters": {
        "html": "<!DOCTYPE html>\n\n<html>\n<head>\n  <meta charset=\"UTF-8\" />\n  <title>My HTML document</title>\n</head>\n<body>\n  <div class=\"container\">\n    <h1>Thumbnail</h1>\n    <img src=\"data:image/png;base64,{{ $('Convert to Base64').first().json.data }}\" />\n    <h3>Titles</h3>\n    <p>1. {{ $json.output.title1 }}<br>2. {{ $json.output.title2 }}<br>3. {{ $json.output.title3 }}<br>4. {{ $json.output.title4 }}<br>5. {{ $json.output.title5 }}</p>\n  </div>\n</body>\n</html>\n\n<style>\n.container {\n  background-color: #ffffff;\n  text-align: center;\n  padding: 16px;\n  border-radius: 8px;\n}\n\nh1 {\n  color: #ff6d5a;\n  font-size: 24px;\n  font-weight: bold;\n  padding: 8px;\n}\n\nh2 {\n  color: #909399;\n  font-size: 18px;\n  font-weight: bold;\n  padding: 8px;\n}\n</style>\n\n<script>\nconsole.log(\"Hello World!\");\n</script>"
      },
      "typeVersion": 1.2
    },
    {
      "id": "Iterar-Sobre-Elementos-22",
      "name": "Iterar Sobre Elementos",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        2260,
        520
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "Analizar-Imagen-23",
      "name": "Analizar Imagen",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        2500,
        540
      ],
      "parameters": {
        "text": "=You are an expert in YouTube thumbnail performance. Your job is to analyze why a thumbnail might be performing well and describe it precisely so a designer or AI can later recreate its essence.\n\nYou will receive:\n- The subject of the video : {{ $('Content Idea').first().json.query }}\n- The URL of the thumbnail image : {{ $json.thumbnailUrl }}\n\nYour goal:\n1. Analyze the thumbnail's visual elements (faces, text, colors, emotions, layout, contrast, focus, etc.)\n2. Identify what makes it visually compelling or attention-grabbing\n3. Relate your analysis back to the video’s subject\n4. Return a structured and precise description of the thumbnail that could be reused to generate a similar performing image.\n\nRespond only with the description. Do not add anything else.",
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "meta-llama/llama-3.2-11b-vision-instruct:free",
          "cachedResultName": "META-LLAMA/LLAMA-3.2-11B-VISION-INSTRUCT:FREE"
        },
        "options": {},
        "resource": "image",
        "simplify": false,
        "imageUrls": "={{ $json.thumbnailUrl }}",
        "operation": "analyze"
      },
      "credentials": {
        "openAiApi": {
          "id": "",
          "name": "OpenAi account 2"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "Esperar3-24",
      "name": "Esperar3",
      "type": "n8n-nodes-base.wait",
      "position": [
        2780,
        720
      ],
      "webhookId": "",
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "Combinar-25",
      "name": "Combinar",
      "type": "n8n-nodes-base.merge",
      "position": [
        3580,
        40
      ],
      "parameters": {},
      "typeVersion": 3
    },
    {
      "id": "Modelo-de-Chat-en-la-Nube-Mistral3-26",
      "name": "Modelo de Chat en la Nube Mistral3",
      "type": "@n8n/n8n-nodes-langchain.lmChatMistralCloud",
      "position": [
        2680,
        460
      ],
      "parameters": {
        "model": "mistral-large-latest",
        "options": {}
      },
      "credentials": {
        "mistralCloudApi": {
          "id": "",
          "name": "Mistral Cloud account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "Crear-Prompt-27",
      "name": "Crear Prompt",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        2620,
        280
      ],
      "parameters": {
        "text": "You are an expert visual prompt engineer.",
        "messages": {
          "messageValues": [
            {
              "type": "HumanMessagePromptTemplate",
              "message": "=You are an expert visual prompt engineer.\n\nYou are given several thumbnail analysis texts, each describing what made a YouTube thumbnail visually engaging and effective. \n\nData for you : \n- The Content Idea : {{ $('Content Idea').first().json.query }}\n- The Analysis of performing Thumbnails for this idea : {{ $json.analysis}}\n\n\nYour job is to:\n1. **Summarize the most common and impactful visual elements** across all analyses.\n2. **Generate one precise image prompt** that captures the best-performing elements, ready to be used with an image generation model (like DALL·E, Midjourney, or Stable Diffusion).\nMandatory : \n- Maximum 400 characters (including spaces and punctuations) !\n- When generating the prompt text, make sure that any double quotes within the string are escaped using a backslash (\\\") so that the final output can be safely included in a JSON object.\n\n📥 Input: A list of thumbnail descriptions and visual analyses.\n🎯 Goal: One image prompt that includes clear guidance on:\n- Subject placement and expression\n- Colors and contrast\n- Text style or layout (if any)\n- Graphic or visual elements\n- Overall layout or composition\n- Mood or tone (e.g. excitement, curiosity, professionalism)\n\n⚠️ Don't describe what you’re doing. Just output the final image prompt.\n\n📌 Example output format:\nA high-contrast YouTube thumbnail with a confident man on the right side, bold yellow text on the left saying \"AI SECRETS\", a dark tech-themed background, and digital data stream effects in the back — cinematic lighting, 16:9 composition."
            }
          ]
        },
        "promptType": "define"
      },
      "typeVersion": 1.5
    },
    {
      "id": "Crear-Lista-de-An-lisis-28",
      "name": "Crear Lista de Análisis",
      "type": "n8n-nodes-base.code",
      "position": [
        2440,
        280
      ],
      "parameters": {
        "jsCode": "const analysis = items.map(item => item.json.choices[0].message.content);\n\nreturn [\n  {\n    json: {\n      analysis\n    }\n  }\n];\n"
      },
      "typeVersion": 2
    },
    {
      "id": "Generar-Imagen-29",
      "name": "Generar Imagen",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3120,
        280
      ],
      "parameters": {
        "url": "https://api-inference.huggingface.co/models/black-forest-labs/FLUX.1-dev",
        "method": "POST",
        "options": {
          "response": {
            "response": {
              "responseFormat": "file"
            }
          }
        },
        "jsonBody": "={\n  \"inputs\":\"{{ $json.text }}\",\n  \"parameters\": {\n    \"height\": 720,\n    \"width\": 1280,\n    \"num_inference_steps\": 30,\n    \"guidance_scale\": 8.0\n  }\n}\n",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer [YOUR_API_TOKEN]"
            },
            {
              "name": "Accept",
              "value": "image/png"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "Convertir-a-Base64-30",
      "name": "Convertir a Base64",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        3320,
        280
      ],
      "parameters": {
        "options": {
          "encoding": "base64"
        },
        "operation": "binaryToPropery"
      },
      "typeVersion": 1
    },
    {
      "id": "Nota-Adhesiva3-31",
      "name": "Nota Adhesiva3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -760,
        -100
      ],
      "parameters": {
        "color": 7,
        "width": 460,
        "height": 360,
        "content": "## 1- Input\nEnter your content idea in the Edit Fields node in a \"raw\" format. Ex : Boil Eggs Perfectly"
      },
      "typeVersion": 1
    },
    {
      "id": "Nota-Adhesiva4-32",
      "name": "Nota Adhesiva4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -280,
        -100
      ],
      "parameters": {
        "color": 7,
        "width": 820,
        "height": 480,
        "content": "## 2- Create DataSet\nLLM create 3 keywords request based on the idea and Apify scrape the YTB Search"
      },
      "typeVersion": 1
    },
    {
      "id": "Nota-Adhesiva5-33",
      "name": "Nota Adhesiva5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        560,
        -100
      ],
      "parameters": {
        "color": 7,
        "width": 680,
        "height": 520,
        "content": "## 3 - Wait for DataSet Completion\nWait until the dataset is completed in Apify"
      },
      "typeVersion": 1
    },
    {
      "id": "Nota-Adhesiva6-34",
      "name": "Nota Adhesiva6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1260,
        -100
      ],
      "parameters": {
        "color": 7,
        "width": 860,
        "height": 460,
        "content": "## 4- Filter Performing Videos\nRetrieve Dataset from Apify, calculate approximation of CTR and filter top performing videos"
      },
      "typeVersion": 1
    },
    {
      "id": "Nota-Adhesiva7-35",
      "name": "Nota Adhesiva7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2140,
        -340
      ],
      "parameters": {
        "color": 7,
        "width": 1340,
        "height": 500,
        "content": "## 5- Generate Titles\nLLM analyze patterns of best performing titles and create a prompt based on it. Another LLM create 5 titles based on these criteria"
      },
      "typeVersion": 1
    },
    {
      "id": "Nota-Adhesiva8-36",
      "name": "Nota Adhesiva8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2140,
        180
      ],
      "parameters": {
        "color": 7,
        "width": 1340,
        "height": 760,
        "content": "## 6- Generate Thumbnail\nLLM analyze patterns of best performing thumbnails and create a prompt based on it. Another LLM create 1 thumbnail based on these criteria"
      },
      "typeVersion": 1
    },
    {
      "id": "Nota-Adhesiva9-37",
      "name": "Nota Adhesiva9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3500,
        -100
      ],
      "parameters": {
        "color": 7,
        "width": 520,
        "height": 360,
        "content": "## 7- Output\nReturn titles and thumbnail in a HTML Page"
      },
      "typeVersion": 1
    },
    {
      "id": "Mantener-los-V-deos-con-Mejor-Rendimiento-38",
      "name": "Mantener los Vídeos con Mejor Rendimiento",
      "type": "n8n-nodes-base.filter",
      "position": [
        1900,
        20
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "",
              "operator": {
                "type": "number",
                "operation": "gt"
              },
              "leftValue": "={{ $json.ctrPercent }}",
              "rightValue": 0.1
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "Analizar-Patr-n-y-Crear-Prompt-39",
      "name": "Analizar Patrón y Crear Prompt",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        2600,
        -240
      ],
      "parameters": {
        "text": "=You are an expert in YouTube video title optimization. Here is your input : \n{{ $json.titles.join('\\n') }}",
        "messages": {
          "messageValues": [
            {
              "type": "HumanMessagePromptTemplate",
              "message": "=You will be given a list of YouTube video titles that ranked highly for a specific keyword or topic. For information the topic of the video is : {{ $('Content Idea').first().json.query }}\nYour task is to:  \n1. Analyze the title list for patterns, such as:  \n- Repeating structures or formats (e.g., “How to…”, “Top X…”, “This Changed Everything”)  \n- Use of numbers, brackets, capital letters, emotional hooks, urgency, etc.  \n- Word combinations or topic angles (e.g., “AI Automation for Creators” vs. “Build AI Tools with No Code”)  \n2. Summarize what makes these titles effective (mandatory : be as precise as possible in 5-15 points). \n3. Based on your analysis, generate a prompt for another AI language model. This prompt will instruct the second model to generate new YouTube titles for the same keyword/topic, using the same high-performing structure, tone, and techniques.  \n\n⚠️ Make sure the new prompt:  \n- Clearly instructs the LLM to follow identified title patterns.  - Tells it to generate clickable, short, high-performing YouTube titles. \n- Avoids common spammy phrasing or clickbait that doesn’t match the original tone.  \n\n✅ Format your response like this:\nPATTERN SUMMARY:\n- Point 1\n- Point 2\n- Point 3\n\nPROMPT:\n\"Create 5 YouTube video titles about [TOPIC] using the following format:\n- [Insert pattern or tone summary]\n- Each title should be under 60 characters, engaging, and based on the provided structure.\"\n\n📥 Example Input (titles):\n- 5 AI Tools That Will Replace Your Job in 2025\n- The Best No-Code AI Tool You’re Not Using Yet\n- I Built an AI Business with $0 (Full Tutorial)\n- How to Automate Everything with AI Agents\n- This Free AI Tool Blew My Mind\n\n🧠 Expected Output:\nPATTERN SUMMARY:\n- Uses emotional triggers like fear or curiosity (“Replace Your Job”, “Blew My Mind”)\n- Often includes numbers or power words (“5 Tools”, “Best”, “Free”)\n- Many titles promise results or value (“Full Tutorial”, “Automate Everything”)\n\nPROMPT:\n\"Create 5 YouTube video titles about AI automation tools for solo creators using this format:\n- Include emotional or curiosity-based phrases\n- Use numbers or power words when relevant\n- Promise a clear value or benefit in the title\nEach title should be under 60 characters and match the tone of the top-ranking videos.\"\n"
            }
          ]
        },
        "promptType": "define"
      },
      "typeVersion": 1.5
    },
    {
      "id": "Esperar4-40",
      "name": "Esperar4",
      "type": "n8n-nodes-base.wait",
      "position": [
        2940,
        280
      ],
      "webhookId": "",
      "parameters": {},
      "typeVersion": 1.1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "",
  "connections": {
    "Si-8": {
      "main": [
        [
          {
            "node": "Obtener-Conjunto-de-Datos-6",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Esperar2-10",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Esperar-1": {
      "main": [
        [
          {
            "node": "Crear-T-tulos-14",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Combinar-25": {
      "main": [
        [
          {
            "node": "HTML-21",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Esperar1-2": {
      "main": [
        [
          {
            "node": "B-squeda-y-Extracci-n-de-YTB-5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Esperar2-10": {
      "main": [
        [
          {
            "node": "Verificar-Si-Est-Completado-9",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Esperar3-24": {
      "main": [
        [
          {
            "node": "Iterar-Sobre-Elementos-22",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Esperar4-40": {
      "main": [
        [
          {
            "node": "Generar-Imagen-29",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Combinar-Datos-13": {
      "main": [
        [
          {
            "node": "Mantener-los-V-deos-con-Mejor-Rendimiento-38",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Obtener-Conjunto-de-Datos-6": {
      "main": [
        [
          {
            "node": "Calcular-CTR-12",
            "type": "main",
            "index": 0
          },
          {
            "node": "Combinar-Datos-13",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Idea-de-Contenido-19": {
      "main": [
        [
          {
            "node": "Crear-Palabras-Clave-4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Analizar-Imagen-23": {
      "main": [
        [
          {
            "node": "Esperar3-24",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calcular-CTR-12": {
      "main": [
        [
          {
            "node": "Combinar-Datos-13",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Crear-Prompt-27": {
      "main": [
        [
          {
            "node": "Esperar4-40",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Crear-T-tulos-14": {
      "main": [
        [
          {
            "node": "Combinar-25",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generar-Imagen-29": {
      "main": [
        [
          {
            "node": "Convertir-a-Base64-30",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Crear-Palabras-Clave-4": {
      "main": [
        [
          {
            "node": "Esperar1-2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Iterar-Sobre-Elementos-22": {
      "main": [
        [
          {
            "node": "Crear-Lista-de-An-lisis-28",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Analizar-Imagen-23",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Verificar-Si-Est-Completado-9": {
      "main": [
        [
          {
            "node": "Si-8",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convertir-a-Base64-30": {
      "main": [
        [
          {
            "node": "Combinar-25",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "B-squeda-y-Extracci-n-de-YTB-5": {
      "main": [
        [
          {
            "node": "Verificar-Si-Est-Completado-9",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Crear-Lista-de-T-tulos-20": {
      "main": [
        [
          {
            "node": "Analizar-Patr-n-y-Crear-Prompt-39",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Crear-Lista-de-An-lisis-28": {
      "main": [
        [
          {
            "node": "Crear-Prompt-27",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Modelo-de-Chat-en-la-Nube-Mistral-7": {
      "ai_languageModel": [
        [
          {
            "node": "Crear-Palabras-Clave-4",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Analizador-de-Salida-Estructurada-3": {
      "ai_outputParser": [
        [
          {
            "node": "Crear-Palabras-Clave-4",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Modelo-de-Chat-en-la-Nube-Mistral1-11": {
      "ai_languageModel": [
        [
          {
            "node": "Analizar-Patr-n-y-Crear-Prompt-39",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Modelo-de-Chat-en-la-Nube-Mistral2-15": {
      "ai_languageModel": [
        [
          {
            "node": "Crear-T-tulos-14",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Modelo-de-Chat-en-la-Nube-Mistral3-26": {
      "ai_languageModel": [
        [
          {
            "node": "Crear-Prompt-27",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Analizador-de-Salida-Estructurada1-16": {
      "ai_outputParser": [
        [
          {
            "node": "Crear-T-tulos-14",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Mantener-los-V-deos-con-Mejor-Rendimiento-38": {
      "main": [
        [
          {
            "node": "Iterar-Sobre-Elementos-22",
            "type": "main",
            "index": 0
          },
          {
            "node": "Crear-Lista-de-T-tulos-20",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Analizar-Patr-n-y-Crear-Prompt-39": {
      "main": [
        [
          {
            "node": "Esperar-1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Al-hacer-clic-en-Probar-flujo-de-trabajo--0": {
      "main": [
        [
          {
            "node": "Idea-de-Contenido-19",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Preguntas frecuentes

¿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 - Inteligencia Artificial, Marketing

¿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.

Información del flujo de trabajo
Nivel de dificultad
Avanzado
Número de nodos41
Categoría2
Tipos de nodos16
Descripción de la dificultad

Adecuado para usuarios avanzados, flujos de trabajo complejos con 16+ nodos

Autor
Nasser

Nasser

@nasser

Data Engineer, now automating processes mostly with n8n, Make and code

Enlaces externos
Ver en n8n.io

Compartir este flujo de trabajo

Categorías

Categorías: 34