Reddit Thread to Vertical Video Generator - n8n Workflow

Use this advanced n8n workflow to automatically convert popular Reddit threads into engaging vertical videos (e.g., TikTok/Shorts) using OpenAI for script generation and TTS, leveraging the power of the n8n node ecosystem.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Social Media Managers looking to quickly repurpose popular Reddit content.
Content Creators needing automated, scalable video production tools.
Developers implementing advanced media processing logic within an n8n workflow.
Anyone interested in complex AI-driven n8n templates combining multiple services.

Overview

Creating engaging vertical video content from long-form text, like Reddit threads, is usually a tedious, multi-step manual process involving scripting, sourcing stock footage, recording voiceovers, and editing. This specialized n8n workflow template solves this challenge by completely automating the pipeline.

It orchestrates the retrieval of Reddit data, uses the OpenAI n8n node for smart script generation and Text-to-Speech (TTS), sources visual content from Pexels, and compiles everything into a finished video using a video rendering API (like ShotStack).

This robust n8n automation eliminates the need for manual editing, allowing for high-volume content creation directly triggered via a simple Webhook. If you are looking for advanced n8n templates that showcase the full potential of custom code and external APIs, this flow is an excellent example.

How it Works

This high-level n8n workflow operates in six distinct phases, triggered either manually or via an incoming Webhook request containing the Reddit URL and desired video parameters.


  1. Input Processing & Data Retrieval: The workflow begins with the Webhook n8n trigger, splitting input parameters (URL, voice settings, length). It then uses HTTP Requests to get a Reddit API token and fetch the corresponding thread and comments.

  2. AI Scripting: The content is passed to a Code n8n node to limit the comment length, ensuring conciseness. An OpenAI n8n node analyzes the Reddit text and generates a concise, video-ready script (the content that will be spoken and displayed).

  3. Media Synchronization: The generated script is split into individual clips using the Split Clips n8n node. Based on keywords from these clips, the workflow queries the Pexels API (via an HTTP Request n8n node) to find appropriate stock video footage.

  4. TTS and Media Upload: The workflow generates the voiceover using the OpenAI n8n node (Text-to-Speech functionality). It obtains upload links from the video rendering service and uploads both the Pexels videos and the generated TTS audio file.

  5. Video Rendering: Several Code and Merge n8n nodes synchronize the visual clips, audio, and subtitle data. A critical Code n8n node (create timeline with video) builds the complex JSON payload required by the video rendering API. An HTTP Request n8n node submits this payload to render the video. Wait n8n nodes are used strategically to allow the rendering service time to process.

  6. Final Output: The workflow periodically checks the video status using an If n8n node (If rendered). Once complete, the final video link is retrieved and returned immediately to the originating system via the Respond to Webhook n8n node.

Installation Guide

To deploy this comprehensive n8n workflow, follow these steps:


  1. Import the n8n Workflow: Copy the provided JSON data and paste it into your n8n instance using the 'New' -> 'Import from JSON' feature.

  2. Setup Credentials: This n8n workflow requires credentials for:

Reddit: Requires OAuth credentials for fetching thread data (handled by two HTTP Request n8n nodes: get reddit token and get reddit thread).
OpenAI: Essential for the OpenAI (ChatGPT) and Generate TTS n8n node operations (scripting and voiceover).
Pexels: Needed for the Pexels Query HTTP Request n8n node to find stock videos.
Video Rendering Service (e.g., ShotStack): Required for obtaining upload links and submitting the final render request (used by several HTTP Request n8n nodes throughout the pipeline).

  1. Configure the Trigger: If using the Webhook n8n trigger, ensure the URL is registered in your external system. For testing, manually execute the When clicking ‘Test workflow’ n8n node and provide sample input data (Reddit URL, voice, etc.).

  2. Review Code Nodes: Several Code n8n nodes handle complex data manipulation and JSON structure creation, especially for the video timeline. Review these scripts to ensure they match your specific API key formats and data schemas.

Node Details

Webhook / Manual Trigger: The starting n8n trigger for this automation. It receives the target Reddit link and video generation settings (like voice style and desired video length).
HTTP Request (Reddit & Pexels): These n8n node instances manage external API calls—first to Reddit to authenticate and pull thread content, and then to Pexels to source high-quality, relevant stock footage.
Convert url to reddit api url (Code): A custom n8n node that transforms the human-readable Reddit URL into the correct API endpoint format required for data fetching.
OpenAI (ChatGPT) & Generate TTS (OpenAI): The core AI components. One n8n node instance generates the video script from the comments, and the other generates the corresponding Text-to-Speech audio file.
Split Clips (Item Lists): Breaks the AI-generated script into logical chunks, which are then used to drive individual Pexels queries.
Code (Extract 3 videos per item & Combine 3 into 1): Custom n8n node logic used to select and structure the Pexels video URLs for the rendering service.
HTTP Request (Upload videos to ShotStack / Render the video): These are critical API calls responsible for pushing the raw media files and the final timeline JSON to the video rendering platform.
create timeline with video (Code): A highly specialized n8n node that constructs the detailed, multi-layered JSON structure (timeline) required by the video editing API, merging the video clips, audio tracks, and subtitle text.


  • If Status=Ready then continue (If): A flow control n8n node that determines whether the workflow should proceed with media downloading or if it needs to use a Wait n8n node for further rendering time.

Related n8n Workflows

Paid

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

Software Engineer

Featured*