I Built a Fully-Automated Newsletter with GPT and Zapier

Slidebean
8 min readJul 29, 2023

--

A couple of weeks ago, I set out to build The Nostalgia Newsletter, a (mostly) automated daily newsletter built entirely on GPT. In this article, I’m going to share everything under the hood about how I built it.

Before that, some context:

Some context: Debunking GPT Hustles

After GPT went live (and viral?) in early 2023, a plethora of influencers have come up with ‘tactics’ and ‘ideas’ to build companies on the back of GPT, the most famous of which is @jacksonfall’s Twitter thread.

To Jackson’s merit, his GPT instance actually made some money with this hack, but he seems to have gone silent since. His GPT website is also down.

TheHustle reached out to me a few months back to conceptualize a Youtube series together, and this was the most obvious answer to me: using my startup-building skills to debunk these hustles.

Designing the Layout

One of the first things I dove into was attempting to get chatGPT, our witty AI text generator, to design the email. I thought to myself, “Hey, if it can write so well, surely it should be able to piece together a simple email design, right?” Boy, was I wrong.

Unfortunately, as much as I’d love to brag about chatGPT’s design prowess, the hard truth quickly surfaced: it sucked, to put it mildly. Design is an intricate blend of aesthetics, layout, and user experience, and it quickly became apparent that our chatGPT, as smart as it is in text generation, wasn’t quite ready to moonlight as a seasoned email designer.

So, my quest for an email design began, and it led me to the Hubspot email builder. This was my silver bullet, my pretty shell if you will. It offered a neat structure that chatGPT could fill up with its eloquent text, much like a seasoned journalist filling up the pages of an empty newspaper template.

I started drafting the first edition of the newsletter, simultaneously using chatGPT to generate some placeholder text. It was a test, a sort of training wheels moment, to see how well chatGPT could adapt to this new structure.

But the true treasure I was after was not the placeholder text but the HTML code itself. This code was going to be the key, allowing us to replace image URLs and paragraphs with fresh content — essentially, each day’s news (I could have coded that from scratch, but go WYSIWYG!).

Part of the Nostalgia Newsletter email template, built in Hubspot + BeePro.

Getting Started and Sourcing Data

To kick things off, I have a Google Sheet that’s hooked up to trigger a Zap. If you’re unfamiliar with the term, a Zap is essentially a task you automate by using a web application called Zapier. It’s a bit like setting up dominos; you knock the first one (in this case, the Google Sheet), and the rest follow in a specific sequence.

I can almost hear the purists cringing. Yes, I know, it’s not the cleanest solution, far from it. It’s a bit like using duct tape to fix a leaky pipe — it’s certainly not going to win any design awards, but it does the job.

Initially, I thought it’d be smooth sailing from here, but as it turns out, GPT, much like an overenthusiastic but slightly inaccurate history student, had a habit of getting the facts wrong.

And so, the first domino to fall, so to speak, is a web crawl to a site known as BestofDate. This website is essentially a digital archive, capturing everything notable that happened on a particular day.

My prompts to GPT became more specific: basically instructing it to use the ‘Best of Date’ information as the source material for each part of the newsletter.

Best of Date doing the Lord’s work.

Now here’s the structure of the Zap. Let’s unpack.

GPT Prompts

Now, Zapier does have an OpenAI/ChatGPT integration, but as of the time of writing, it hasn’t been updated to GPT4. It’s like having a garage fit for a brand-new Tesla, but only the older model can fit in. Hence, I had to employ another tool — a platform called Humanloop — to act as a sort of bridge between Zapier and GPT.

Humanloop turned out to be a blessing. It provided a testing ground where I could experiment with and edit the prompts without having to reconfigure the Zap every single time. Imagine it as an artistic space where you could freely mold and reshape your work until you’re happy with the final piece.

Each component of the newsletter corresponds to a distinct prompt, each having its own role in creating the structure of the newsletter.

The creation process begins with the Intro Editorial, a preliminary segment designed to provide a brief overview and set the tone for the rest of the newsletter.

After the introductory piece, we delve into the Main Story and then the Second Story. For each story, I devised specific prompts that produce the titles, which are then integrated into a particular section of the HTML code.

However, during the initial stages of this process, I encountered a recurring issue. The system often selected the same piece of news for both the Main and Second Story, leading to repetitive content in the newsletter. Essentially, it was rehashing the same information, which is not an ideal experience for the readers.

To overcome this issue, I decided to supply the system with previous newsletters, including the one from the day before. This way, GPT had a reference of what had already been covered and was able to avoid repeating the same news. By implementing this method, I could ensure that each newsletter contained fresh and diverse content.

In essence, each section of the newsletter was designed to function independently, contributing to the larger structure and ensuring a unique and engaging delivery every day.

Images (the ‘manual’ part of the process)

For every story, there’s an additional step involved: generating a prompt to create an accompanying image. Ideally, Dall-E would have been the perfect tool for this task, but unfortunately, the images it produced didn’t quite hit the mark.

Once the entire process is complete, which Zapier takes around five minutes to do, I am left with a spreadsheet — not the most visually appealing sight, I’ll admit — that contains the text for each newsletter section.

The image generation is carried out on Midjourney by pasting the prompts generated earlier. This is the one aspect of the job that remains manual, as I couldn’t find an API solution to automate it. But, hey, if any of you out there have suggestions, feel free to drop them in the comments!

Given the crucial role images play in the newsletter, I didn’t mind dedicating some time to ensure they were aesthetically pleasing. After all, a visually appealing newsletter makes for a more engaging read.

Bringing it all together

After all the heavy lifting with spreadsheets, image generation, and GPT prompt tweaking is done, I then proceed to the final stage of the process: reintroducing the transformed HTML code back into its habitat in Hubspot. Here’s where I take advantage of Hubspot’s Workflow feature. This tool is integral to scheduling the newsletters, setting them to arrive in the inboxes of our eager subscribers each day at the precise time of 5 am.

Since we are currently in the year 2023, the beauty of the newsletter concept is that we already know what events have transpired. It’s like having a time machine, really. We can journey back to the year 1993 and pick out the most significant news of each day, allowing us to prepare and line up the newsletters well in advance. This pre-emptive organization creates a seamless pipeline for the newsletter creation process, ensuring we maintain a regular posting schedule.

Despite the high level of automation, there’s still some manual labor involved, primarily related to generating images and scheduling the newsletters. I estimate that it takes me roughly an hour to get through these tasks and to schedule an entire week’s worth of newsletters. However, it’s an hour well-invested, considering the output and the value it brings to the readers.

With every passing hour, as more subscribers sign up for the Nostalgia Newsletter, they are promptly added to the queue, ensuring they receive the next morning’s email right on time. One of the significant advantages of this automated system is that it operates independently of my personal schedule. That means even while I’m tucked into bed, sound asleep at 5 am, the newsletters make their way to our subscribers without fail.

This process, while it might seem elaborate, is the secret recipe behind the Nostalgia Newsletter. It is a dance of automation and manual intervention, all geared towards delivering a daily dose of nostalgia to our subscribers’ inboxes right on schedule.

Last Thoughts

I think the workflow works; I think the Newsletter accomplishes a nice curiosity with very little manual work. We are yet to see if this ‘Hustle’ works: our challenge is being able to monetize it within 30 days after we launch.

If you want to see how it looks, just head out to The Nostalgia Newsletter to subscriber for free.

Also, here’s the video version of what you just read:

--

--

Slidebean
Slidebean

Written by Slidebean

We help companies tell stories

Responses (1)