Loading...

Postulate is the best way to take and share notes for classes, research, and other learning.

More info

Handling Waitlist & Onboarding Emails with Sendinblue

Profile picture of Samson ZhangSamson Zhang
Mar 22, 2021Last updated Mar 23, 20214 min read

Email automation tools are extremely useful, even when you only have a dozen or so users. Emails are a reliable way to send and request information about your app and users, or simply provide updates as a reminder that you're around.

My go-to email marketing used to be MailerLite. It covers all the basics: a nice drag-and-drop editor, an API to add contacts, automatic sending of emails to newly added contacts. Best of all, it's completely free up to 1000 subscribers and 12,000 emails a day. It's what I use to send welcome emails and product updates for Updately, and for my personal newsletter.

Whether because it's written in PHP, or because of small UI things, though, MailerLite just feels clunky and slow. When looking for an email marketing tool for Postulate, I set off in search of something better.

Eventually, I found Sendinblue. It has a much more limited free plan, but good enough for me to get started with (2000 contacts and 300 emails a day). It has very similar features to MailerLite: drag-and-drop editor, nice API, automation workflows. Its frontend is much snappier and nice to work in, even though I ran into some bugs and loading hangs as I was setting things up.

Here's how I've set up Sendinblue for Postulate waitlist and onboarding emails.

Welcome email automation

First up: a simple automation, sending a welcome email to every new contact added to a list.

The "Create a new workflow" screen offers a few different wizards to help you quickly create workflows.





Soon, we're able to set up our email template.



There are three options for editors: drag and drop, rich text, and HTML.



I chose drag and drop, and was brought into an interface very similar to MailerLite's.



It was easy to create a basic, nice-looking welcome email:



And just like that, our workflow has been set up!



API integration with account creation

It's easy to hook this workflow up with account creation in Postulate through Sendinblue's API. It was easy to test with an API testing client (like Postman):



In the new account endpoint on Postulate, I add a section checking if a Sendinblue contact exists with the same email, then either updating it (moving it from the waitlist email list to user list) or creating a new one.

try { await axios.get(`https://api.sendinblue.com/v3/contacts/${encodeURIComponent(session.user.email)}`, { headers: { "api-key": process.env.SENDINBLUE_API_KEY }, }); await axios.put(`https://api.sendinblue.com/v3/contacts/${encodeURIComponent(session.user.email)}`, { listIds: [2], // add to users list unlinkListIds: [5], // remove from waitlist }, { headers: { "api-key": process.env.SENDINBLUE_API_KEY }, }); } catch (e) { if (e.message === "Request failed with status code 404") { const nameSplit = session.user.name.split(" "); const firstName = nameSplit.slice(0, nameSplit.length - 1).join(" "); const lastName = nameSplit.slice(nameSplit.length - 1, nameSplit.length); await axios.post("https://api.sendinblue.com/v3/contacts", { email: session.user.email, attributes: { FIRSTNAME: firstName, LASTNAME: lastName, }, listIds: [2], // add to users list }, { headers: { "api-key": process.env.SENDINBLUE_API_KEY }, }); } else { throw e; } }

Now, when a user signs up for Postulate, they'll automatically get a welcome email.

Sending questionnaire to people on waitlist

Lastly, a custom campaign instead of an automation: I had about 100 people on Postulate's Waitlist API waitlist, and needed to send them all an email with a beta testing questionnaire.

I was able to export a CSV from Waitlist API, and from there easily import these contacts into a Sendinblue list:



Creating the new email design was easy, too; I was able to use an old email design as a starting point, then simply modify it with new content.



When I was ready to accept people as beta testers, I did so through the rich text editor instead of the drag and drop editor, providing a much more personal-feeling email. I used the template tag {{ contact.FIRSTNAME }} to address recipients by name:




Comments (loading...)

Sign in to comment

Postulate

Founder and dev notes from building Postulate