LinkedIn on Autopilot

LinkedIn on Autopilot

Automating LinkedIn posts using Google News, OpenAI and GitHub Actions.


LinkedIn feeds 🗑️

Scrolling through and interacting with LinkedIn

feels to me like using TikTok for business. It's a never-ending stream of content, most of which is absolutely irrelevant to me. It constantly promotes generic reposts of motivational quotes, self-help articles, and even memes, so deep-fried they could be served at a county fair.

Most of that garbage is posted by people who are trying to grow their network. Unfortunately, that's just how the platform works. The more connections you have, the more people see your posts, and the more likely you are to get hired or sell your services.

A generic garbage post with a stolen unrelated video 🗑️A generic garbage post with a stolen unrelated video 🗑️

To get more connections, you have to post and react frequently. Completely disregarding the brain rot that comes with it, I don't have the time or energy to do that.

Post automation 🤖

So why not automate it? I decided against posting literal garbage or controversial opinions, even though that would probably get me more engagement. Instead, I wanted to post something that would be relevant to my network and potentially spark a conversation.

I wrote a Python script that uses the gnews Python module

to look for trending articles in the tech industry on Google News.

The articles are then scraped using newspaper3k

to extract content, metadata and images.

It then leverages OpenAI's API

to choose the article I would most likely find interesting, based on a curated pre-prompt.

The chosen article is summed up in a casual tone, enriched with some emojis 🦄 and finally posted to LinkedIn

using linkedin-api-python-client

The whole thing can then be deployed using GitHub Actions

and run on a schedule.

Some concerns 🤔

I'm aware that this is a bit of a gray area. LinkedIn certainly doesn't like people using automation tools. Then again, compared to the spammy behavior of many real users out there, the straight up stolen content and the fake profiles, I think my approach is pretty harmless.

I'm not trying to game the system or get more connections than I could ever handle. I just want to keep my profile active and potentially grow my network without having to spend hours on the platform.

The future 🚀

I'm planning to add some more features to the script, like automatically liking posts from my network and possibly even commenting on them. Of course, the more control I give to ChatGPT, the more likely it is to go off the rails. But I have my popcorn ready for that 🍿.

I'm also considering adding a feature that would allow me to post to other platforms, like Twitter or Reddit. This would require some more work, as the APIs are different and the content would have to be tailored to the respective audience.

Similarly, I'm thinking about adding more content sources, like Reddit or Hacker News. This would require some more scraping and filtering, but could potentially lead to more interesting posts.

Another exciting option would be to parse subtitles from YouTube videos matching certain keywords.

I've integrated Google Trends

before, but so far Google News
provided the best results.