How a single email request morphed into a robust email template generator
This project originated from a request for a single HubSpot email template—the monthly newsletter—as part of WP Engine's initiative to bring more value to customers and partners while also applying updated brand styles. I worked with our creative director and stakeholders from Demand Gen to Customer Experience and designed a fresh newsletter that was on brand and could accomplish the goal.
Great, but this case study is about the journey afterwards.
I used HubSpot's visual editor for my first attempt at building the template, hoping that non-technical folks in the Marketing department could manipulate it as needed in the future.
But the HubSpot editor proved hopeless for 2 reasons:
The newsletters went out on time, but click-through rates tanked. I knew that I would have to rethink the project's execution. But this newsletter goes out every month, and I can't be the bottleneck.
Email requests for other departments also came in during this time. Hand-coding emails in 2017 is torturous, so I decided that my next attempt could be more elegant and reusable; I dug deeper into the needs of all these requests and discovered they all were an effort to support the company’s north star goal of increasing brand awareness through visual consistency.
The shared goal of all these requests surfaced a larger, company-wide problem, and I could solve a greater need—consistent and manageable email templates, company-wide, from a single codebase. But I can't be the bottleneck…
I considered immediate and long-term needs:
I used a project from my past as an established starting point for this endeavor. I knew that project well, and I knew it could be expanded to meet our requirements. So, I felt it would let me deliver the time-sensitive newsletter template quickly and also be a suitable foundation to satisfy our future needs.
My project combines Middleman, a static website framework, with Premailer, a package that modifies HTML files to be email-friendly. The result is a modern web stack that developers can learn quickly and a build process that generates self-contained, email-friendly HTML files to be placed into any email platform.
I developed a series of helper methods for HubSpot integration. They spit out placeholder HTML when viewing locally, but that is replaced with HubSpot HUBL snippets when building for production. HubSpot recognizes these snippets and replaces them with meaningful content, such as the current month or an editable rich text area.
I documented the crap out of this project, specifically the monthly newsletters, with step-by-step instructions and screenshots.
The newsletter process worked great for a few months, so I devoted time with each newsletter to improve the project.
The newsletter workflow is quite efficient, but it still must go through a developer each month. And meticulously iterating over content changes is…tedious. The next step for me is to explore something like Alpaca Forms, which generates a web form based on a JSON schema. This could allow the content team to tweak the copy themselves and simply give my team a JSON blob to run through the generator.
The obvious step after that is to add the build process directly into that web form, so they can edit, build, and paste the email templates directly into HubSpot 100% on their own. One day…