I Built a Nodejs Semi-Automated Content Creator and Publisher for My Wordpress Website

Nov 2023

dev

When I started this project, I wanted to experiment with using Open AI's API to build something. I gained interest in niche sites somewhere on the Internet. Lots of people claim they monetize their long-form content websites by placing ads on the website, doing some affiliate linking, and also brand partnerships. I've always loved blogging so why not

I had a blog I had started manually populating a couple of months before Chat GPT came out and changed everyone's lives. It was easy to start from here because I didn't have to create another WordPress website from scratch. My general plan was to

Ask Chat to come up with the blog titles

This blog post is not about my blogging strategy as quick research into this will show you that my strategy is not even close to the best for niche site blogging and SEO in general. It's a whole can of worms. However, I needed a strategy and fast. I needed a way to come up with a huge number of blog post titles that were fairly unique. After a brief back and forth with Chat, I asked it to come up with "30 broad terms under dog preventive health care". Do you know what niche my blog is in now?

Image

Then I asked it to come up with 10 sub-themes for the dog preventive health care niche

Image

Write a very simple script

I started working on three different javascript files in a Node js project. One to generate the content, one to update the Google Sheets, and another to update WordPress. I called this a semi-automated project because some parts were very manual. I had to start and restart the script many times to get it to work exactly how I wanted. Plus, rate-limiting rules that I was not too bothered to accommodate ensured I spent time manually restarting the script. A lot of my projects are quick and dirty at first and then undergo refinement in order of how much something bugs me. A project like this was working fine enough to accommodate inconveniences like that. We're two months into auto-posting and my blog definitely feels automated. Here is a part of the code. This part helped me generate the blog titles

Image

I asked Chat to generate pseudocode for this that aims to explain how this code works to a non-technical person

Image

Save the content of each blog post in an Excel sheet

I knew I needed to dump the results of whatever this script was going to do somewhere. I considered a database like MongoDB, but I thought that was an overkill. I also thought about using something like Airtable, I even started building it for Notion, but ultimately settled with good ol Google Sheets. I've grown to love Google Workspace as a developer.

Publish it to WordPress and set the publish date to sometime in the future

This part was fairly straightforward too. I just randomly assigned dates between when I started this project and I believe end of January 2024 for all the generated blog posts to be published

Experiment Results

The experiment is still ongoing. I was really impressed with what Chat and I were able to achieve in about 4 days of working on this project. Here are some ongoing remarks

  • As of today, December 2023 WordPress has published 291 Posts

  • I am seeing some organic traffic even though not much

  • The quality of the posts I believe is fair-good at best

  • I am not making the thousands or millions people claim yet

  • I am hoping for time to do another iteration of this project to improve the quality of the posts, add some images and generate another batch of posts

» More posts

Let's Connect

You can offer to hire me, collaborate with me, check up on me

Copyright 2020 Ini Olorunnishola olo-ini