A Facebook Page that posts once a week and never misses beats one that posts five times in a burst and goes quiet for a month. The weekly post is not hard to write. What fails is the open-Facebook, click-the-composer, attach-the-photo, paste-the-caption routine, repeated every Tuesday for a year.
This recipe moves that routine to Claude Code. You put a photo and a caption in a queue folder whenever you have one. Every Tuesday morning a scheduled task takes the oldest pair, posts it to your Page, and logs what it did.
By the end you’ll have:
- a
pagefolder withqueue/(photo + caption pairs),published/andlog.md, - one supervised first post you watched go out,
- a Tuesday scheduled task in Claude Code Desktop that posts the next one.
What you need: the Claude desktop app with the Code tab, the PublishPort desktop app, Node.js, and a Facebook Page you manage. About 20 minutes.
Who this fits: a small business, a creator or a community with one Page, a steady supply of photos, and a computer that is on and awake at posting time. It won’t suit you if you need video on Facebook (see the limits below) or a post at an exact minute on a laptop that’s usually asleep.
What it can and can’t do
Checked against the PublishPort command set (publishport-opencli 1.0.40), the Facebook post command:
| Job | Supported | Worth knowing |
|---|---|---|
| Text post to your own feed or a Page | Yes | Multi-line text is fine |
| Attach images | Yes | Local files: jpg, png, gif or webp, several at once |
| Pick the Page | Yes | By Page URL or bare Page name |
| Video | No | This command takes text and images only |
| Facebook-side scheduling | No | The post goes out when the task runs, so the Claude task’s schedule is your publish time |
| A link to the new post | No | It reports success or an error, not a URL. You check the Page yourself |
| Dry run | No | The first post is real. That’s why step 2 is supervised |
The command drives the Facebook composer in the browser on your own computer, as if you were doing it by hand. If Facebook shows a prompt it doesn’t expect, the command stops with an error instead of guessing, which is the behaviour you want.
The recipe
You’ll paste this to Claude Code in step 2. Replace YOURPAGE with the end of your Page’s address:
Read https://www.publishport.app/skill.md and follow it to set up PublishPort for me, then check that Facebook is connected. In this folder, create queue/, published/ and log.md. For each post I will put a text file (caption) and an image with the same name in queue/. Take the oldest caption in queue/, show me the exact caption, image and the Page it will go to (https://www.facebook.com/YOURPAGE), and after I say yes, post it to that Facebook Page, tell me whether it succeeded, move the files to published/ and add a line to log.md. After that, help me create a Claude Code Desktop scheduled task that does the same every Tuesday at 10 am.
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 your computer has connected, publish, and avoid posting twice. Every AI you authorize is listed on your account page, where you can revoke it.
Step 0: Get four things ready
1. A Page you can post to. You need Facebook access to the Page. Meta explains how to switch into your Page (profile photo, See all profiles, then the Page). If you’d like to rehearse first, make a throwaway Page and use it for step 2.
2. The PublishPort desktop app, signed in to Facebook. Install it from the download page, open Platform accounts, click Sign in next to Facebook, sign in the way you normally do in the window that opens, then click I’ve signed in (walkthrough). Posts come from your own session on your own computer. Every AI you authorize shows on your account page.
3. The Claude desktop app with the Code tab. Local scheduled tasks need Claude Desktop 1.1.5368 or later (Anthropic’s docs). Local tasks only fire while the app is open and the computer is awake.
4. Node.js, and a folder with one pair in it. The publishing command runs on Node.js: check with node -v, or install the LTS release from nodejs.org. Create a folder named page with a queue folder inside. Add one image and one caption with the same file name:
2026-11-04-autumn-menu.jpg
2026-11-04-autumn-menu.txt
The .txt file is the caption exactly as it should appear. Start the names with a date so the oldest sorts first and you control the order.
Step 1: Open the folder in Claude Code
Open the Claude desktop app, go to the Code tab, and start a session with your page folder as the working folder.
Step 2: A supervised first post
Paste the recipe. Then:
- Claude 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 that the code matches and click Authorize. The link lasts 10 minutes; ask for a new one if it expires.
- It checks your computer and tells you whether Facebook shows as signed in. If not, sign in again under Platform accounts and ask it to re-check.
- It shows you the caption, the image and the Page address. Read them. This is your last look before the post is real.
- Say yes. A browser window on your computer opens the Page and fills in the composer. Leave it alone for a minute.
- Claude reports success. Open your Page and look. Check three things: the post is there, the image is attached, and the post is from the Page, not from your personal profile.
If it landed on your personal feed instead of the Page, delete that post, switch into the Page in the same Facebook session (the Meta link above) and run it again. This is why the first one is supervised: the command works from the signed-in session it finds, so it’s worth confirming once that it posts where you expect.
Step 3: Create the Tuesday task
Claude should offer to create it from the recipe. To check or build it by hand, in the Code tab click Scheduled in the sidebar, then New task. If a menu opens, choose Set up manually. In Advanced settings, turn on Only on this computer, pick the page folder, and set the trigger to Weekly, Tuesday at 10:00 (steps in Anthropic’s docs). If your version shows Routines instead of Scheduled, the same page explains the earlier names. Paste this as the instructions:
This is a pre-approved weekly Facebook Page post. Don't ask me to confirm.
1. Read log.md. If it has a line dated today, stop: one post per day.
2. Check the time. If it is after 2 pm, skip and say the run was late (my computer may have been asleep). I'd rather miss a week than post at a bad hour.
3. List queue/. Take the oldest .txt caption. If there is none, write "queue empty" in log.md and stop.
4. It needs an image with the same name (.jpg, .jpeg, .png, .gif or .webp). If the image is missing, skip this post, say why, and stop. Don't pick another image and don't post text only.
5. Run `publishport guide facebook` to read the current options. Post the caption and image to my Page https://www.facebook.com/YOURPAGE through PublishPort, using the absolute path of the image.
6. If the command fails or times out, do NOT run it again. The command can't tell me whether it posted, so say that the result is unconfirmed, log it, and stop. I will check the Page.
7. On success, move the caption and image to published/ and append the date and file name to log.md.
8. Finish with a one-line summary, and how many posts remain in queue/.
Two of those lines are deliberate. Line 6 stops a blind retry from double-posting, since the command returns no link to check. Line 2 handles missed runs: per Anthropic’s docs, if the app was closed or the computer asleep, Desktop starts one catch-up run for the most recently missed time when it wakes, so a 10 am task can run at 11 pm.
Then click Run now once, watch the permission prompts, and choose “always allow” for the PublishPort commands. Without that, a task in Manual permission mode waits for an approval nobody is there to give. The saved approvals can be reviewed or revoked in the task’s Always allowed panel. Run now really posts, so keep a second pair in queue/ for it, or skip this and let the first Tuesday be the test.
Your weekly rhythm
- Whenever you take a photo you like: save it into
queue/with a caption file. - Tuesday: it goes out. Open the Page for ten seconds.
- Sunday, 2 minutes: count
queue/. Fewer than two pairs means it’s time to take photos. Ask Claude “write three caption drafts for these photos” if you want help, and edit them before they go in the queue. The task never writes captions on its own, so what posts is always what you approved.
When it doesn’t run
- Nothing posted and no run in History: the Claude app was closed or the computer asleep. In Settings > This computer > System, turn on Keep computer awake if you want to avoid that.
- The run is waiting on a prompt: open it from the task’s History list and approve it, then choose always allow.
- “No device is online”: the PublishPort app isn’t running or is signed out. Start it.
- Facebook sends you to a login or checkpoint page: the session expired or Facebook wants a check. Sign in again under Platform accounts and, if it asks for a security check, do it yourself.
- “Post composer not found”: you may not have permission to post to that Page from this account, or Facebook changed the page layout. Check that you can post by hand, and if you can, ask Claude to run
publishport guide facebookand try once more. - It posted twice: this recipe never retries, so look for the log line and the Page, then delete the extra post by hand.
Pacing
One post a week is a human rhythm, and that’s the point. Don’t raise the frequency to chase reach, and don’t post the same text from several accounts. If Facebook pushes back, the instructions tell the AI to report and stop.
Taking it further
The same folder-and-task pattern works for YouTube uploads, a weekly LinkedIn cadence and short videos on a schedule. To announce the same news on several networks, see how to post once to Bluesky, Mastodon and Threads. To have the AI notice what worked, set up the Monday analytics review.
The free plan covers setting all of this up; plan limits are on the pricing page.
