This is a post from Robin Sloan’s lab blog & notebook. You can visit the blog’s homepage, or learn more about me.

The bare bones

February 7, 2025

I’ve done it! I’ve cracked the hardest problem in com­puter science:

Writing an actu­ally simple Shopify email template.

The total con­sis­tency of the email noti­fi­ca­tions from any/every Shopify store, even the ones with wild custom web storefronts, is in most ways a virtue: a sub­lim­inal con­fi­dence boost for customers. Okay, I guess this is a real thing.

But of course I can’t leave well enough alone. I mean, I think I’m right, though: every single channel, even (and maybe especially) a channel as func­tional as this, is an oppor­tu­nity for communication, for delight, for the pro­duc­tion of vibes. Why would I cede that to Shopify?

Easier said than done: the default tem­plates are dense hairballs, thanks to the require­ment that they accom­mo­date every single one of the platform’s possibilities, all its edge and corner cases. Reading the code, one murmurs: I didn’t know Shopify did that … or that … or THAT … 

Because I under­stand my own spe­cific com­mer­cial context, I can skip 90% of those if-thens, so: I did.

In the Shopify-verse, it’s sur­pris­ingly dif­fi­cult to find truly bare-bones exam­ples for anything, email tem­plates and shop themes alike. I think the code I ended up with might pro­vide a fair start for anyone looking to develop bespoke emails by adding, rather than subtracting. (In the Shopify-verse, somehow you are always gut­ting a house … )

That code should prob­ably stretch to acco­mo­date a few more fea­tures and situations, and I’ll add those over time. Feel free to email me if some­thing leaps out at you.

P.S. It’s 2025, and you don’t actu­ally have to build your entire HTML email out of <table>s anymore.

To the blog home page