A weekly YouTube video is mostly editing, and then a stubborn 20 minutes of Studio: choose the file, wait for it to upload, paste the title, paste the description, add tags, upload the thumbnail, find the playlist, set visibility. None of it is creative, and all of it has to happen on the same day, every week.
This recipe hands that part to Codex. You finish the video and put it in a queue folder with a small notes file. On Thursday morning a Codex scheduled task takes the oldest video, uploads it through YouTube Studio with everything filled in, and writes the link into a log.
By the end you’ll have:
- a
channelfolder withqueue/(finished videos),published/andlog.md, - one supervised upload you watched, which was private so nothing went public by accident,
- a Thursday task under Scheduled in the ChatGPT desktop app that uploads the next video publicly.
What you need: the ChatGPT desktop app, the PublishPort desktop app, Node.js, and a one-time edit to a Codex rules file (step 3, copy-paste). Setup takes about 25 minutes if Node.js is already installed; add five for the install.
Who this fits: a channel with a steady cadence (one or two videos a week) whose owner finishes videos ahead of time, on a computer that is on and awake at the upload time. If you don’t run a channel, the part worth borrowing is the guard rules in step 4: check the log first, never blindly retry, look at the platform before uploading again. They work for any unattended publishing job.
What the upload can set (and what it can’t)
I checked this against the PublishPort command set (publishport-opencli 1.0.40). The YouTube publish command takes one video file and sets:
| Field | Supported | Note |
|---|---|---|
| Title | Yes | Up to 100 characters |
| Description | Yes | Can be read from a file |
| Tags | Yes | Comma-separated |
| Thumbnail | Yes | An image file path, optional |
| Playlist | Yes | By name |
| Visibility | Yes | Public, unlisted or private |
| Made for kids | Set to “not made for kids” | Fine for most channels; check yours |
| Premiere time or scheduled publish date | No | The video goes out when the task runs |
YouTube Studio can schedule a publish date, but this command can’t, so the Codex task’s schedule is your publish time. Pick the slot your audience is online, and keep the computer awake for it. For TikTok, which does have a native scheduler here, see the Sunday batch recipe.
It also uploads a single video file. It doesn’t handle captions files, end screens or cards; add those in Studio if you use them.
The recipe
You’ll paste this into Codex in step 2:
Read https://www.publishport.app/skill.md and follow it to set up PublishPort for me, then check that YouTube is connected. In this folder, create queue/, published/ and log.md. For each video in queue/ I will add a notes file with the same name holding the title, description, tags, playlist name and the thumbnail file name. Take the oldest video in queue/, show me the exact title, description, tags, thumbnail and playlist you will use, then upload it to YouTube as private (not public) with those details, give me the link, move the files to published/ and add a line to log.md. After that, help me turn this into a Codex scheduled task that does the same every Thursday at 9 am, publishing as public.
The skill file is a short public instruction sheet. It tells Codex how to install itself, ask you for one authorization click, check which accounts your computer has connected and publish. Every AI you authorize shows on your account page, where you can revoke it.
Step 0: Get three things ready
1. The ChatGPT desktop app (Codex is inside it). Install it from OpenAI’s download page and sign in. OpenAI’s scheduled tasks page says that for work on local files the computer must be on and the app running, and that the Codex CLI and IDE extension have no Scheduled management screen. They’re fine for trying a prompt first.
2. The PublishPort desktop app, signed in to YouTube. It works through the YouTube login on your own computer, like you uploading by hand; the login stays on your machine, and every AI you authorize appears on your account page, where you can revoke it. Install it from the download page, open Platform accounts, click Sign in next to YouTube, and sign in with the Google account that owns your channel in the window that opens, then click I’ve signed in (walkthrough).
3. Node.js and a folder with one video. The publishing command runs on Node.js: ask Codex to run node -v, or install the LTS release from nodejs.org. Create a folder named channel, with a queue folder inside. Put one finished video in it, a thumbnail image beside it, and a notes file with the same name as the video. For ep-12.mp4, write ep-12.txt:
Title: How I cut my editing time in half
Tags: video editing, workflow, youtube tips
Playlist: Editing Workflow
Thumbnail: ep-12.png
---
In this video I walk through the three changes that cut my editing time...
Chapters
0:00 Intro
1:10 Change one
...
Everything after the --- line is the description. Name files so the oldest sorts first (2026-11-06-ep-12.mp4) and you control the order.
Step 1: Open the folder in Codex
In the ChatGPT desktop app switch to Codex and open channel as the workspace. It doesn’t have to be a Git repository.
Step 2: A supervised first upload
Paste the recipe. Then:
- Codex installs the PublishPort skill and gives you an authorization link and a confirmation code. Open the link, sign in or create a PublishPort account, check the code matches and click Authorize. It lasts 10 minutes.
- It checks your computer and tells you whether YouTube is signed in. If not, sign in again under Platform accounts and ask it to re-check.
- It shows the title, description, tags, thumbnail and playlist it read from your notes. Read them. This is your last look before upload.
- Say yes. The upload runs in YouTube Studio on your computer, so a large file takes a while, and a browser window may be doing things. Leave it alone.
- You get a link. Open it in Studio. Check the title, description, tags, thumbnail and playlist, and that visibility is private.
The first upload is private so a typo never goes public. If something is off, fix it in Studio and tell Codex what was wrong; when it looks right, publish that video by hand.
Step 3: Let the task reach the network (once)
Scheduled tasks run unattended in the default sandbox, which blocks network access, and every PublishPort command needs it (OpenAI docs). The fix is a rule that allows one command prefix. Send this in the same chat and approve what it asks:
Install the publishport CLI globally with npm, then add a rule to ~/.codex/rules/default.rules that allows commands starting with "publishport" to run outside the sandbox. Tell me when to restart the app.
Or by hand: run npm install -g publishport, add this to .codex/rules/default.rules in your home folder and restart the app:
prefix_rule(
pattern = ["publishport"],
decision = "allow",
justification = "PublishPort needs network access",
)
Only commands starting with publishport are allowed outside the sandbox.
Step 4: Create the Thursday task
Codex should offer to create it. Open Scheduled in the sidebar and check: a weekly task, Thursday 9:00, on the channel folder. If not, create a standalone scheduled task there, choose the folder, set the schedule and paste:
This is a pre-approved weekly upload. Don't ask me to confirm.
1. Read log.md. If it has a line dated today, stop: one upload per day.
2. List queue/. Take the oldest video. If there is none, write "queue empty" and stop.
3. Read its notes file (same name, .txt). It needs a title, a description after the "---" line, and a thumbnail that exists in the folder. If the title or description is missing, or the title is over 100 characters, skip this video, say why, and stop. Don't invent metadata.
4. Run `publishport guide youtube` to read the current options. Then upload the video with the absolute path, the title, the description, the tags, the thumbnail and the playlist, visibility public.
5. If the command fails or times out, do NOT run it again. Look at my channel's latest videos in YouTube Studio first and retry once only if the video is not there. Never upload the same video twice.
6. On success, move the video, thumbnail and notes file to published/ and append the date, file name and link to log.md.
7. End with a two-line summary: what went live, and how many videos remain in queue/.
OpenAI recommends testing a prompt by hand first and reviewing the first few runs, which is what step 2 did. For the first scheduled Thursday, be at the computer.
Your weekly rhythm
- Whenever a video is done: drop it, its thumbnail and its notes file in
queue/. - Thursday: it goes out. Skim the summary and click the link.
- Sunday, 3 minutes: count
queue/. Under two videos means time to edit.
Once videos are flowing, point the same machine at distribution: promote each new video on social media, answer the comments with the nightly digest, and see what worked with the Monday review.
If something doesn’t run
- Nothing was uploaded Thursday: the computer was asleep, or the ChatGPT app wasn’t running. Open Scheduled and look at the run.
- A network error: repeat step 3. Check the rule file, restart the app, and make sure the prompt uses
publishport, notnpx. - “No device is online”: the PublishPort app isn’t running. Start it.
- YouTube says you’re signed out: sessions expire. Sign in again under Platform accounts.
- The thumbnail or playlist is missing in Studio: the file name or playlist name in the notes doesn’t match exactly. Custom thumbnails can also require a verified channel, which you can check in Studio.
The free plan covers setting all of this up; plan limits are on the pricing page.
