← Portfolio · Projects · LinkedIn Autopost
Case study · Personal project

LinkedIn Autopost: automated daily publishing, with no database

An AI routine writes, the code validates, git is the queue, a workflow publishes every morning.
See the posts on LinkedIn →

Context

I wanted to publish a short technical post in English every working day, on a concept from AI engineering, data or systems. Doing it by hand takes discipline; handing it entirely to a model gives repetitive or approximate posts.

So the project splits the roles: an AI routine writes the week's posts, the program checks that they follow the rules, a review lets them into the queue, and a workflow publishes them one by one.

Overall architecture

There is no server and no database. The git repository is the queue: one folder for upcoming posts, another for published posts, one file per post with its metadata. Every step leaves a trace in the history, and a Pull Request acts as the review screen.

On Sunday, an AI routine writes the week's batch. On weekdays, another routine triggers the publishing workflow at a fixed time; a backup scheduler runs later in case it did not.

Every Sunday: writing AI routine writes the week's posts Validation in code writing rules Pull Request review, merge Queue git repo folder, one file per post rejected: rewrite Every weekday morning: publishing AI routine at a fixed time Backup scheduler Publishing workflow one at a time triggers if missed LinkedIn API Published post moved + commit reads the oldest Profile post is live

Wide diagram: scroll it to the right.

Life of a post

The model never publishes directly. It writes a structured draft, then a script validates it: the mechanical rules are checked by the program, not left to the model. A rejected post is rewritten until it passes. For variety, the routine reads the list of concepts already published before writing.

Draft written by the routine Validation rules checked by the program Queued reviewed and merged Published once a day, the oldest first Archived with its publishing date Rejected by the program Required by the instructions × missing field, malformed identifier × identifier already used × source outside the reference list × text too long, emoji, hashtag, dash · a short hook, then a few lines · never a concept already published · no made-up numbers · in English, no empty phrases

Wide diagram: scroll it to the right.

Daily publishing

The workflow takes the oldest post in the queue, escapes the reserved characters of LinkedIn's text format, sends it to the API, then moves it to the published folder with its date and identifier. The move is committed by the workflow itself.

Trigger routine or backup Already posted today? Paris time Nothing to do no duplicate yes Oldest in the queue no Escaping reserved characters of the LinkedIn format API call pinned API version Archiving moved + committed by the workflow success Failure expired token reported clearly; the post stays in the queue

Wide diagram: scroll it to the right.

Technical choices