Automating Instagram captions using ChatGPT

If you’ve read my “How I grew an Instagram account to 100k+ followers (while ignoring it completely)”, you might have noticed I said the weakest part about the whole setup was my generic catch-all approach to generating captions for each post.

I was thinking about it again this weekend and realized that ChatGPT could improve this process considerably by automatically creating unique captions for each one of the posts.

To test it out, I fired up ChatGPT and fed it a few sample quotes with the prompt “Create a compelling thought-provoking question.” After a few minor adjustments, the results were looking good.

Now, I needed to do this at scale for all 800 posts in my library.

I went looking around and found a Google Sheets plugin that should allow me to get what I wanted. You dump in your API key, create a custom formula, and it’ll start generating those questions in the column beside the quote.

Unfortunately, I started to hit rate limits on the plugin and was stopped in my tracks.

I needed a way to get around these limits by creating something an app inside of Sheets that uses the chatGPT API directly. Unfortunately, I’m a horrible programmer, but low and behold, ChatGPT is here to save the day yet again.

It gave me this starting point but immediately spits an error when I try to run it in sheets. My favorite part about ChatGPT is that you can give it the error text, and it will automatically fix it (while giving you a reason why it wasn’t working), then supply you with the new code.

I had to do this about 6 or 7 times before everything ran smoothly, but once it started running, I could see my Sheet magically fill out with my new captions.

I added all those responses to my extensive airtable base that my social media post automation runs from. The engagement has been decreasing over the years, and I think the generic captions I used previously were a tiny culprit.

These new ones should drive it back up, but only time will tell.

If you’re interested in more content like this, subscribe to my RSS feed or email newsletter below.

I like getting emails, so feel free to contact me directly as well.