LinkedIn has cultivated a unique style of humble bragging posts. I find these posts very entertaining. I'll take you through my attempt at auto-generating these kinds of posts, while also keeping it on-topic by using the latest trending news.
There's a dedicated subreddit for this called LinkedInLunatics, that capture some highlights of the best comedic posts.
I'm a fan of self hosting. I already set up a local instance of n8n but had nothing useful running on it. I also had a local llama-swap + llama.cpp instance setup running already. I'm running this on a AMD Strix Halo, and it took me quite some time to get it working (I really hope driver support improves soon!). So admittantly, this was a solution looking for a problem.
High level plan
- News article collector - This is the starting point for the whole process
- Summarize articles -> save to DB
- Generate 2x post variants per story
- Create image prompt -> save to DB
- Generate 2x images per post -> save to disk
- Curate posts + choose best image -> update DB
- Post stories? - Not clear what I want to do with the articles at this point.
Technical setup
- n8n - docker
- llama.cpp (controlled by llama-swap) - docker
- llama-swap - acts as an OpenAI compatible endpoint transparent proxy for multiple llama.cpp models - Github Repo
- Chrome Browser (with CDP) - docker
- Python backend - FastAPI - using playwright for reliable web scraping and browser control using CDP.
- Postgres - for storing articles and images
- ComfyUI - for local image generation
For the summary and post generation, I use GPT-OSS-120B (llama.cpp), and for the image generation I'm using Qwen-Image. I tried many others, but Qwen-Image was consistently giving me the best results.
The Chrome Browser with CDP can be accessed using VNC. So I can easily login to socials inside the docker chrome, and potentially use this for automated posting in the future. But I dont think this is a great idea, as content needs a human-in-the-loop for curation.
Step by Step overview
There are 3 main workflows:
-
Story collector
n8n workflow that triggers webscraping, summarizes articles and saves them to database
We collect the news stories and summarize them in the database for further processing. I know n8n has many web scraping integrations, but I prefer to be in control of this detail, so I just make a web request to my Python backend, that handles the scraping / custom code.
-
Post generator
Fetches articles from DB, generates posts in different styles plus image prompts, and saves them to database
Collect the articles from the DB which dont have atleast 2 posts yet. Use the saved article summary to generate the linkedin post + an image post that will go with it. It also chooses a "style of linkedin artcile" that's different to the existing post styles. This prevents post with a similar feel for the same article.
-
Image generator
Creates ComfyUI images generation request
Send the image prompt to ComfyUI API to generate matching images. I save the post id in the image filename. This way I can match the posts and images later when deciding what to post. Here is the ComfyUI Workflow I use to generate the images: Download here
ComfyUI Workflow using Qwen-Image
Once I was happy with the ComfyUI workflow, I exported it from the File menu for API usage, which results in a JSON file. This JSON file then serves as a template being triggered from the n8n workflow. The "prompt", "seed" and "filename" values are programatically set before the JSON is sent to the ComfyUI API.
Storage
Initially I started out using n8n's builtin Google Sheets integration to store the article and post data. The sheet became unnavigable very quickly with the amount of data it accumulated. Then I switched to a local Postgres instance (also docker hostsed). With the following simple schema: Article -> Post

What's next?
To make post management easier, I created a little python CRUD app, alllowing me to cycle through the posts from the DB and display the matching images on disk. I can then export the good ones. The UI is terrible, but functional.

I post some of these posts to article page, sometimes they are really funny. The usefulness is debatable.
I'm not sure what to do with this next, maybe add a URL submission page that auto-generates a funny linkedin post on-demand. Or a linkedin bot that responds with "funny learnings" whenever someone posts a URL. If you have any ideas where this might be useful, please let me know.
Thoughts
This definitely gives me the feeling that social media as we know it is over. It's just too easy to generate content. I am excited to see high-effort content being created with AI though. It unlocks creative potential for many people. All the art/movie/book ideas that were never actioned because of limited time/skill, is now possible. The challenge would be to sift through the slop to find the gems.
Keywords
#n8n #comfyui #fastapi #docker #llamacpp #strixhalo