AQ_YouTubeUpload
Upload a finished mp4 to YouTube straight from the ComfyUI graph
- video_url
- video_id
- instruction
End of the pipeline. If AQ_StillImageToVideo turns a cover image and an audio track into an mp4, AQ_YouTubeUpload is the node that takes that mp4 and publishes it - category set to Music, title applied, privacy level chosen, straight from the graph. It's the final step of an automated song-cover machine, and it's a genuinely unusual thing to have inside ComfyUI: most people upload videos by hand; this node just does the whole YouTube API dance for you.
The setup is the real cost of entry. YouTube doesn't accept a plain API key for uploads - it needs OAuth 2.0, which means three credentials: a client ID, a client secret, and a refresh token. You generate those once per channel, in the Google Cloud console, and paste them into the node. The good news: the node itself is the documentation. Its instruction output is a full step-by-step guide for creating a Google Cloud project, enabling the YouTube Data API v3, setting up the OAuth consent screen, creating a "Web application" OAuth client, and minting a refresh token via the OAuth Playground.
How it works
Source-grounded, it's a standard OAuth + resumable upload:
- POSTs your
client_id/client_secret/refresh_tokento Google's token endpoint to get a short-lived access token, - starts a resumable upload session with the video metadata (title, description, tags,
categoryId10 for Music, your chosenprivacy_status), - streams the file up in 10 MB chunks, resuming on
308responses until it gets a video ID.
If you leave description empty, it auto-composes one from your tagline, tags, keyscale, and headline inputs - including embedding the musical key as Key: <keyscale>, which fits this pack's whole song-cover vibe. If any of the three credentials is blank, the node refuses to run and hands you the instruction guide instead.
The inputs that matter
- video_path - the mp4 to upload. Wire in the
video_pathoutput from AQ_StillImageToVideo, or type a path. - client_id, client_secret, refresh_token - the OAuth trio. All three required.
- title - defaults to "My Song". Change it.
- privacy_status -
private(default),unlisted, orpublic. Keep it private while you test; flipping to public is a one-line change once you trust the pipeline.
Optional: description (multiline, auto-built if left empty), plus tagline, headline, tags (comma-separated), and keyscale (the same 34-option musical-key dropdown from the video node).
Outputs
Three STRING outputs: video_url (https://www.youtube.com/watch?v=<id>), video_id, and instruction - that giant OAuth setup guide again. It's not an error; it's the node shipping its own manual as a port. You only actually read it once, but it's there whenever the upload fails.
Installing
Pack-level install, same as the rest:
cd ComfyUI/custom_nodes
git clone https://github.com/2frames/ComfyUI-AQnodes
restart, or use ComfyUI Manager and search "AQnodes". This node's only dependency is requests, which ComfyUI already has. The real "dependency" is your Google Cloud credentials.
Troubleshooting (straight from the node's own error hints)
unauthorized_client- two common causes. Either you created a Desktop app OAuth client instead of a Web application one (the Playground needs a web redirect URI), or you authorized the API in the OAuth Playground before pasting your own credentials into its gear icon, so the token belongs to Google's own client. Recreate the client as Web application with redirect URIhttps://developers.google.com/oauthplayground, then redo the token step.access_denied/ 403 during upload - the Google account uploading isn't listed as a Test User on the OAuth consent screen. Add it, redo the authorization.invalid_grant- the refresh token was revoked or the authorization removed. Regenerate from the token step.- Missing file - if
video_pathdoesn't exist, the node raisesFileNotFoundError. Feed it a real path.
One housekeeping note: this node stores your client secret and refresh token in the workflow JSON in plain text. That's fine for a private local setup; it's a credential sitting in your graph, so don't go pasting the workflow into public share sites with real tokens in it.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| video_path | STRING | — | |
| client_id | STRING | — | |
| client_secret | STRING | — | |
| refresh_token | STRING | — | |
| title | STRING | My Song | — |
| privacy_status | COMBO | private | 3 options: private, unlisted, public |
| descriptionopt | STRING | — | |
| taglineopt | STRING | — | |
| headlineopt | STRING | — | |
| tagsopt | STRING | — | |
| keyscaleopt | COMBO | C major | 34 options: C major, C# major, Db major, D major, D# major, Eb major, +28 |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| video_url | STRING | — |
| video_id | STRING | — |
| instruction | STRING | — |