Making the video is the fun part. Posting it three times is not: a title for YouTube, hashtags for TikTok, a caption for Reels, three uploads, three progress bars. Do that five days a week and it’s the chore that quietly kills your posting streak.
This recipe hands the chore to Codex. You keep finished clips in a folder; every evening at 7 pm Codex picks the next one, writes a caption that suits each platform, posts it to YouTube, TikTok and Instagram Reels, and logs the links. When you’re done you’ll have:
- a
queuefolder with your clips in it, - a daily 7 pm task under Scheduled in the ChatGPT desktop app,
- a
posted.mdfile that grows by three links a day.
Setup takes about 15 minutes, most of it spent signing in to your accounts.
Who this fits: one creator (or a small team) with a computer that stays on in the evening, because the posts go out from your own machine and your own signed-in accounts. If you’re here for the Codex mechanics rather than the video workflow, the reusable part is step 3: letting a scheduled task reach the network through a single allowed command.
The recipe
Keep this sentence handy; you’ll paste it into Codex in step 2:
Read https://www.publishport.app/skill.md and follow it to set up PublishPort for me, then treat this folder as my video queue: post the oldest clip to YouTube, TikTok and Instagram Reels as a test, showing me each caption before it goes out; once that works, create a scheduled task that runs every day at 7 pm, takes the next clip that isn't in posted.md yet, writes a caption that fits each platform, publishes it, and appends every link to posted.md.
That one message gets Codex to install the publishing skill, ask you for a single authorization click, run a supervised test post, and create the daily task. The skill file is a short public instruction sheet you can read first: it tells Codex how to sign in, check which accounts are connected, publish, and confirm the post is live. The authorization page shows which device asked; every AI you’ve authorized is listed on your account page, where you can revoke it any time.
Step 0: Get three things ready
1. The ChatGPT desktop app (Codex lives inside it). Install it from OpenAI’s download page and sign in. Scheduled tasks are created and managed in the desktop app or on the web; per OpenAI’s docs, the Codex CLI and IDE extension don’t have the Scheduled interface.
2. The PublishPort desktop app, signed in to your platforms. Install it from the download page, open Platform accounts, click Sign in on YouTube, TikTok and Instagram, sign in the way you normally do in the browser window that opens, then click I’ve signed in. Once all three show Signed in you’re set (walkthrough). Codex will publish through those sessions, so posts look exactly like the ones you upload by hand.
3. Node.js and a folder of clips. The publishing command runs on Node.js. Not sure you have it? Ask Codex to run node -v; if nothing comes back, install the LTS release from nodejs.org. Then create a folder called queue and put two or three finished .mp4 files in it. Optional: add a .txt file with the same name as a clip and jot down what it’s about and who it’s for. Codex writes better captions with it, but works from the file name if it’s missing.
Step 1: Open the folder in Codex
Open the ChatGPT desktop app, switch to Codex, and open the queue folder as your workspace. It doesn’t need to be a Git repository: OpenAI’s docs note that in non-version-controlled projects, scheduled tasks run directly in the project directory, which is what we want here.
Step 2: Paste the recipe and approve once
Send the recipe. Here’s what happens next:
- Codex reads the instructions and installs the PublishPort skill, so future chats already know how to publish.
- It runs the login command and gives you an authorization link and a confirmation code. Open the link, sign in or create a PublishPort account, check that the code matches, and click Authorize.
- It checks your computer and accounts and reports that YouTube, TikTok and Instagram are ready.
- It picks the oldest clip and shows you the title and caption it wrote for each platform. Edit freely (“make the TikTok one punchier”), then reply “post it”.
- The clip goes out to all three; Codex shows you the links and writes them to
posted.md.
Codex will ask you to approve a few commands along the way. That’s its default safety behavior; approve them while you’re watching. The authorization link is valid for 10 minutes; ask for a new one if it expires.
Step 3: Let the scheduled task reach the network (once)
Skip this and the 7 pm run fails at the upload with a network error. Scheduled tasks run unattended with your default sandbox settings and don’t stop to ask for approval (OpenAI docs). The default workspace-write sandbox blocks network access, and every publish needs the network.
OpenAI’s answer is rules: allow one command prefix outside the sandbox instead of opening everything up. The easy way is to let Codex do it; 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.
To do it by hand instead:
-
Install the publishing command globally:
npm install -g publishport -
Open (or create)
.codex/rules/default.rulesin your home folder and add:prefix_rule( pattern = ["publishport"], decision = "allow", justification = "PublishPort publishing needs network access", ) -
Quit and reopen the ChatGPT desktop app so the rule loads.
Only commands that start with publishport run outside the sandbox; everything else stays restricted.
Step 4: Check the scheduled task
The recipe already asked Codex to create the task; OpenAI’s docs confirm you can create or update scheduled tasks just by describing them in a Codex chat. Open Scheduled in the sidebar and you should see a daily 7 pm task on the queue folder.
If it isn’t there, or you’d rather build it yourself, create a standalone task in Scheduled (each run starts fresh from the saved prompt), choose the queue project, set it to daily at 7 pm, and paste this prompt:
This is a pre-approved daily publishing task. Follow these rules and publish without asking me to confirm.
1. Find the oldest video (mp4 / mov) in this folder that isn't listed in posted.md. If there is none, stop and tell me the queue is empty.
2. Using the matching .txt file (if any) and the file name, write a title and caption for YouTube, TikTok and Instagram Reels, following each platform's requirements from publishport guide.
3. Publish with the publishport command (installed globally), to YouTube, then TikTok, then Instagram Reels.
4. If a platform errors or times out, don't re-run the command. Check that platform's latest posts first; retry once only if the post really isn't there. If it still fails, skip it and say why in the summary.
5. Append each link and the time to posted.md, then give me a one-line summary of what went out.
Each scheduled run starts cold from this saved prompt, and PublishPort’s instructions tell an AI to show a person the content before its first post in a session. Nobody is watching at 7 pm, so the approval has to be written into the prompt itself.
OpenAI recommends testing a prompt by hand before scheduling it and reviewing the first few runs. You did the manual test in step 2, so after 7 pm tonight just open Scheduled; runs with something to report show an unread indicator.
Queue a whole week ahead
TikTok’s publish command supports the platform’s own scheduling. On a Sunday evening you can tell Codex:
Schedule the next 7 clips for 7 pm Monday through Sunday on TikTok using TikTok's own scheduling. Keep posting to YouTube and Reels through the daily task.
Those TikTok posts then sit on TikTok’s side, so they go out even on an evening your computer is off.
Keeping it running on days you’re away
The posts are made by the PublishPort app on your computer, so that computer has to be on at 7 pm. Two setups that cope with that:
- Give it a spare machine. An old laptop or a mini PC that stays plugged in is plenty. The PublishPort app’s Launch at startup setting is on by default, so it reconnects by itself after a reboot.
- Put the AI somewhere else. Claude Code’s scheduled tasks run on Anthropic’s cloud, so the agent doesn’t need the ChatGPT app open on your machine. The same recipe works there, with the clips staying in the
queuefolder at home (give the task that folder’s full path on your computer): put your PublishPort credential in the task environment’sPUBLISHPORT_TOKENvariable and allow network access toapi.publishport.app. Combine it with TikTok’s own scheduling above for anything that must go out while the machine is off.
If something doesn’t run
- Nothing happened at 7 pm: local scheduled tasks need the computer on, the ChatGPT desktop app running, and the project folder where it was (OpenAI docs). A sleeping computer won’t run them. Keep the PublishPort app running too; its Launch at startup setting is on by default, so leave it on.
- The publish step reports a network error: revisit step 3. Check the rule file, make sure you restarted the app, and make sure the task prompt says
publishport, notnpx. - A platform says you’re signed out: sessions expire. Sign in to that platform again under Platform accounts in the PublishPort app; the next run picks it up.
- “The queue is empty”: add more clips. Anything already in
posted.mdwon’t be posted again.
Where to take it next
Once posting runs itself, comments are usually the next bottleneck; AI auto-replies to DMs and comments covers how to decide what the AI answers and what it hands back to you.
The free plan covers setting all of this up; plan limits and pricing are on the pricing page.
