Four values before you deploy
Cloudflare's set-up page asks for four values it can't create for you. Get them here, keep a copy, then continue.
LINKEDIN_ACCESS_TOKEN
Lets the Worker post as you. It comes from your own LinkedIn app, so no one else's app ever holds it.
- Create an app on LinkedIn's developer site. LinkedIn asks for a Page; any Page you belong to works, or an empty one.
- In its Products tab, add Share on LinkedIn and Sign In with LinkedIn using OpenID Connect.
- Open the Token Generator, pick your app, tick openid, profile and w_member_social, sign in, and copy the token.
This token can post as you. Never put it in a file, a commit, an issue or a chat.
LINKEDIN_TOKEN_EXPIRES
The day the token stops working: the day you made it plus 60 days, as YYYY-MM-DD. /status warns you 7 days before.
If you make the token today
Made it another day? Count 60 days from that day.
ADMIN_TOKEN
Opens your Worker's /status page, with the queue, the history and the token's expiry. Any long random string.
In a terminal
Or here, in your browser
Made with your browser's crypto API. It is never sent anywhere.
Save a copy in your password manager: you need it to open /status.
DRY_RUN
1 runs everything without reaching LinkedIn, for a first test. 0 posts for real.
It is written into your copy's wrangler.jsonc. To change it later, edit it there and push.
On Cloudflare's page
- Connect GitHub, then tick Create private Git repository: your copy holds your drafts.
- Name the project, the D1 database and the KV namespace with names nothing on your account already uses.
- Paste the four values into the fields with the same names, then deploy.
Cloudflare opens in a new tab, so this page stays here to copy from.
After the deploy
- Your Worker's URL is near the end of the build log: dashboard, your Worker, Deployments.
- Set your timezone in scheduler.json, for example "Europe/Paris". It's UTC by default.
- Write a post and push. Every push to main deploys and syncs your posts.
Check that it runs