Published at
Updated at
Reading time
2min

There are many ways to set up a Twitter bot. My projects Tiny Helpers and Random MDN automatically share things with the world. They use different technologies.

First, the Tiny Helpers site exposes an RSS feed that includes the latest additions to the site. ITTT ("If that then that") consumes this feed, and a connected Twitter account shares new items. People can follow the latest tool additions via RSS and Twitter this way.

Random MDN is a Twitter bot that shares randomly picked MDN documentation pages several times a day. It's only for a while now, and it keeps surprising me how much functionality the web provides these days.

When I set the bot up, I decided to use the Serverless Framework because it allows configuring AWS Lambda functions that run on a schedule. The framework's purpose is to orchestrate complex applications based on serverless technologies. Random MDN uses exactly one scheduled function, and the framework is way too much for this tiny bit of functionality.

GitHub actions can be scheduled, too!

I wrote about how to use GitHub actions to schedule Netlify deploys previously. And it works beautifully!

Since I learned about this GitHub feature, it's on my TODO list to drop Random MDN's Serverless Framework/AWS dependency and handle the Tweets in GitHub only.

James Hibbard – How to Send Tweets With a JavaScript GitHub Action

James Hibbard's post How to send Tweets with a JavaScript GitHub action will help me tackle this refactoring.

If you want to start writing Twitter bots, have a read. It's a good starter!

Was this post helpful?
Yes? Cool! You might want to check out Web Weekly for more WebDev shenanigans. The last edition went out 13 days ago.
Stefan standing in the park in front of a green background

About Stefan Judis

Frontend nerd with over ten years of experience, freelance dev, "Today I Learned" blogger, conference speaker, and Open Source maintainer.

Related Topics

Related Articles