AutomationFlowsAI & RAG › Create YouTube Shorts Scripts from Video Links with Gemini AI

Create YouTube Shorts Scripts from Video Links with Gemini AI

Original n8n title: Create Youtube Shorts Scripts From Video Links with Gemini AI and Telegram

ByTaiki @taiki on n8n.io

disclaimer: This workflow contains community nodes that are only compatible with the self-hosted version of n8n.

Event trigger★★★★☆ complexityAI-powered11 nodesTelegramTelegram TriggerN8N Nodes SupadataOutput Parser StructuredGoogle Gemini ChatChain Llm
AI & RAG Trigger: Event Nodes: 11 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow corresponds to n8n.io template #5805 — we link there as the canonical source.

This workflow follows the Chainllm → Google Gemini Chat recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "0b3sNR7VKXCSn2Fq",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "YT script automation",
  "tags": [],
  "nodes": [
    {
      "id": "fc5a9462-5e0c-4425-9e24-bf7794da0974",
      "name": "Send Summary",
      "type": "n8n-nodes-base.telegram",
      "position": [
        980,
        400
      ],
      "parameters": {
        "text": "={{ $json.output.title }}\n\n{{ $json.output.script }}",
        "chatId": "={{ $('Input URL').item.json.message.chat.id }}",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "be08404f-7005-46dc-bda0-9fa3bcd638f9",
      "name": "Input URL",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        0,
        400
      ],
      "parameters": {
        "updates": [
          "message"
        ],
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "9a74e5e6-e063-4c2d-aeeb-f627a1c8a878",
      "name": "Make Transcribe",
      "type": "n8n-nodes-supadata.supadata",
      "position": [
        160,
        400
      ],
      "parameters": {
        "videoId": "={{ $json.message.text }}",
        "operation": "getTranscript"
      },
      "credentials": {
        "supadataApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "1fc965aa-ed57-48b5-8185-1e163a9dd7b2",
      "name": "Parsing",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        800,
        580
      ],
      "parameters": {
        "jsonSchemaExample": "{\n  \"title\": \"\u3053\u3053\u306b\u52d5\u753b\u306e\u30bf\u30a4\u30c8\u30eb\u304c\u5165\u308a\u307e\u3059\",\n  \"script\": \"\u3053\u3053\u306b\u52d5\u753b\u306e\u53f0\u672c\uff08\u5168\u6587\uff09\u304c\u5165\u308a\u307e\u3059\"\n}"
      },
      "typeVersion": 1.2
    },
    {
      "id": "d7699f35-e66d-43ae-b0e7-5182cf89b6f0",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -80,
        320
      ],
      "parameters": {
        "color": 5,
        "width": 600,
        "height": 340,
        "content": "## Get Video Link and Transcribe Video"
      },
      "typeVersion": 1
    },
    {
      "id": "acd8d2c1-1949-4ac5-a788-69fe154d1fca",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        560,
        320
      ],
      "parameters": {
        "color": 5,
        "width": 620,
        "height": 420,
        "content": "## AI PARSING & Send Script"
      },
      "typeVersion": 1
    },
    {
      "id": "6630067d-5175-41f5-be71-833f27c43cb1",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        540,
        100
      ],
      "parameters": {
        "color": 7,
        "width": 640,
        "height": 200,
        "content": "## This Template is Free\u2728\n\n### Have any request, contact me [Here](https://x.com/taiki_16_k)"
      },
      "typeVersion": 1
    },
    {
      "id": "7c9fb068-f93d-4836-be6d-031a1a96cafc",
      "name": "Script mapping",
      "type": "n8n-nodes-base.set",
      "position": [
        320,
        400
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "f523292a-168d-4f06-9d99-5d5969b1b09e",
              "name": "full_script",
              "type": "string",
              "value": "={{ $json.content.map(item => item.text).join('\\n') }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "c5c3e290-df5b-43b7-a2b8-1aaaf88b5a06",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        620,
        580
      ],
      "parameters": {
        "options": {},
        "modelName": "models/gemini-2.5-pro"
      },
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "522ed972-2fb6-4c39-b9d7-bf8c2aaa5399",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -80,
        100
      ],
      "parameters": {
        "width": 600,
        "height": 200,
        "content": "## Required API Keys:\n- **Supadata KEY**: Get your transcription API key [here](https://supadata.com/)\n\n### Setup Instructions:\n1. Send URL to your bot to start Transcribing"
      },
      "typeVersion": 1
    },
    {
      "id": "5e57ee04-c618-4afb-8bf8-f4ddfe13c04c",
      "name": "Create Script",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        620,
        400
      ],
      "parameters": {
        "text": "=#background information\n{{ $json.full_script }}",
        "batching": {},
        "messages": {
          "messageValues": [
            {
              "message": "=You are a professional scriptwriter for YouTube Shorts, specializing in trivia across various genres.\nBased on the background information from the YouTube transcript provided by the user, you will create the ultimate script to captivate viewers. Your expertise lies in crafting scripts that interestingly convey fascinating trivia hidden in science, nature, culture, and daily life. Please use an intelligent yet friendly narrative style.\n\n#Conditions\n\nThe content must be based on accurate information.\n\nStructure the script to introduce a lot of trivia at a good tempo, minimizing transitional words.\n\nSpeak intelligently in a casual tone.\n\nThe script should be approximately 170-200 words.\n\nThe opening sentence must be a shocking fact or a line that strongly stimulates the viewer's curiosity. Get straight to the point.\n\nDo not include narration or timestamps; generate only the pure script text.\n\nCreate the script based on the background information from the provided YouTube transcript.\n\nDo not use bold text.\n\nUse periods to break lines appropriately.\n\n#Output Format\ntitle:\nscript:"
            }
          ]
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 1.7
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "b464a592-ac27-4c62-aaaf-11b0b970d895",
  "connections": {
    "Parsing": {
      "ai_outputParser": [
        [
          {
            "node": "Create Script",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Input URL": {
      "main": [
        [
          {
            "node": "Make Transcribe",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Create Script",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Summary": {
      "main": [
        []
      ]
    },
    "Create Script": {
      "main": [
        [
          {
            "node": "Send Summary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Make Transcribe": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Create Script",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

disclaimer: This workflow contains community nodes that are only compatible with the self-hosted version of n8n.

Source: https://n8n.io/workflows/5805/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

This workflow contains community nodes that are only compatible with the self-hosted version of n8n.

Telegram Trigger, Google Sheets, Telegram +6
AI & RAG

This n8n workflow automates the entire lead nurturing process from initial contact through a 3-email follow-up sequence, with intelligent reply detection and personalized AI-generated content. It's de

Telegram Trigger, Chain Llm, Google Gemini Chat +5
AI & RAG

&gt; Optimize your AI workflows, cut costs, and get faster, more accurate answers.

Model Selector, Output Parser Structured, Google Gemini Chat +6
AI & RAG

Flexible and scalable chatbot template, designed mainly for Spanish conversations but capable of handling English and other languages. Integrates Google Gemini API for text and image generation, and T

Agent, Google Gemini Chat, Chain Llm +6
AI & RAG

This workflow contains community nodes that are only compatible with the self-hosted version of n8n.

Telegram Trigger, Google Gemini Chat, Chain Llm +5