Automated Video Clip Generator Using LLMs - n8n Workflow

Use this powerful n8n workflow to automatically analyze YouTube video transcripts, select viral short clips using Mistral AI, and send them for processing. Perfect n8n templates for creators.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Content creators and YouTubers looking to maximize reach by repurposing long-form content into shorts.
Media agencies needing scalable solutions for video clip generation.
n8n users interested in complex AI orchestration using Langchain nodes.
Developers looking for advanced n8n templates involving HTTP requests and custom logic.

Overview

The challenge for content creators is manually reviewing hours of footage to find optimal segments for short-form content (like YouTube Shorts or TikToks). This advanced n8n workflow solves this problem by leveraging powerful AI. The n8n workflow takes a video transcript, passes it through a sophisticated Langchain pipeline utilizing the Mistral Cloud Chat Model, and instructs the AI to identify and structure the start and end times for multiple viral clips. This particular n8n workflow eliminates tedious manual review, making content repurposing scalable and efficient. This robust n8n node structure ensures the output is always standardized and ready for the final video processing step.

How it Works


  1. Trigger and Setup: The n8n trigger is manually activated using the ‘When clicking ‘Execute workflow’’ n8n node, initiating the process. A subsequent Edit Fields n8n node sets necessary variables (like the video identifier).

  2. Transcript Retrieval: The Get Transcript n8n node (an HTTP Request) fetches the full text transcript of the long-form video from an external service.

  3. Data Preparation: A Code n8n node processes the raw transcript, preparing it for optimal input into the LLM chain. This is a crucial data preparation step in the n8n workflow.

  4. AI Selection Core: The Select Clips Langchain n8n node uses the transcript, guided by the Mistral Cloud Chat Model and a Structured Output Parser. This structure ensures the AI returns a list of clips with precise timestamps in a machine-readable JSON format.

  5. Iteration Setup: The Split Out n8n node separates the resulting JSON array into individual items, one for each suggested clip. The Loop Over Items n8n node then initializes a batch processing loop to handle each clip independently.

  6. Saving Clips: For every clip item in the loop, the Save Clips n8n node (an HTTP Request) sends the clip data (video ID, start time, end time) to an external API responsible for performing the actual video editing operation.

  7. Synchronization: A Wait n8n node is included after the save operation, ensuring flow stability or allowing time for the external service to acknowledge the request before the n8n workflow proceeds to the next iteration.

Installation Guide


  1. Import: Copy the provided n8n workflow JSON and paste it into your n8n canvas using the "New > Import from JSON" option. This imports the complete structure of this specialized n8n templates.

  2. Credentials Setup:

Mistral Cloud Chat Model: Configure your API key credentials for the Mistral Cloud service within the dedicated n8n node.
HTTP Requests: For the Get Transcript and Save Clips n8n node, update the URL and authorization headers to point to your specific transcription and video processing services.

  1. Custom Code: Review the Code n8n node and ensure the custom JavaScript aligns with the structure of your incoming transcript data.

  2. Testing: Manually execute the n8n trigger to test the end-to-end automation flow and verify that the AI successfully identifies and forwards clip data. This n8n workflow is ready to save you significant time.

Node Details

When clicking ‘Execute workflow’ (Manual Trigger): The starting n8n trigger for this automation, used for manual testing and execution.
Edit Fields (Set): Used to inject or prepare essential workflow variables, such as the target video's unique identifier, before fetching the transcript.
Get Transcript (HTTP Request): Performs an external API call to retrieve the textual transcript of the long-form video. This uses a standard n8n node for connectivity.
Code (Code): Executes custom JavaScript logic, primarily for data transformation to refine the transcript structure before it enters the AI chain. A critical n8n node for data manipulation.
Mistral Cloud Chat Model (Langchain LLM): Provides the LLM capabilities. This specific n8n node uses Mistral AI to analyze the text and make decisions about clip selection.
Structured Output Parser (Langchain): Ensures the AI’s output adheres to a predefined JSON schema, guaranteeing reliable data structure for downstream n8n nodes.
Select Clips (Langchain LLM Chain): The orchestrator n8n node that combines the prompt, the Mistral model, and the parser to execute the core clip identification logic.
Split Out (Split Out): Takes the array of identified clips from the AI output and splits them into individual data items, preparing them for iteration.
Loop Over Items (Split In Batches): Manages the iteration process, handling each short clip suggestion one by one. This core logic n8n node ensures sequential processing across the n8n workflow.
Save Clips (HTTP Request): Sends the specific clip parameters (start/end time) to an external video editing API, initiating the final video creation.


  • Wait (Wait): Used for synchronization or rate limiting, ensuring a brief pause after saving a clip before the n8n workflow attempts the next item.

Related n8n Workflows

Paid

Nodes: 12 Nodes
Updated: December 26 2025
View all
Created by

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

Featured*