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

Go to Workflow
0 views
Built by ayo.o ayo.o
Created on June 22, 2026

Description

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.

Nodes Used (10)

AI Agent
@n8n/n8n-nodes-langchain.agent
Code
n8n-nodes-base.code
Gmail
n8n-nodes-base.gmail
Google Drive
n8n-nodes-base.googleDrive
HTTP Request
n8n-nodes-base.httpRequest
OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi
Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow
Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured
Think Tool
@n8n/n8n-nodes-langchain.toolThink
YouTube
n8n-nodes-base.youTube