Quick overview
This webhook-driven workflow generates short-form video scripts and publishing copy with OpenAI, runs a local copy/duration audit, and renders approved 9:16 videos via Creatomate, returning either a creative kit, an audit checklist, a render job ID, or a final video URL.
How it works
- Receives a POST webhook request (header-authenticated) with an action of draft, audit, render, or status.
- Validates and sanitizes the request fields, enforcing limits and requiring explicit approval and rights confirmation before rendering.
- For draft requests, sends a prompt to the OpenAI Chat Completions API to generate two hooks, a 4-scene storyboard, voiceover, hashtags, and SEO metadata, then returns a validated publishing kit for YouTube/TikTok/Instagram.
- For audit requests, performs a deterministic local preflight to estimate duration and flag copy issues (for example length limits and exaggerated claims) and returns a checklist for human review.
- For render requests, submits the approved Hook, Supporting_Text, and CTA into a specified Creatomate 1080×1920 template and returns the queued render job ID.
- For status requests, fetches the Creatomate render job status and returns the final video URL and snapshot URL once the render succeeds (or errors if it fails).
Setup
- Create a header-authenticated webhook credential for the incoming request and configure the calling app to send the required header.
- Add an OpenAI API key as an HTTP Header Auth credential for the OpenAI request step.
- Add a Creatomate API key as an HTTP Header Auth credential for the Creatomate render and status request steps.
- In Creatomate, create a 1080×1920 template and ensure it contains elements named exactly Hook, Supporting_Text, and CTA, then use its template_id in render requests.
- Build your client request payloads for each action (draft/audit/render/status) and only call render with approved=true and rights_confirmed=true after a manual review.