This workflow follows the Execute Workflow Trigger → Google Drive 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 →
{
"name": "video-generator",
"nodes": [
{
"parameters": {
"operation": "Run actor and get dataset",
"actorId": {
"__rl": true,
"value": "Uwpce1RSXlrzF6WBA",
"mode": "list",
"cachedResultName": "YouTube Video Transcript (starvibe/youtube-video-transcript)",
"cachedResultUrl": "https://console.apify.com/actors/Uwpce1RSXlrzF6WBA/input"
},
"customBody": "={\n \"include_transcript_text\": true,\n \"youtube_url\": \"{{ $json.message.text.split(\"\\n\").first() }}\"\n}"
},
"type": "@apify/n8n-nodes-apify.apify",
"typeVersion": 1,
"position": [
1344,
-224
],
"id": "2e87545c-7e3a-4020-990a-ad92fa389385",
"name": "Apify",
"credentials": {
"apifyApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"promptType": "define",
"text": "={{ $json.transcript.toJsonString() }}\n\nYou are given a transcript of a video. Each item in the transcript contains the following information:\n- \"start\": the start timestamp of the sentence in the video\n- \"end\": the end timestamp of the sentence in the video\n- \"script\": the script of the sentence\n\nPlease create 5\u201310 parts. Each part must be **at least 40 seconds long** based on the timestamps. \nCombine consecutive thematic sentences until the part is >=40s. Skip irrelevant sentences. Maintain coherence.\n\n1. Each part should combine **several consecutive sentences** (roughly 7\u201315 sentences) that are thematically connected.\n2. Use the first sentence\u2019s start timestamp as `startDate` and the last sentence\u2019s end timestamp as `endDate` for that part.\n3. Only include sentences that make sense together. Skip sentences that are off-topic, unrelated, or create awkward transitions.\n4. Each part should read smoothly as a coherent script. Maintain logical flow and conscript.\n5. Prioritize sentences that are:\n - Funny\n - Interesting\n - Critical\n - Thought-provoking\n - Or generally engaging\n6. For sentences in between that break the flow or are irrelevant, you can skip them.\n7. Output each part as a JSON object with:\n - `startDate`: timestamp of the first sentence in the part\n - `endDate`: timestamp of the last sentence in the part\n - `script`: concatenated script of all sentences in the part\n\nExample output format:\n\n[\n {\n \"startDate\": \"00:01:12\",\n \"endDate\": \"00:02:05\",\n \"script\": \"This is the first part, combining several meaningful sentences into one coherent paragraph...\"\n },\n {\n \"startDate\": \"00:02:20\",\n \"endDate\": \"00:03:10\",\n \"script\": \"This is the second part, another set of connected sentences that flow logically...\"\n }\n]\n\nDo not process every sentence individually; instead, create coherent parts as described.",
"hasOutputParser": true,
"batching": {}
},
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"typeVersion": 1.7,
"position": [
1568,
-224
],
"id": "45996b61-2360-4b8b-84db-5c3e89293ee2",
"name": "Basic LLM Chain"
},
{
"parameters": {
"model": "mistral-small-latest",
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatMistralCloud",
"typeVersion": 1,
"position": [
1456,
16
],
"id": "418ec1ba-cde2-4b29-ba1a-6f77231b2e9e",
"name": "Mistral Cloud Chat Model",
"credentials": {
"mistralCloudApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"jsonSchemaExample": "{\n\t\"parts\": \n [{\n \"startTime\":6.52,\n \"endTime\":30.4,\n \"script\":\"test part\"\n },\n { \n \"startTime\":6.52,\n \"endTime\":30.4,\n \"script\":\"test part\"\n }\n ]\n}"
},
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"typeVersion": 1.2,
"position": [
1712,
0
],
"id": "e65e8889-0909-4764-88b9-20b08447cc15",
"name": "Structured Output Parser"
},
{
"parameters": {
"operation": "Run actor and get dataset",
"actorId": {
"__rl": true,
"value": "ZSKNl5eniyeAPcPkf",
"mode": "id"
},
"customBody": "={\n \"urls\": [\n {\n \"url\": \"{{ $('Telegram Trigger').item.json.message.text.split(\"\\n\").first() }}\"\n }\n ]\n} "
},
"type": "@apify/n8n-nodes-apify.apify",
"typeVersion": 1,
"position": [
1168,
128
],
"id": "9510171e-d260-46d1-91c8-db025637995c",
"name": "Apify1",
"credentials": {
"apifyApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"method": "POST",
"url": "https://api.rendi.dev/v1/run-ffmpeg-command",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "x-api-key",
"value": "rendi-api-key"
}
]
},
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={\n \"input_files\": {\n \"in_1\": \"{{ $('Apify1').item.json.downloadUrl }}\",\n \"in_2\": \"https://yt3.googleusercontent.com/ki-IU8_Mucn8ee-40luEyjSURL3kTUVFO9GXrxLyLXBTVEyYaYFAgYHxjE788_7HugzxOArT9Q\"\n },\n \"output_files\": {\n \"out_1\": \"output1.mp4\"\n },\n \"ffmpeg_command\": \"-ss {{ $json.startTime }} -to {{ $json.endTime }} -i \\\\{\\\\{in_1\\\\}\\\\} -i \\\\{\\\\{in_2\\\\}\\\\} -filter_complex \\\"[0:v]scale=720:1280:force_original_aspect_ratio=decrease,pad=720:1400:(ow-iw)/2:(oh-ih)/2:black[v];[1:v]scale=80:80[logo];[v][logo]overlay=20:H-h-40[tmp];[tmp]drawtext=text='youtube/@moviee-clip':x=120:y=H-70:fontsize=36:fontcolor=white\\\" -c:v libx264 -c:a aac \\\\{\\\\{out_1\\\\}\\\\}\"\n}",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
1312,
624
],
"id": "ab9b0e82-9961-46ee-9661-dcc576ec9107",
"name": "HTTP Request1"
},
{
"parameters": {
"url": "=https://api.rendi.dev/v1/commands/{{ $json.command_id }}",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "X-API-KEY",
"value": "rendi-api-key"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
1744,
624
],
"id": "d94abc56-c2a6-4172-9c2b-2c0e15c66bc9",
"name": "HTTP Request3"
},
{
"parameters": {
"amount": 1,
"unit": "minutes"
},
"type": "n8n-nodes-base.wait",
"typeVersion": 1.1,
"position": [
1536,
624
],
"id": "2ef9fd17-3e81-4061-bf4a-74d4ee3d3da4",
"name": "Wait"
},
{
"parameters": {
"options": {}
},
"type": "n8n-nodes-base.splitInBatches",
"typeVersion": 3,
"position": [
1120,
480
],
"id": "8db1434b-09f5-41b0-9224-00f3da31a3b2",
"name": "Loop Over Items"
},
{
"parameters": {
"jsCode": "const parts = $('Basic LLM Chain').first().json.output.parts;\n\nconst items = [];\n\nfor (const part of parts) {\n items.push({\n json: part\n });\n}\n\nreturn items;"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
1392,
128
],
"id": "382eca9b-d53f-442a-bff2-dde4c59d091f",
"name": "Code"
},
{
"parameters": {
"url": "={{ $json.output_files.out_1.storage_url }}",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
1952,
624
],
"id": "84476bbe-cede-458f-9a2b-f32e5d02152d",
"name": "HTTP Request"
},
{
"parameters": {
"updates": [
"message"
],
"additionalFields": {}
},
"type": "n8n-nodes-base.telegramTrigger",
"typeVersion": 1.2,
"position": [
1120,
-224
],
"id": "66de6acd-e806-4dee-a15e-023e80d72a4b",
"name": "Telegram Trigger",
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"operation": "appendOrUpdate",
"documentId": {
"__rl": true,
"value": "1dVmxcPgpHk5Ko7kfCn5_sK_mtydq_qLRlMdbuLjyzOQ",
"mode": "list",
"cachedResultName": "shorts",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1dVmxcPgpHk5Ko7kfCn5_sK_mtydq_qLRlMdbuLjyzOQ/edit?usp=drivesdk"
},
"sheetName": {
"__rl": true,
"value": "gid=0",
"mode": "list",
"cachedResultName": "Sayfa1",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1dVmxcPgpHk5Ko7kfCn5_sK_mtydq_qLRlMdbuLjyzOQ/edit#gid=0"
},
"columns": {
"mappingMode": "defineBelow",
"value": {
"tags": "={{ $('Telegram Trigger').item.json.message.text.split(\"\\n\")[1] || \"\" }}",
"hastags": "={{ $('Telegram Trigger').item.json.message.text.split(\"\\n\")[2] || \"\" }}",
"title": "={{ $('Loop Over Items').item.json.script.slice(0,90) }}...",
"description": "={{ $('Loop Over Items').item.json.script }}",
"link": "={{ $('HTTP Request3').item.json.output_files.out_1.storage_url }}"
},
"matchingColumns": [
"link"
],
"schema": [
{
"id": "title",
"displayName": "title",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "description",
"displayName": "description",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "tags",
"displayName": "tags",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "hastags",
"displayName": "hastags",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "link",
"displayName": "link",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": false
}
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {}
},
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.7,
"position": [
2144,
672
],
"id": "bbf660c9-738f-4184-8e95-c97177cf79b4",
"name": "Append or update row in sheet",
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
"text": "=Video Ba\u015far\u0131yla Zamanland\u0131. Video Say\u0131s\u0131: {{ $('Basic LLM Chain').item.json.output.parts.length }}",
"additionalFields": {}
},
"type": "n8n-nodes-base.telegram",
"typeVersion": 1.2,
"position": [
1696,
368
],
"id": "029e467d-2b1d-4256-b216-f2cee71a4d48",
"name": "Send a text message",
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"compare": "selectedFields",
"fieldsToCompare": "tags",
"options": {}
},
"type": "n8n-nodes-base.removeDuplicates",
"typeVersion": 2,
"position": [
1408,
400
],
"id": "906a20a7-3267-4896-9284-ba7b50bb1863",
"name": "Remove Duplicates"
}
],
"connections": {
"Apify": {
"main": [
[
{
"node": "Basic LLM Chain",
"type": "main",
"index": 0
}
]
]
},
"Basic LLM Chain": {
"main": [
[
{
"node": "Apify1",
"type": "main",
"index": 0
}
]
]
},
"Mistral Cloud Chat Model": {
"ai_languageModel": [
[
{
"node": "Basic LLM Chain",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Structured Output Parser": {
"ai_outputParser": [
[
{
"node": "Basic LLM Chain",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Apify1": {
"main": [
[
{
"node": "Code",
"type": "main",
"index": 0
}
]
]
},
"HTTP Request1": {
"main": [
[
{
"node": "Wait",
"type": "main",
"index": 0
}
]
]
},
"HTTP Request3": {
"main": [
[
{
"node": "HTTP Request",
"type": "main",
"index": 0
}
]
]
},
"Wait": {
"main": [
[
{
"node": "HTTP Request3",
"type": "main",
"index": 0
}
]
]
},
"Loop Over Items": {
"main": [
[
{
"node": "Remove Duplicates",
"type": "main",
"index": 0
}
],
[
{
"node": "HTTP Request1",
"type": "main",
"index": 0
}
]
]
},
"Code": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"HTTP Request": {
"main": [
[
{
"node": "Append or update row in sheet",
"type": "main",
"index": 0
}
]
]
},
"Telegram Trigger": {
"main": [
[
{
"node": "Apify",
"type": "main",
"index": 0
}
]
]
},
"Append or update row in sheet": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"Remove Duplicates": {
"main": [
[
{
"node": "Send a text message",
"type": "main",
"index": 0
}
]
]
}
},
"active": true,
"settings": {
"executionOrder": "v1",
"binaryMode": "separate",
"availableInMCP": false
},
"versionId": "4b2d90e5-ace9-40f0-a0ef-0b8df7e883f1",
"meta": {
"templateCredsSetupCompleted": true
},
"id": "FBmpsJwnB1BpJ22T",
"tags": []
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Video Generator. Uses executeWorkflowTrigger, telegram, httpRequest, openAi. Event-driven trigger; 28 nodes.
Source: https://github.com/0xabstracted/socialmedia-audio-extractor/blob/main/n8n/workflows/05_Video_Generator.json — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
Faceless Video. Uses httpRequest, agent, googleDrive, stickyNote. Event-driven trigger; 29 nodes.
Generate AI viral videos with NanoBanana & VEO3, shared on socials via Blotato 2. Uses @blotato/n8n-nodes-blotato, googleSheets, lmChatOpenAi, toolThink. Event-driven trigger; 94 nodes.
The best content automation template in the market is now even better—with “deep research” on time-sensitive topics\! Unlike most n8n content automation templates that are mainly for “demo purposes,”
Inbox Guardian. Uses gmailTrigger, lmChatOpenAi, agent, textClassifier. Event-driven trigger; 66 nodes.
This template is designed for marketers, content creators, and e-commerce brands who want to automate the creation of professional ad videos at scale. It’s ideal for teams looking to generate consiste