Back to Templates

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

Created by

Created by: ayo.o || flowgramming101
ayo.o

Last update

Last update 12 hours ago

Categories

Share


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

  1. Runs on a schedule three times a day (08:00, 12:00, and 18:00).
  2. 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.
  3. Builds a kie.ai Sora-2 text-to-video job request using the generated prompt and submits it to the kie.ai API.
  4. Waits and repeatedly polls kie.ai until the job succeeds and returns a result payload containing a video download URL.
  5. Downloads the generated video file from the returned URL.
  6. 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

  1. Add an OpenAI API credential, a kie.ai API key using HTTP Header Auth, and OAuth credentials for Google Drive, YouTube, and Gmail.
  2. 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.
  3. Review or adjust the random scenario range (videoIdeaMin/videoIdeaMax) and YouTube upload settings (for example, privacyStatus and notifySubscribers) before activating the workflow.