← Back to blog

Auto-Post to Threads Every Morning With Codex, No Meta App Review Needed

·auto post to threadsschedule Threads postsCodex scheduled tasksThreads API alternativeAI agent

Auto-Post to Threads Every Morning With Codex, No Meta App Review Needed

Threads is easy to post to once and hard to keep up. You have an idea in the shower, forget it by the time you’re at your desk, and a week later the account is quiet again.

This recipe turns that into a queue. You jot ideas in one file whenever they come. Each weekday morning a Codex scheduled task takes the next idea, writes it as a Threads post in your voice, publishes it from your own account, checks that the post exists and records the link.

When you’re done you’ll have:

It takes about 20 minutes, most of it signing in and one supervised run.

Who this fits: one person running their own Threads account (creators, founders, developers writing in public) who wants a steady daily presence without opening the app. It posts text with one optional image. It doesn’t read replies back or reply for you, and it works through your own signed-in session on your own computer, as a post you’d click by hand.

Why not just use Meta’s API?

Because for one account it’s the slow road. Meta’s Threads API is free to call, but publishing through it means registering a Meta developer app and getting the threads_content_publish permission approved in App Review, a process built for companies shipping a product. Once approved you also manage access tokens (short-lived ones last an hour, long-lived ones 60 days), and publishing is capped at 250 posts per profile per rolling 24 hours (Meta’s overview). Threads’ own in-app scheduler can queue a draft, but it doesn’t decide what to post.

The recipe below skips all of that. Nothing calls Meta’s developer API; the post is made in the Threads session you’re already signed in to. If you’re building a product for many users, use the official API. If you want your own account to post itself, read on.

The recipe

You’ll paste this to Codex in step 2:

Read https://www.publishport.app/skill.md and follow it to set up PublishPort for me, then check that my Threads account is connected. In this folder, create ideas.md (one idea per line) and posted.md. Take the first idea not yet in posted.md, write it as one short, conversational Threads post in my voice with nothing invented, show it to me, and once I approve, publish it to Threads, verify the link, and record it in posted.md. After that, help me turn this into a Codex scheduled task that does the same every weekday at 9:00.

The skill file is a short public instruction sheet: it tells the AI how to install itself, ask you for one authorization click, check which accounts are connected, publish, and confirm the post is live. Every AI you authorize is listed on your account page, where you can revoke it.

Step 0: Get three things ready

1. Codex in the ChatGPT desktop app. Scheduled tasks are created and managed from ChatGPT on the web or the desktop app, not from the Codex CLI or IDE extension (OpenAI docs). For a task that works with a folder on your computer, the computer has to be on and the app running at posting time.

2. The PublishPort desktop app, signed in to Threads. Install it from the download page, open Platform accounts, click Sign in next to Threads, sign in the way you normally would, then click I’ve signed in (walkthrough). The post will come from this session.

3. Node.js and a folder. The publishing command runs on Node.js: ask Codex to run node -v, or install the LTS release from nodejs.org. Make a folder called threads and put a few ideas in ideas.md, one per line. Rough is fine; they’re seeds, not finished posts:

Why I stopped batching content on Sundays
A mistake in my onboarding email and what it cost
The one spreadsheet I check every Monday

Step 1: Know what the Threads command can do

Checked against the PublishPort command set (publishport-opencli 1.0.40): the Threads command publishes text with one optional image (jpg, png, webp or gif) and returns the post’s URL. It does not schedule on Threads’ side, and it can’t read or answer replies. The timing comes from the Codex scheduled task. The command types your text into the Threads composer and checks that the text landed before it submits, and if you’re signed out it stops with a login error instead of guessing.

Since there’s no per-platform length check to lean on, the prompt asks for short posts, and the AI verifies the result by link.

Step 2: Supervised first run

