Generate and publish AI home cam Shorts with OpenAI, kie.ai and YouTube

Quick overview This workflow runs three times daily to generate an AI “home cam” short video concept with OpenAI, create the video via kie.ai, then download and archive it to Google Drive, upload it to YouTube as a public video, and send a confirmation email via Gmail.

How it works Runs on a schedule three times a day (08:00, 12:00, and 18:00). Selects a random scenario number from the configured range and asks OpenAI (GPT-4.1-mini) to generate a title, description, tags, and a detailed text-to-video prompt as structured JSON. Builds a kie.ai Sora-2 text-to-video job request using the generated prompt and submits it to the kie.ai API. Waits and repeatedly polls kie.ai until the job succeeds and returns a result payload containing a video download URL. Downloads the generated video file from the returned URL. Uploads the video to a specified Google Drive folder, publishes it to YouTube with the AI-generated metadata, and emails you a notification containing the prompt and video link.

Setup Add an OpenAI API credential, a kie.ai API key using HTTP Header Auth, and OAuth credentials for Google Drive, YouTube, and Gmail. In the workflow variables, set your notification email address, the target Google Drive folder ID, and the callback URL value used in the kie.ai request. Review or adjust the random scenario range (videoIdeaMin/videoIdeaMax) and YouTube upload settings (for example, privacyStatus and notifySubscribers) before activating the workflow.

Requirements OpenAI API credential kie.ai API key OAuth credentials for Google Drive, YouTube, and Gmail

0
Downloads
23
Views
8.92
Quality Score
intermediate
Complexity
Created:6/21/2026
Updated:6/28/2026

🔒 Please log in to import templates to n8n and favorite templates

Workflow Visualization

Loading...

Preparing workflow renderer

Comments (0)

Login to post comments