{"name": "AI Video Generation & Auto-Publishing Pipeline", "nodes": [{"id": "vid1-0000-4a5b-8c9d-000000000001", "name": "Sticky Note", "type": "n8n-nodes-base.stickyNote", "typeVersion": 1, "position": [160, -80], "parameters": {"color": 4, "content": "## AI Video Generation & Auto-Publishing Pipeline\n\n**Setup (10 min):**\n1. Create credentials: OpenAI, Gmail OAuth2, Slack OAuth2, plus header-auth keys for your video API and social scheduler.\n2. In *HTTP Request: Render Video*, replace the placeholder URL with your video provider's endpoint (HeyGen/Synthesia-style).\n3. In *Gmail: Request Approval*, set the recipient to your own email address.\n4. In *HTTP Request: Publish to Socials*, replace the placeholder URL with your scheduler's endpoint.\n5. Activate. Every Monday 9 AM a script is written, a video is rendered, and nothing publishes until you click Approve in the email.\n\n**Flow:** Schedule -> Set topic -> OpenAI script -> Render video -> Approval email -> Wait (form) -> IF -> Publish -> Slack. Rejected videos stop at a Slack 'held' note.", "height": 340, "width": 460}}, {"id": "vid1-0001-4a5b-8c9d-111111111111", "name": "Schedule Trigger", "type": "n8n-nodes-base.scheduleTrigger", "typeVersion": 1.2, "position": [240, 300], "parameters": {"rule": {"interval": [{"field": "cron", "cronExpression": "0 9 * * 1"}]}}}, {"id": "vid1-0002-4a5b-8c9d-222222222222", "name": "Set Topic", "type": "n8n-nodes-base.set", "typeVersion": 3.4, "position": [480, 300], "parameters": {"assignments": {"assignments": [{"id": "a1", "name": "topic", "value": "AI automation tools for small businesses", "type": "string"}, {"id": "a2", "name": "audience", "value": "founders and operators", "type": "string"}, {"id": "a3", "name": "duration", "value": "60 seconds", "type": "string"}]}, "options": {}}}, {"id": "vid1-0003-4a5b-8c9d-333333333333", "name": "OpenAI: Write Script", "type": "n8n-nodes-base.openAi", "typeVersion": 1, "position": [720, 300], "credentials": {"openAiApi": {"id": "", "name": "OpenAI API"}}, "parameters": {"resource": "text", "operation": "message", "model": "gpt-4o-mini", "messages": {"message": [{"role": "user", "content": "=Write a 60-second faceless video script about: {{ $json.topic }}.\nTarget audience: {{ $json.audience }}.\n\nFormat:\n- HOOK (first 5 seconds, attention-grabbing)\n- 3 short scenes with on-screen text suggestions\n- CTA (last 5 seconds)\n\nKeep narration under 130 words. Return plain text only, no markdown."}]}, "options": {}}}, {"id": "vid1-0004-4a5b-8c9d-444444444444", "name": "HTTP Request: Render Video", "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.2, "position": [960, 300], "credentials": {"httpHeaderAuth": {"id": "", "name": "Video API Key"}}, "parameters": {"method": "POST", "url": "https://api.your-video-provider.com/v1/videos", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendBody": true, "specifyBody": "json", "jsonBody": "={\"script\": {{ $json.message.content }}, \"aspect_ratio\": \"16:9\", \"voice\": \"female\"}", "options": {}}}, {"id": "vid1-0005-4a5b-8c9d-555555555555", "name": "Gmail: Request Approval", "type": "n8n-nodes-base.gmail", "typeVersion": 2.1, "position": [1200, 300], "credentials": {"gmailOAuth2": {"id": "", "name": "Gmail"}}, "parameters": {"resource": "message", "operation": "send", "subject": "=Video ready for approval: {{ $('Set Topic').item.json.topic }}", "email": "you@example.com", "message": "=Hi,\n\nThis week's AI-generated video is ready:\n\nTopic: {{ $('Set Topic').item.json.topic }}\nVideo link: {{ $json.video_url }}\n\nApprove or reject it here:\n{{ $execution.resumeUrl }}\n\nNothing will be published until you approve.", "options": {}}}, {"id": "vid1-0006-4a5b-8c9d-666666666666", "name": "Wait: Human Approval", "type": "n8n-nodes-base.wait", "typeVersion": 1.1, "position": [1440, 300], "parameters": {"resume": "onFormSubmission", "options": {"formTitle": "Approve this video?", "formDescription": "Review the video from the email, then approve or reject it for publishing.", "formFields": {"values": [{"fieldLabel": "Decision", "fieldType": "dropdown", "requiredField": true, "fieldOptions": {"values": [{"option": "Approve"}, {"option": "Reject"}]}}]}, "responseType": "allEntries"}}}, {"id": "vid1-0007-4a5b-8c9d-777777777777", "name": "IF: Approved?", "type": "n8n-nodes-base.if", "typeVersion": 2.2, "position": [1680, 300], "parameters": {"conditions": {"options": {"caseSensitive": true, "leftValue": "", "typeValidation": "strict"}, "conditions": [{"id": "c1", "leftValue": "={{ $json.Decision }}", "rightValue": "Approve", "operator": {"type": "string", "operation": "equals", "name": "filter.operator.string.equals"}}], "combinator": "and"}, "options": {}}}, {"id": "vid1-0008-4a5b-8c9d-888888888888", "name": "HTTP Request: Publish to Socials", "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.2, "position": [1920, 300], "credentials": {"httpHeaderAuth": {"id": "", "name": "Scheduler API Key"}}, "parameters": {"method": "POST", "url": "https://api.your-social-scheduler.com/v1/publish", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendBody": true, "specifyBody": "json", "jsonBody": "={\"video_url\": {{ $('HTTP Request: Render Video').item.json.video_url }}, \"platforms\": [\"x\", \"linkedin\"]}", "options": {}}}, {"id": "vid1-0009-4a5b-8c9d-999999999999", "name": "Slack: Notify Published", "type": "n8n-nodes-base.slack", "typeVersion": 2.3, "position": [2160, 300], "credentials": {"slackOAuth2Api": {"id": "", "name": "Slack"}}, "parameters": {"channel": "#content", "text": "=Video published: {{ $('Set Topic').item.json.topic }}\n{{ $('HTTP Request: Publish to Socials').item.json.post_url }}", "otherOptions": {}}}, {"id": "vid1-0010-4a5b-8c9d-aaaaaaaaaaaaaaaa", "name": "Slack: Notify Held", "type": "n8n-nodes-base.slack", "typeVersion": 2.3, "position": [1920, 500], "credentials": {"slackOAuth2Api": {"id": "", "name": "Slack"}}, "parameters": {"channel": "#content", "text": "=Video HELD for review (rejected): {{ $('Set Topic').item.json.topic }}", "otherOptions": {}}}], "connections": {"Schedule Trigger": {"main": [[{"node": "Set Topic", "type": "main", "index": 0}]]}, "Set Topic": {"main": [[{"node": "OpenAI: Write Script", "type": "main", "index": 0}]]}, "OpenAI: Write Script": {"main": [[{"node": "HTTP Request: Render Video", "type": "main", "index": 0}]]}, "HTTP Request: Render Video": {"main": [[{"node": "Gmail: Request Approval", "type": "main", "index": 0}]]}, "Gmail: Request Approval": {"main": [[{"node": "Wait: Human Approval", "type": "main", "index": 0}]]}, "Wait: Human Approval": {"main": [[{"node": "IF: Approved?", "type": "main", "index": 0}]]}, "IF: Approved?": {"main": [[{"node": "HTTP Request: Publish to Socials", "type": "main", "index": 0}], [{"node": "Slack: Notify Held", "type": "main", "index": 0}]]}, "HTTP Request: Publish to Socials": {"main": [[{"node": "Slack: Notify Published", "type": "main", "index": 0}]]}}, "active": false, "settings": {"executionOrder": "v1"}, "versionId": "cortexflow-ai-video-generation-autopublish-v1", "meta": {"templateCredsSetupCompleted": false, "instanceId": ""}, "pinData": {}, "tags": [{"name": "cortexflow-template"}]}