Skip to main content

Generate AI videos with OpenAI Sora 2 & upload to Google Drive

Workflow preview

Workflow preview
100%
Generate AI videos with OpenAI Sora 2 & upload to Google Drive preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Who's it for This template is designed for filmmakers, content creators, social media managers, and AI developers who want to harness OpenAI's Sora 2 for creating physically accurate, cinematic vid...

Best for

  • Content Creation automation workflows
  • Multimodal AI automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.wait, n8n-nodes-base.switch, n8n-nodes-base.httprequest, n8n-nodes-base.stickynote, n8n-nodes-base.set, n8n-nodes-base.formtrigger, n8n-nodes-base.form, n8n-nodes-base.merge

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Juan Cristóbal Andrews.

Original n8n.io source

1.1 Workflow description

Title
Generate AI videos with OpenAI Sora 2 & upload to Google Drive
Workflow name
Generate AI videos with OpenAI Sora 2 & upload to Google Drive

Who's it for

This template is designed for filmmakers, content creators, social media managers, and AI developers who want to harness OpenAI's Sora 2 for creating physically accurate, cinematic videos with synchronized audio. Whether you're generating realistic scenes from text prompts or reference images with proper physics simulation, creating multi-shot sequences with persistent world state, or producing content with integrated dialogue and sound effects, this workflow streamlines the entire video generation process from prompt to preview and Google Drive upload.

What it does

This workflow:

  • Accepts a text prompt, optional reference image, OpenAI API key, and generation settings via form submission
  • Validates reference image format (jpg, png, or webp only)
  • Sends the prompt and optional reference to the Sora 2 API endpoint to request video generation
  • Continuously polls the video rendering status (queued → in progress → completed)
  • Waits 30 seconds between status checks to avoid rate limiting
  • Handles common generation errors with descriptive error messages
  • Automatically fetches the generated video once rendering is complete
  • Downloads the final .mp4 file
  • Uploads the resulting video to your Google Drive
  • Displays the download link and video preview/screenshot upon completion

How to set up

1. Get Your OpenAI API Key

You'll need an OpenAI API key to use this workflow. Here's the general process:

  1. Create an OpenAI account at https://platform.openai.com
  2. Set up billing - Add payment information to enable API access
  3. Generate your API key through the API keys section in your OpenAI dashboard
  4. Copy and save your key immediately - you won't be able to view it again!

⚠️ Important: Your API key will start with sk- and should be kept secure. If you lose it, you'll need to generate a new one.

2. Connect Google Drive

  • Add your Google Drive OAuth2 credential to n8n
  • Grant necessary permissions for file uploads

3. Import and Run

  • Import this workflow into n8n
  • Execute the workflow via the form trigger
  • Enter your API key, prompt, and desired settings in the form
  • Optionally upload a reference image to guide the video generation

All generation settings are configured through the form, including:

  • Model: Choose between sora-2 or sora-2-pro
  • Duration: 4, 8, or 12 seconds
  • Resolution: Portrait or Landscape options
  • Reference Image (optional): Upload jpg, png, or webp matching your target resolution

⚠️ Sora 2 Pricing

The workflow supports two Sora models which have the following API pricing:

Sora 2 - $0.10/sec

  • Portrait: 720x1280
  • Landscape: 1280x720

Sora 2 Pro - $0.30/sec (720p) or $0.50/sec (1080p)

  • 720p - Portrait: 720x1280, Landscape: 1280x720
  • 1080p - Portrait: 1024x1792, Landscape: 1792x1024

Duration options: 4, 8, 12 seconds (default: 4)

Example costs:

  • 4-second video with Sora 2: $0.40
  • 12-second video with Sora 2 Pro (1080p): $6.00

Requirements

  • Valid OpenAI API key (starting with sk-)
  • Google Drive OAuth2 credential connected to n8n
  • Reference image (optional): jpg, png, or webp format - should match your selected video resolution for best results

How to customize the workflow

Modify generation parameters

  • Edit the form fields to include additional options:
    • Style presets (cinematic, anime, realistic)
    • Camera movement preferences
    • Audio generation options
    • Image reference strength/influence settings

It's recommended to visit the official documentation on prompting for a detailed Sora 2 guide.

Adjust polling behavior

  • Change the Wait node duration (default: 30 seconds)
  • Modify the Check Status polling frequency based on typical generation times
  • Add timeout logic for very long renders

Customize error handling

  • Extend error messages for additional failure scenarios
  • Add retry logic for transient errors
  • Configure notification webhooks for error alerts

Alternative upload destinations

  • Replace the Google Drive node with:
    • Dropbox
    • AWS S3
    • Azure Blob Storage
    • YouTube direct upload
    • Slack/Discord notification with video attachment

Enhance result display

  • Customize the completion form to show additional metadata
  • Add video thumbnail generation
  • Include generation parameters in the results page
  • Enable direct playback in the completion form

Workflow Architecture

Step-by-step flow:

  1. Form Submission → User inputs text prompt, optional reference image, API key, and generation settings
  2. Create Video → Sends request to Sora 2 API endpoint with all parameters and reference image (if provided)
  3. Check Status → Polls the API for video generation status
  4. Status Decision → Routes based on status:
    • Queued → Wait 30 seconds → Check Status again
    • In Progress → Wait 30 seconds → Check Status again
    • Completed → Proceed to download
    • Failed → Display descriptive error message
  5. Wait → 30-second delay between status checks
  6. Download → Fetches the generated video file
  7. Google Drive → Uploads .mp4 to your Drive
  8. Completion Form → Displays download link and video preview/screenshot

If you have any questions, just contact me on Linkedin


Ready to create cinematic AI videos with physics-accurate motion, synchronized audio, and optional image references? Import this workflow and start generating! 🎬✨

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 - Wait

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

Block 2 - Status

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.2

Block 3 - Check Status

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

Block 4 - Download

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

Block 5 - Sticky Note3

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

Block 6 - Sticky Note2

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

Block 7 - Sticky Note1

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

Block 8 - Settings

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

Block 9 - Sticky Note4

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

Block 10 - On form submission

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

Block 11 - Reference

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.2

Block 12 - Create Video B

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

Block 13 - Create Video A

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

Block 14 - Sticky Note

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

Block 15 - Failed

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

Block 16 - Completed

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

Block 17 - Thumbnail1

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

Block 18 - Merge

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.2

Block 19 - Upload Video

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

Block 20 - Aggregate

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

Block 21 - Upload Thumbnail

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

3. Summary Table

Workflow Generate AI videos with OpenAI Sora 2 & upload to Google Drive
Complexity advanced
Nodes 21
Categories Content Creation, Multimodal AI
Author Juan Cristóbal Andrews
Published 07 Oct 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/9360/9360.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 AI videos with OpenAI Sora 2 & upload to Google Drive do?

Who's it for This template is designed for filmmakers, content creators, social media managers, and AI developers who want to harness OpenAI's Sora 2 for creating physically accurate, cinematic vid...

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 Content Creation, Multimodal AI use case.