Open the ChatGPT desktop app, switch to Codex, and open the threads folder as the workspace. It doesn’t need to be a Git repository; OpenAI notes that in projects without version control, scheduled tasks run directly in the project directory. Paste the recipe. What happens:

  1. Codex installs the PublishPort skill and runs the login. It 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. The link lasts 10 minutes; ask for a new one if it expires. Codex will also ask you to approve a few commands. Approve them while you’re watching.
  2. It checks your computer and tells you whether Threads shows as signed in. If not, sign in again under Platform accounts and ask it to re-check.
  3. It takes the first idea, writes the post, and shows it to you. Edit freely (“shorter”, “less salesy”), then say “post it”.
  4. It publishes, opens the post to verify it exists, and hands you the link. Click it.

Seeing your own post live is the proof the chain works. The notes you give here (“no hashtags”, “first person”) are what you’ll copy into the scheduled prompt.

Step 3: Let the scheduled task reach the network (once)

Skip this and the 9 am run fails at the publish step. Scheduled tasks run unattended with your default sandbox settings and don’t stop to ask for approval (OpenAI docs). The default sandbox blocks network access, and publishing needs the network.

OpenAI’s answer is rules: allow one command prefix outside the sandbox instead of opening everything. 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.

By hand: run npm install -g publishport, then add this to .codex/rules/default.rules in your home folder, and restart the app so it loads:

prefix_rule(
    pattern = ["publishport"],
    decision = "allow",
    justification = "PublishPort publishing needs network access",
)

Only commands starting with publishport run outside the sandbox; everything else stays restricted.

Step 4: Check the scheduled task

The recipe asked Codex to create the task. Open Scheduled in the sidebar and look for a weekday 9 am task on the threads folder. If it isn’t there, create a standalone task there (each run starts fresh from the saved prompt), choose the threads project, set a weekday 9:00 schedule, and paste:

This is a pre-approved publishing task. Publish without asking me to confirm, but only as the rules below allow.

1. If today is Saturday or Sunday, stop.
2. Take the first line of ideas.md that is not already in posted.md. If there is none, say "ideas list empty" and stop. If posted.md already has an entry dated today, stop: one post per day.
3. Write it as ONE Threads post: short, conversational, first person, in the voice of my earlier posts in posted.md. No invented numbers, quotes or claims. No hashtag stuffing.
4. Run `publishport guide threads` to read the current options, then publish with the publishport command (installed globally).
5. If the command fails or times out, do NOT run it again. Look at my latest Threads posts first, and retry once only if the post is not there. Never post the same thing twice.
6. Verify the post exists. Append the date, the idea line and the link to posted.md.
7. Give me a two-line summary.

Each scheduled run starts cold, and PublishPort’s skill normally has the AI show you content before the first post of a session. Nobody is watching at 9 am, so the approval has to be written into the prompt. OpenAI recommends testing the prompt by hand first and reviewing the first few runs, which is what step 2 was for. To test the task itself, add a second idea and use Run now if your version offers it; the “one post per day” rule will stop a second run on the same day.

Your weekly rhythm

If something doesn’t run

Pace it like a person

These are your real accounts, and Threads polices automation like any platform. One post a day is a human rhythm. Don’t point the same text at several Threads profiles, and treat the PublishPort authorization like any credential: if you stop using an AI, revoke it on your account page. Nothing here promises an account will never be flagged.

Taking it further

Once one post a day runs by itself, send the same idea to more places with the Bluesky, Mastodon and Threads recipe, or add a weekly analytics review to see which posts landed. For the Codex setup applied to video, see the Codex scheduled-tasks recipe.

The free plan covers setting this up; plan limits and pricing are on the pricing page.

FAQ

Does Threads have an API?

Yes. Meta opened the Threads API to third-party developers in June 2024. Publishing through it requires a Meta developer app and App Review approval for threads_content_publish, which suits a company building a product more than a single creator.

Is the Threads API free?

Yes, there’s no per-call fee. The cost is the App Review process and token upkeep, not money.

What’s the Threads posting limit per day?

Through the official API, 250 original posts, 1,000 replies and 100 deletions per profile in any rolling 24 hours. A daily scheduled post is nowhere near that.

Can you schedule posts on Threads?

The app has a basic scheduler for single drafts. For a recurring job that also writes the post, use a scheduled task as above.

Do I need a business account?

No. The recipe uses whichever Threads account you’re signed in to.