Skip to main content

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

Workflow preview

Workflow preview
100%
Generate and publish AI home cam Shorts with OpenAI, kie.ai and YouTube preview
Open on n8n.io

1. Workflow Overview

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 i...

Best for

  • Automation automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.set, n8n-nodes-base.scheduletrigger, n8n-nodes-base.code, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.lmchatopenai, @n8n/n8n-nodes-langchain.memorybufferwindow, @n8n/n8n-nodes-langchain.toolthink, @n8n/n8n-nodes-langchain.outputparserstructured

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by ayo.o.

Original n8n.io source

1.1 Workflow description

Title
Generate and publish AI home cam Shorts with OpenAI, kie.ai and YouTube
Workflow name
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

  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.

Requirements

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

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Configure Workflow Variables

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 2 - Trigger on Schedule (3x Daily)

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.2

Block 3 - Pick Idea At Random

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 4 - Generate Video Script and Metadata

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 3

Block 5 - OpenAI GPT-4 Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.3

Block 6 - Conversation Memory Buffer

Type / Role
@n8n/n8n-nodes-langchain.memoryBufferWindow - memoryBufferWindow
Config choices
Version 1.3

Block 7 - Think Through Video Concept

Type / Role
@n8n/n8n-nodes-langchain.toolThink - toolThink
Config choices
Version 1.1

Block 8 - Validate Video Script JSON

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.3

Block 9 - Prepare Video Generation Request

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 10 - Submit Video to kie.ai

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.3

Block 11 - Wait for Video Generation

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

Block 12 - Poll kie.ai for Video Status

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.3

Block 13 - Check if Video is Ready

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 14 - Extract Video Download URL

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 15 - Download Generated Video File

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.3

Block 16 - Upload Video to Google Drive

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 17 - Publish Video to YouTube

Type / Role
n8n-nodes-base.youTube - youTube
Config choices
Version 1

Block 18 - Send Video Notification Email

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2.1

Block 19 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 20 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 21 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 22 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 23 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Generate and publish AI home cam Shorts with OpenAI, kie.ai and YouTube
Complexity advanced
Nodes 23
Categories Automation
Author ayo.o
Published 16 Jun 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/16439/16439.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Generate and publish AI home cam Shorts with OpenAI, kie.ai and YouTube do?

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 i...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Automation use case.