Genera automáticamente videos virales de historia de YouTube Shorts usando Blotato y GPT 4.1

Avanzado

Este es unautomatización que contiene 16 nodos.Utiliza principalmente nodos como Set, Wait, HttpRequest, Agent, ScheduleTrigger. Usa GPT-4o y Blotato para crear y publicar YouTube Shorts sobre hipótesis históricas

Requisitos previos
  • Pueden requerirse credenciales de autenticación para la API de destino
  • Clave de API de OpenAI

Categoría

-
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": "915jekkCa4sU0ZCS",
  "meta": {
    "instanceId": "a287613f1596da776459594685fbf4e2b4a12124f80ab8c8772f5e37bff103ae"
  },
  "name": "Automated Youtube Short Viral History with Blotato & Gpt 4.1",
  "tags": [],
  "nodes": [
    {
      "id": "841264d0-d54c-4fb8-8a44-06e6b9a36893",
      "name": "Subir a Blotato",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1504,
        16
      ],
      "parameters": {
        "url": "https://backend.blotato.com/v2/media",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "sendHeaders": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "url",
              "value": "={{ $('Get Video').item.json.item.mediaUrl }}"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "blotato-api-key",
              "value": "={{ $('Prepare for Publish').item.json.blotato_api_key }}"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "05aebcff-fbfd-40f5-ae31-65263e947c2c",
      "name": "Activador Programado",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -192,
        16
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 10
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "1fe2c097-0199-45c4-b475-b8e72fa0f104",
      "name": "Esperar",
      "type": "n8n-nodes-base.wait",
      "position": [
        832,
        16
      ],
      "webhookId": "1e7c5091-8369-460e-888e-8b8c07d8bcee",
      "parameters": {
        "unit": "minutes",
        "amount": 10
      },
      "typeVersion": 1.1,
      "alwaysOutputData": false
    },
    {
      "id": "5d78cdfe-f6a1-4810-89de-42be6bb087e8",
      "name": "Nota Adhesiva1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        368,
        -80
      ],
      "parameters": {
        "color": 3,
        "width": 832,
        "height": 340,
        "content": "# Video Generator"
      },
      "typeVersion": 1
    },
    {
      "id": "04543d7f-1014-4f65-892e-f81d125b9c51",
      "name": "Nota Adhesiva2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1232,
        -80
      ],
      "parameters": {
        "color": 3,
        "width": 752,
        "height": 340,
        "content": "# Youtube Post"
      },
      "typeVersion": 1
    },
    {
      "id": "06bd7c2d-6e65-47d4-8ec3-85410157028a",
      "name": "Preparar para Publicar",
      "type": "n8n-nodes-base.set",
      "position": [
        1280,
        16
      ],
      "parameters": {
        "mode": "raw",
        "options": {},
        "jsonOutput": "={\n  \"blotato_api_key\": \"{{ $('Prepare Video').item.json.blotato_api_key }}\",\n  \"instagram_id\": \"\",\n  \"youtube_id\": \"\",\n  \"tiktok_id\": \"\",\n  \"facebook_id\": \"\",\n  \"facebook_page_id\": \"\",\n  \"threads_id\": \"\",\n  \"twitter_id\": \"\",\n  \"linkedin_id\": \"\",\n  \"pinterest_id\": \"\",\n  \"pinterest_board_id\": \"\",\n  \"bluesky_id\": \"\",\n  \"final_text_long\": {{ $('Prepare Video').item.json.script.caption.toJsonString() }},\n  \"final_text_short\": {{ $('Prepare Video').item.json.script.caption.toJsonString() }}\n}"
      },
      "typeVersion": 3.4
    },
    {
      "id": "abdd8007-d272-4fde-907a-c208de21119f",
      "name": "Crear Video",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        624,
        16
      ],
      "parameters": {
        "url": "https://backend.blotato.com/v2/videos/creations",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"template\": {\n    \"id\": \"{{ $json.template }}\",\n    \"voiceId\": \"{{ $json.voiceId }}\",\n    \"captionPosition\": \"{{ $json.captionPosition }}\"\n  },\n  \"script\": {{ $json.script.script.toJsonString() }},\n  \"style\": \"{{ $json.style }}\",\n  \"animateFirstImage\": {{ $json.animate_first_image }},\n  \"animateAll\": {{ $json.animate_all }},\n  \"textToImageModel\": \"{{ $json.text_to_image_model }}\",\n  \"imageToVideoModel\": \"{{ $json.image_to_video_model }}\"\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "blotato-api-key",
              "value": "={{ $json.blotato_api_key }}"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "67230c13-2861-4581-874f-534e36b3f160",
      "name": "Generar Idea",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -16,
        240
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o",
          "cachedResultName": "gpt-4o"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "WbMi3ZLLBnECFAAV",
          "name": "temp"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "32fa5d81-bd22-488f-823e-8a3d9286d319",
      "name": "Preparar Video",
      "type": "n8n-nodes-base.set",
      "position": [
        416,
        16
      ],
      "parameters": {
        "mode": "raw",
        "options": {},
        "jsonOutput": "={\n  \"blotato_api_key\": \"\",\n  \"template\": \"empty\",\n  \"voiceId\": \"elevenlabs/eleven_multilingual_v2/pqHfZKP75CvOlQylNhV4\",\n  \"captionPosition\": \"bottom\",\n  \"script\": {{ $('AI Agent1').item.json.output.toJsonString() }},\n  \"style\": \"cinematic\",\n  \"animate_first_image\": true,\n  \"animate_all\": false,\n  \"text_to_image_model\": \"replicate/recraft-ai/recraft-v3\",\n  \"image_to_video_model\": \"fal-ai/framepack\"\n}"
      },
      "typeVersion": 3.4
    },
    {
      "id": "3cb260e0-6029-46ba-ba65-163c2966d739",
      "name": "Obtener Video",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1056,
        16
      ],
      "parameters": {
        "url": "=https://backend.blotato.com/v2/videos/creations/{{ $json.item.id }}",
        "options": {},
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "blotato-api-key",
              "value": "={{ $('Prepare Video').item.json.blotato_api_key }}"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "8bfe7047-4360-434e-b464-b2226370d6cc",
      "name": "Analizador de Salida Estructurada",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        176,
        240
      ],
      "parameters": {
        "jsonSchemaExample": "{\n\t\"script\": \"your video script\",\n\t\"caption\": \"short video caption\",\n    \"title\": \"hook title\"\n}"
      },
      "typeVersion": 1.2
    },
    {
      "id": "4fc73657-ec43-455a-97a7-29f88619fb74",
      "name": "Agente de IA1",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        32,
        16
      ],
      "parameters": {
        "text": "=# INSTRUCTIONS\n\n1. Brainstorm 50 different viral faceless video ideas related to theme \"What if history...\".\n\n2. Randomly select 1 of the ideas. Research relevant statistics, dates, and figures related to the specific idea.\n\n3. Write a 60-second video script for a viral faceless video. Use 6th grade language, use active voice, and start with a hook that leaves viewers wanting to know the answer. Do NOT start with a greeting like \"Hey there!\".\n\n4. Write a 2-sentence video caption, use 6th grade language, no emojis, and append 3 relevant hashtags to the end of the caption, including \"#ai\".\n\n# OUTPUT FORMAT\n\nIn JSON format:\n\n1. Output the script.\n2. Output the caption.\n3. Output the hook title",
        "options": {
          "returnIntermediateSteps": false
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 1.8
    },
    {
      "id": "a9e0aa65-bc62-4192-bb03-c96c7a6f7e20",
      "name": "Nota Adhesiva5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -240,
        -80
      ],
      "parameters": {
        "color": 3,
        "width": 588,
        "height": 484,
        "content": "# Script Generator"
      },
      "typeVersion": 1
    },
    {
      "id": "a053bf39-38c4-4d10-b1d1-f4fb9e08895e",
      "name": "Publicación en YT",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1728,
        16
      ],
      "parameters": {
        "url": "https://backend.blotato.com/v2/posts",
        "method": "POST",
        "options": {
          "redirect": {
            "redirect": {}
          }
        },
        "jsonBody": "={\n\"post\": {\n  \"accountId\": \"{{ $('Prepare for Publish').item.json.youtube_id }}\",\n  \"content\": {\n    \"text\": \"{{ $('Prepare for Publish').item.json.final_text_short }}\",\n    \"mediaUrls\": [\n      \"{{ $('Get Video').item.json.item.mediaUrl }}\" \n    ],\n    \"platform\": \"youtube\"\n  },\n  \"target\": {\n    \"targetType\": \"youtube\",\n    \"title\": \"{{ $('AI Agent1').item.json.output.title }}\",\n    \"privacyStatus\": \"public\",\n    \"shouldNotifySubscribers\": true,\n    \"isMadeForKids\": false\n  }\n}\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "blotato-api-key",
              "value": "={{ $('Prepare for Publish').item.json.blotato_api_key }}"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "aca73112-13e5-43e2-97ca-e0ab80938b88",
      "name": "Nota Adhesiva",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -240,
        464
      ],
      "parameters": {
        "color": 4,
        "width": 992,
        "height": 976,
        "content": "## Automate YT Short Template Note\n\n### 💡 Problem\nManually creating viral YouTube Shorts is time-consuming. It requires constant effort for brainstorming ideas, researching facts, writing compelling 60-second scripts and captions, and then generating and publishing the video content. This template aims to eliminate all these repetitive manual steps.\n\n### ✅ Solution\nThis n8n workflow completely automates the creation and publication of a daily YouTube Short. It uses a powerful AI Agent to handle the creative process—from topic generation to script and caption writing. The final, professionally-styled video is generated by Blotato and automatically posted to your YouTube account.\n\n### 🎯 Scope (What this template does)\n* **Daily Scheduling:** Triggers a workflow every day at a specific time (default is 10:00 AM).\n* **AI Content Generation:** Uses the **AI Agent** (powered by GPT-4o) to:\n    * Brainstorm 50 \"What if history...\" video ideas.\n    * Randomly select one and research relevant facts, dates, and figures.\n    * Write a 60-second, viral, faceless video script with a compelling hook.\n    * Write a 2-sentence caption with hashtags, including `#ai`.\n* **Video Creation:** Sends the script and content to **Blotato** to generate a cinematic, text-to-video short.\n* **Automated Publishing:** Uploads the final video to Blotato and then posts it to YouTube with the AI-generated title and caption.\n\n### 🧍 For Who\nThis template is perfect for content creators, marketers, or businesses who want to:\n* Maintain a consistent daily posting schedule on YouTube Shorts.\n* Scale up content production without hiring a full team.\n* Utilize advanced AI (GPT-4o, image-to-video models) to create high-quality, engaging historical content.\n* Automate their entire content pipeline from idea to publish.\n\n### ⚙️ How to Install & Configure\n1.  **OpenAI Credential:**\n    * Set up your **OpenAI** (or equivalent) API key in the `Brainstorm Idea` node credentials.\n2.  **Blotato & YouTube Setup:**\n    * Get your Blotato API key.\n    * In the **Prepare Video** node, insert your Blotato API key into the `blotato_api_key` field.\n    * In the **Prepare for Publish** node, insert your YouTube Account ID into the `youtube_id` field.\n3.  **Video Style Customization (Optional):**\n    * In the **Prepare Video** node, you can adjust settings like `voiceId`, `style`, `animate_first_image`, and the specific `text_to_image_model` and `image_to_video_model` to change the video's look and feel.\n4.  **Activate:** Save the workflow and set it to **Active**. The first video will be created at the scheduled time (10:00 AM)."
      },
      "typeVersion": 1
    },
    {
      "id": "cf726b47-88ee-4bd6-87b9-48cc2ad8dce0",
      "name": "Nota Adhesiva3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        848,
        464
      ],
      "parameters": {
        "width": 1104,
        "height": 624,
        "content": "@[youtube](yptHq2J8DmI)"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "1b02d59e-1d8c-4c42-b9e0-6875018315d7",
  "connections": {
    "1fe2c097-0199-45c4-b475-b8e72fa0f104": {
      "main": [
        [
          {
            "node": "3cb260e0-6029-46ba-ba65-163c2966d739",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "4fc73657-ec43-455a-97a7-29f88619fb74": {
      "main": [
        [
          {
            "node": "32fa5d81-bd22-488f-823e-8a3d9286d319",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "3cb260e0-6029-46ba-ba65-163c2966d739": {
      "main": [
        [
          {
            "node": "06bd7c2d-6e65-47d4-8ec3-85410157028a",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "abdd8007-d272-4fde-907a-c208de21119f": {
      "main": [
        [
          {
            "node": "1fe2c097-0199-45c4-b475-b8e72fa0f104",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "32fa5d81-bd22-488f-823e-8a3d9286d319": {
      "main": [
        [
          {
            "node": "abdd8007-d272-4fde-907a-c208de21119f",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "67230c13-2861-4581-874f-534e36b3f160": {
      "ai_languageModel": [
        [
          {
            "node": "4fc73657-ec43-455a-97a7-29f88619fb74",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "05aebcff-fbfd-40f5-ae31-65263e947c2c": {
      "main": [
        [
          {
            "node": "4fc73657-ec43-455a-97a7-29f88619fb74",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "841264d0-d54c-4fb8-8a44-06e6b9a36893": {
      "main": [
        [
          {
            "node": "a053bf39-38c4-4d10-b1d1-f4fb9e08895e",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "06bd7c2d-6e65-47d4-8ec3-85410157028a": {
      "main": [
        [
          {
            "node": "841264d0-d54c-4fb8-8a44-06e6b9a36893",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "8bfe7047-4360-434e-b464-b2226370d6cc": {
      "ai_outputParser": [
        [
          {
            "node": "4fc73657-ec43-455a-97a7-29f88619fb74",
            "type": "ai_outputParser",
            "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

¿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 nodos16
Categoría-
Tipos de nodos8
Descripción de la dificultad

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

Autor
Marth

Marth

@marth

Simplifying Business with Smart Automation. I create and share user-friendly, highly efficient n8n workflow templates for SMEs, focusing on digital marketing, sales, and operational excellence. Get ready to automate, innovate, and elevate your business. Connect me on Linkedin for custom solutions.

Enlaces externos
Ver en n8n.io

Compartir este flujo de trabajo

Categorías

Categorías: 34