Webhooks turn video generation from something you initiate manually into something that responds to events. A new commit gets pushed. A customer submits a changelog entry. A CI pipeline finishes green. Any of these events can trigger the creation of a fully produced video without anyone clicking "record."

Why Webhooks for Video?

The traditional video workflow is pull-based: you decide it is time to make a video, then you do all the steps. A webhook-driven workflow is push-based: an external event says "a video is needed" and the system produces one. This distinction matters for teams where content should be created in response to real activity -- release notes, feature demos, incident postmortems.

Architecture Overview

ComponentRoleTechnology
Webhook receiverAccepts POST requests, validates signaturesExpress.js / Fastify
Job queueBuffers incoming requests, manages concurrencyBullMQ + Redis
Video pipelineProcesses recordings into finished videosFFmpeg, Claude API, TTS
PublisherUploads to YouTube with metadataYouTube Data API v3

Building the Webhook Receiver

import express from 'express';
import crypto from 'crypto';
import { videoQueue } from './queue';

const app = express();
app.use(express.json());

app.post('/webhook/generate', (req, res) => {
  const signature = req.headers['x-webhook-signature'];
  const expected = crypto
    .createHmac('sha256', process.env.WEBHOOK_SECRET!)
    .update(JSON.stringify(req.body))
    .digest('hex');

  if (signature !== expected) {
    return res.status(401).json({ error: 'Invalid signature' });
  }

  videoQueue.add('generate', {
    title: req.body.title,
    sourceUrl: req.body.source_url,
    context: req.body.context,
    channel: req.body.channel || 'default'
  });

  res.status(202).json({ status: 'queued' });
});

app.listen(3500);

Always validate webhook signatures. Without validation, anyone who discovers your endpoint can queue arbitrary video jobs.

GitHub Push Example

A practical use case: every time you push to your main branch, a video summarizing the changes gets generated. Configure a GitHub webhook pointing to your endpoint. The payload includes commit messages, changed files, and diffs. Your pipeline extracts these, generates a narration script from the code changes, and produces a changelog video.

Stop editing. Start shipping.

VidNo turns your coding sessions into YouTube videos — scripted, edited, thumbnailed, and uploaded. Shorts included. One command.

Try VidNo Free

Form Submission Example

For non-developer teams: a simple web form where a product manager types a feature name and description. On submit, the form POSTs to the webhook endpoint, which queues a video explaining the feature using predefined templates and screen recordings from a library.

Queue Management

Webhooks can arrive in bursts. If ten commits land in rapid succession, you do not want ten simultaneous FFmpeg processes. BullMQ handles this:

  • Set concurrency to 1 or 2 depending on server resources
  • Configure retry with exponential backoff for transient failures
  • Add a rate limiter to prevent YouTube API quota exhaustion
  • Store completed job results for audit and debugging

Monitoring and Observability

Webhook-driven systems fail silently if you are not watching. Add these safeguards:

  1. Log every incoming webhook with its payload hash and processing status
  2. Track queue depth -- if it grows faster than it drains, you have a throughput problem
  3. Alert on consecutive failures (three failed renders in a row likely means a systemic issue)
  4. Expose a /health endpoint that reports queue status and last successful render time

VidNo's local pipeline is well-suited for webhook triggering because the entire render chain runs on your own infrastructure. You control the queue depth, the concurrency, and the resource allocation. There is no metered API call per render -- just your own CPU and the final YouTube upload.