Workflow Error Recovery Logged · Traceable · Alerted

Automate AI Content Workflows With Traceable Failure Handling.

An open-source n8n automation system built by Rishvin Reddy with centralized workflow error handling, Supabase-backed failure logging, execution-level diagnostics, failed-node tracking, and real-time Slack alerts for faster incident visibility and debugging.

01 Error Capture
02 Supabase Logging
03 Slack Alerts
POWERED BY
n8n Supabase PostgreSQL RPC Slack REST API Webhooks
content-factory / execution
LIVE
workflow: AI_CONTENT_FACTORY_V3.2 env: production
IDEMPOTENCY Duplicate blocked
POSTGRESQL Atomic claim acquired

POWERED BY INDUSTRY-LEADING APIS

n8n
Supabase
OpenAI
Tavily
ElevenLabs
Creatomate

The Pipeline Architecture

Engineered for maximum reliability and minimum cost.

Atomic Idempotency

Uses a Supabase PostgreSQL RPC as an atomic admission gate. It calculates a SHA-256 hash of the request to prevent duplicate API costs.

AI Orchestration

Parallel branches leverage OpenAI (GPT-4o & DALL-E 3) and ElevenLabs for script writing, scene planning, voiceover, and SEO metadata.

Creatomate Rendering

Merges all assets into a final `.mp4` video automatically. A non-blocking polling loop checks render status without tying up resources.

YouTube Auto-Publish

Secure OAuth2 integration pushes the final `.mp4` directly to your channel, complete with AI-generated title, description, and tags.

How It Works

From a single JSON payload to a published YouTube video.

1

Trigger & Admission

You send a simple POST request with a topic. The n8n webhook receives it, hashes the payload, and asks Supabase for an idempotency lock. If it's a duplicate, it stops immediately. If new, it proceeds.

2

Research & AI Generation

Tavily searches the web for live context. OpenAI writes an engaging script and breaks it down into visual scenes. ElevenLabs generates a high-quality AI voiceover. DALL-E 3 creates beautiful scene imagery and thumbnails.

3

Cloud Rendering

All assets (audio, images, text overlays) are sent to Creatomate. n8n enters a non-blocking polling loop, checking every 15 seconds until the MP4 is fully rendered.

4

Auto-Publishing

The final MP4 is downloaded and uploaded directly to YouTube using a secure OAuth2 session. Finally, a success notification with the video URL is sent to your Slack workspace.

Live Simulation

Test the idempotency lock and watch the pipeline execute in real-time.

API Network Traffic
Idle...
n8n Execution Logs
Waiting for webhook trigger...

Pipeline Status

  • 1. Webhook Triggered
  • 2. Idempotency Lock
  • 3. AI Generation (OpenAI/ElevenLabs)
  • 4. Video Render (Creatomate)
  • 5. Publish to YouTube

Manual vs AI Factory

Manual Workflow

  • Write script manually (2 hours)
  • Record voiceover (1 hour)
  • Edit in Premiere Pro (3 hours)
  • Upload to YouTube manually
  • Total Cost: ~$50 - $100+
  • Total Time: 5+ Hours

AI Content Factory

  • OpenAI generated script (10s)
  • ElevenLabs voiceover (15s)
  • Creatomate auto-render (3 mins)
  • API auto-upload to YouTube
  • Total Cost: $0.69
  • Total Time: ~4 Minutes

Massive Scale,
Micro Costs.

Because the system operates fully autonomously, tracking the unit cost of production is critical. The idempotency lock ensures you never pay for duplicate renders.

  • OpenAI GPT-4o: ₹2.10 (~$0.025)
  • DALL-E 3 (6 images): ₹20.00 (~$0.240)
  • ElevenLabs TTS: ₹22.50 (~$0.270)
  • Creatomate: ₹12.50 (~$0.150)
₹57 ~$0.69 Per Video

Frequently Asked Questions

How does it prevent duplicate costs?

The pipeline uses an atomic PostgreSQL Remote Procedure Call (RPC) on Supabase. Before running any expensive AI APIs, n8n generates a SHA-256 hash of your input topic and attempts to claim a database lock. If the hash already exists, the database rejects it and n8n halts execution immediately.

Do I need to know how to code to use this?

No! The beauty of n8n is that it is a visual node-based editor. All you need to do is import the `AI_Content_Factory_V3.2.json` file into your n8n workspace, add your API keys to the environment variables, and run the SQL script in Supabase.

What happens if a render takes too long?

The pipeline uses a non-blocking polling loop for Creatomate. By default, it will check the render status every 15 seconds up to 20 times (5 minutes total). If it times out, the Global Error Handler catches it, updates your database status to `failed`, and pings you on Slack.

Ready to Automate?

Deploy the full pipeline to your n8n instance in minutes.

Download AI_Content_Factory_V3.2.json