top of page

The Historian Bot

Platform

Twitter

Started

February 2021

Built with

NodeJS, Twitter API, Google Cloud Platform

Check it out

  • Twitter
  • GitHub

This is a bot that I created using the Twitter API that gives an interesting historical fact for each day of the year. This weekend project let me work on my Javascript and also gave me more experience with the Google Cloud Platform (GCP).

Screen Shot 2021-05-08 at 6.22.28 PM.png

There are 3 main actions the bot does to complete:

  1. The bot will first parse the Wikipedia page for the given day. For instance if it is September 21st, the bot will grab the Wikipedia page for September 21st. Important events that have happened on this day are listed on this page. The bot will then parse the page to raw text.

  2. The bot then takes the text., randomly picks an event, and formats it for the tweet. The bot will also add an image if one is available.

  3. Once it formats the tweet, the bot will then tweet it using the Twitter API.

I am hosting this bot with GCP and have it run every day. This bot was a really fun project to work on and helped me get deeper into the Google Cloud Platform.

For the time being, I have stopped the bot due to charges from GCP. I can still run the bot manually until I find a more feasible way to run it since it doesn't generate any revenue.

bottom of page