This project is an end-to-end automation pipeline that:
- Generates an AI video using OpenAI’s Sora API (or any video generation endpoint you connect)
- Uploads the video to your Google Drive
- Logs metadata to Google Sheets
- Downloads the video for re-upload
- Automatically uploads the video to your YouTube Shorts channel
- Provides a custom frontend with buttons to trigger workflows & navigate to essential pages
Below is a breakdown of every node exactly as they appear in the screenshot and what each one does.
- Purpose: Starts the entire workflow when your frontend sends the prompt.
- Triggered by: Clicking the lightbulb → “Run Workflow” button on the frontend.
- Output: Receives the prompt text from your website.
- Purpose: Sends the user’s prompt to the OpenAI Sora API to start generating the video.
- Input: The prompt from the Webhook.
- Output: Returns a
run_idfrom Sora.
-
Purpose: Every ~15 seconds, this node checks if Sora finished generating the video.
-
Logic:
- If
status != "completed", loop back into itself (via the IF node). - When
status == "completed", continue forward.
- If
- Purpose: Creates a 15-second delay between each poll.
- Connected between:
HTTP Request1→Wait→ back toHTTP Request1.
- Purpose: After Sora finishes, this node fetches the actual file URL.
-
Requires:
- Google OAuth2 credentials
- Google Drive API enabled in Google Cloud Console
-
Purpose: Uploads the downloaded Sora video to your Google Drive folder.
-
Output: Produces a
webViewLink(used later for Sheets + YouTube).
Your current code (unchanged):
const soraData = $items("HTTP Request1")[0].json;
return [
{
json: {
Title: soraData.prompt || soraData.input?.prompt || "No prompt found",
Date: new Date().toLocaleString(),
Video_Link: $json.webViewLink || $json.data?.webViewLink || "No link found"
}
}
];Purpose:
- Pull prompt + timestamp
- Grab the Google Drive video link
- Format everything into a single object for Google Sheets
-
Requires:
- Google Sheets API credentials
-
Purpose: Writes one row to your log spreadsheet:
- Prompt
- Date
- Video Drive link
- Purpose: Downloads the uploaded video from Drive so it can be sent to YouTube.
- Input: The
fileIdfrom the previous Drive Upload node.
-
Requires:
- YouTube Data API OAuth2 credentials
- Your Google Cloud project must have: ✔ YouTube Data API v3 enabled ✔ OAuth client with “YouTube Data API” scopes
-
Purpose: Uploads the downloaded video as a YouTube Short.
-
Important:
- You must use a valid YouTube category ID.
- Shorts use categoryId = 22 (People & Blogs).
- Title + description must come from earlier nodes.
-
Example YouTube fields:
- Title:
Expression → {{$node["Code"].json["Title"]}} - Description:
Check this out! #Shorts #AI #Viral #Short #Funny - Tags:
Shorts,AI,Viral,Short,Funny - File: Binary →
{{$binary.data}}
- Title:
Enable in Google Cloud:
- Google Drive API
- Google Sheets API
- YouTube Data API v3
Then create:
- OAuth Client ID (Desktop App)
- Paste credentials into n8n → Credentials → Google OAuth2
- Create a spreadsheet
- Share with your service account email
- Connect in n8n via Google Sheets node.
-
Must enable YouTube Data API v3
-
Scopes needed:
youtube.uploadyoutube
-
Select External or Internal OAuth consent screen
-
Add your Google account as test user
The frontend is a lightweight static HTML page with a modern full-screen hero design.
The UI was designed from scratch (HTML + CSS + tiny bit of JS). It includes six circular icon buttons, each with a dedicated function.
- Calls a local JS prompt generator using ChatGPT
- Pops up a list of idea suggestions (You removed the OpenAI node from the backend to avoid costs — this stays front-end only.)
- Sends the user’s prompt to your n8n webhook
- Starts the entire Sora → Drive → Sheets → YouTube pipeline
- Links to:
https://github.com/justinlej12/Sora-2-API-n8n-Automation
- Opens your YouTube channel where the Shorts are uploaded
- Links directly to your Google Sheets log
- Shows: Prompt, Date, Drive link, etc.
- Opens the Drive folder where n8n uploads each generated Sora video
- You open the frontend → click the Basketball button
- It sends your prompt → n8n Webhook
- n8n calls OpenAI Sora → gets
run_id - n8n polls until the video is done
- n8n downloads the video → uploads it to Google Drive
- n8n logs metadata to Google Sheets
- n8n uploads the video to YouTube Shorts
- You can view results via the YouTube, Sheets, and Drive buttons
Your workflow now:
- Requires zero manual uploading
- Posts Shorts automatically
- Tracks everything
- Gives you a clean frontend dashboard
- Has already gotten 2,400+ views and new subs on YouTube (W 💪)