N8N ViralFlow
A fully automated n8n-based pipeline that transforms user input into short, scroll‑stopping videos with hooks, dynamic visuals, and dramatic TTS narration and autmatically uploads it on their Youtube.

🛠️ Tech Stack
Example Youtube Channel
🎯 Table of Contents
- 📝 Summary
- ✨ Features
- 🛠️ Tech Stack
- 📋 Workflow Overview
- 🔧 n8n Nodes & AI Models
- 🚀 Quick Start
- 📫 Contact
📝 Summary
Users fill out a stylized “Brain Rotter” form with:
- Topic (e.g. Indian history)
- Duration (30s / 1min / 2min)
- Generative Style (e.g. Disney Pixar)
The workflow then:
- Generates 20 facts via web search
- Writes a punchy script (“What if…?” hook, reveals, mic‑drop)
- Converts text→speech, splits into segments
- Creates scene prompts, generates images via Together.ai
- Transforms images→video clips, concatenates, captions, adds music
- Uploads final Short to YouTube with metadata & hashtags
✨ Features
- End‑to‑End Automation: From form input to published YouTube Short
- AI‑Powered Content: Facts generation, scriptwriting, image prompts
- Cinematic Visuals: Realistic/dark‑themed images in user‑chosen style
- Dynamic Audio: TTS narration + background music + word‑by‑word captions
- Short‑Form Focus: Maximum 59 s, mobile‑friendly, platform‑optimized
🛠️ Tech Stack
| Category | Tools & Services |
|---|---|
| Orchestration | n8n (automation) |
| AI & LLMs | Ollama (deepseek‑r1:8b, mistral:7b, llama3.1:latest) |
| Image Gen | Together.ai (FLUX.1‑schnell) |
| TTS | chatterbox‑tts‑server (HTTP POST /tts) |
| Transcription | nca‑toolkit (HTTP /v1/media/transcribe) |
| Video Processing | nca‑toolkit (concatenate, ffmpeg compose, captioning) |
| Storage | MinIO / AWS S3 |
| Deployment | Docker, n8n Cloud / Self‑hosted |
📋 Workflow Overview
- Form Input Collection
•formTrigger: Collects Topic, Duration, Style with custom CSS. - Facts Generation
•langchain.agent(deepseek‑r1:8b): Fetches 20 trending, controversial facts. - Script Writing
•langchain.agent(mistral:7b): Builds “SUPREME INDIANS” script with hook, reveals, pride, mic‑drop. - Script Cleanup
•code: Strips formatting, newlines, asterisks. - Text‑to‑Speech
•httpRequest→chatterbox‑tts‑server→ returns WAV + timestamps. - Transcription & Segmentation
- Transcribe audio → JSON/SRT.
- Split into ≤2 s scenes (
Split into N's Scenes,Fixer2).
- Image Prompting
•chainLlm(llama3.1): Generates cinematic prompts per segment. - Image Generation
•httpRequest→ Together.ai API → base64 PNG → convert & upload to S3. - Clip Creation & Assembly
httpRequest→ transform image→video clipcombine→ concatenate all clips
- Enhancements
- Captioning (word‑by‑word)
- Background music layering (FFmpeg compose)
- Trim to 59 s
- YouTube Upload
•youTubenode: Publishes as a public Short with title, description, tags.
🔧 n8n Nodes & AI Models
- n8n-nodes-base.formTrigger – Custom CSS form
- @n8n/n8n-nodes-langchain.agent – deepseek‑r1:8b & mistral:7b
- @n8n/n8n-nodes-langchain.chainLlm – llama3.1 for image prompts
- n8n-nodes-base.httpRequest – TTS, transcription, image & video services
- n8n-nodes-base.code – JS for cleaning, splitting, merging, random zoom speeds
- n8n-nodes-base.s3 – MinIO/AWS S3 uploads
- n8n-nodes-base.aggregate / merge / splitInBatches – Data orchestration
- n8n-nodes-base.youTube – YouTube Shorts publishing
🚀 Quick Start
Learn how to install and get started with each component:
-
n8n Self Hosted AI – A Must Try GitHub Open Source Project!
https://youtu.be/OCet5rGwEeI?si=sOSSSR8-QbAhUqsM -
Chatterbox TTS Server – Setup & Demo
https://youtu.be/VEEn6h2aRR0?si=c-8Lo1YG-iJAw5G8 -
SearchXng – Installation & Configuration
https://youtu.be/O5b9FvHYjqc?si=MOKRk68Gm12IzS8M -
Workflow Inspiration – Automated Content Pipeline Overview
https://youtu.be/sOylPpFyQ8A?si=EfouFqOt1n0UZgqO -
Ngrok – Host N8N for free
https://youtu.be/RvAD2__YYjg?si=3_6tqVncQ0e5yqwL
📫 Contact
- Made by Prabhanshu Kamal
- GitHub: PrabhanshuKamal2121
- LinkedIn: PrabhanshuK
⚖️ Disclaimer
- This pipeline is for educational/demo purposes. It uses publicly available AI models and services. Results may vary; always validate before publishing.