HACKER Q&A
📣 bredren

How are you performing email flows on your early stage product?


I use mailgun to send transactional emails like email confirmation, password reset, etc.

I need to send a welcome email and welcome series set of emails to start. I can hand code this, I suppose.

But I want to also plan to handle more advanced drip stuff like as described in this submission: https://news.ycombinator.com/item?id=23070375

Should I be looking more seriously at using a mixpanel partner integration? Are there any self-hosted open-source projects that integrate with mixpanel data pipelines for doing this kind of thing?

I signed up and implemented Mixpanel, expecting to use their messaging feature to trigger sending welcome, drip and other prompting email flows.

However, that product has been deprecated and they want you to use one of their integration partners now.


  👤 ThePhysicist Accepted Answer ✓
Do you need an external provider for this? We have been sending our transactional mails directy via our own backend, and so far we haven't had any issues with that. If you don't send tens of thousands of identical mails per day you should be fine.

You can use a worker and scheduling framework like Celery and Celerybeat to e.g. periodically go through your users and generate mails. The advantage is that it's much easier to integrate this with your backend and tie the mails to actual user actions. Just make sure to record which mails you have sent already to a given user to avoid sending the same stuff more than once.

But maybe don't take my advice on this, we're a really privacy-focused startup so we try to keep most of our customers' data in-house for security and privacy reasons, I know that there are a lot of people that will recommend to rely on external services for this (and they might be right in many circumstances).


👤 catchmeifyoucan
I've recently just tried SendGrid, and it was super easy to setup. Their "dynamic templates" feature is great. I also took my templates from here: https://codedmails.com/

I then have an AWS lambda function (which also holds our API). After a user "activates" or "logs in", I just schedule a send. Seems to be working fine as of now.

I do hope to have a lambda function running every 24hrs or so in the future, where it just scans the DB to look at user events (alternatively, it can also scan Cloudwatch logs) - and then do some logic to send X email after Y event.


👤 4lejandrito
I send emails directly from my NextJS backend using nodemailer. I render them in React using https://mjml.io and https://github.com/wix-incubator/mjml-react.

It is true that my product is not ready yet but works like a charm for now.


👤 bamazizi
There are some good free open source systems, just bring your own email provider like AWS SES and save $$$:

- Mautic.org (Recently acquired by Wordpress company)

- Sendy.co ( more of a newsletter but you can setup templates and add/remove contacts via api)


👤 troygoode
Hey Rob, we (www.courier.com) sit on top of your existing email provider(s) – Mailgun in your case – and help make common email and notification tasks easy:

- visual template builder

- automatic retries

- switching between service providers (permanently or for failover)

If you implemented Mixpanel via Segment, we can also ingest those events directly from Segment into Courier (or you can call our API directly).

We'll be releasing automations early next year to help make the advanced drip stuff easy – but we aren't there quite yet.


👤 tebbers
I switched to Postmark to SES recently. Having a great time so far and very easy to set up webhooks, see sending history etc. Much easier than SES. They'll give you $75 credit to get started too.

👤 kevsim
We [0] use Intercom and are super happy with it. In addition to the chat widget (which our customers engage with a lot and which we never make any annoying spam pop up from) their email support works great. We can set up a welcome email series and can also trigger emails on custom properties like:

- Did you invite team members?

- Did you set up our GitHub, Slack or Figma integrations?

- Did you fail to complete the signup process?

It's great!

0: https://kitemaker.co, the hotkey-driven issue tracker/product management tool with deep integrations to the tools your team uses every day


👤 rock_hard
I did quite a bit of research on that just recently for my startup and here is what we landed on and a super happy with:

Pipe all event tracking through Segment.io including the triggers for transactional emails

Setup Customer.io to listen to the transactional event triggers from Segment.io

Create workflows in customer.io to send follow up, churn and other non transactional emails based on other events coming from segment.io

This makes it super easy for non engineers to change the setup

Customer.io provides email templating, analytics, AB testing and everything else you might need


👤 bleonard
I would recommend separating the service between transactional and marketing. Otherwise, there is always something going on with opt-out.

So use Sendgrid or Mailgun for transactional. Hit their API to send a mail. There are pros/cons around keeping the templates in there, but I would lean that way.

For drip campaigns, I would sync the product database to a tool like Mailchimp or the others ones that have been mentioned. We made an open source way to do that syncing, called Grouparoo.


👤 kordlessagain
The way I handle email flow is if the user asks me to email them, then I email them with Sendgrid. I don't email people when they aren't asking me to email them.

The only people emailing people without asking them are lame people writing lame code working for lamer corporations.

Any automatic emails would include philosophical thoughts on what constitutes a real and true need to alert the user.


👤 brightball
IMO the most important thing is to separate your email templates from your code base from the very beginning. Use a templating system from one of the external providers or something like SendWithUs.

Email is an afterthought that grows as your product grows. Untangling later becomes a big time sink.


👤 curo
No affiliation but isn't something like Autopilot HQ built for this? Or ActiveCampaign?

We've hard-coded our notifications & templates (sending them with Mailgun). I'm curious how others have architected systems that go beyond even the user notification. For instance, you may be collecting user events for (a) activity feeds, (b) analytics, (c) notifications. Supposedly a tool like Sentry (expensive) sits at the front and then plugs into (a) PSQL for activity feeds, (b) time-series DB for analytics, (c) and marketing automation tools like Autopilot for notifications.

This is all theoretical and I hope someone chimes in with their brilliantly thought-out architecture on this.


👤 gt565k
If you setup your templates in mailchimp/mandrill, you can use their API to send transactional email templates with plug-in variables at a specific time (send_at) parameter.

Basically, for example, new user drip campaign might be 5 emails, 1 a day, after signing up.

You create the 5 templates, when user signs up, you initiate the 5 transactional emails with send_at datetime parameter +1 day for each. This automatically schedules the emails to go out from mandrill/mailchimp's side, and your app can forget about it.

You just have to make the email templates.

Integrate with their webhooks, and you can track when the emails are sent, open, etc..


👤 thomaslord
You can probably use almost any marketing email provider for this - I know for a fact Mailchimp has an API integration to push new contacts into an email flow.

👤 Retailer
We use SendGrid. I first used them on a project I hosted on GAE which needed transaction emails and GAE recommended them (there was a free tier for GAE Apps).

We are planning on switching sometime next year as we are no longer that happy with them - documentation is getting more complicated, costs have increased, support is no longer as great as before.


👤 jrowley
I use customer.io

Makes it very easy to iterate/experiment.


👤 exdeve
I was using Intercom but It got really expensive. Its the best product for emails for products but they are positioning themselves for enterprise nowadays.

Because of the price I have decided to create my own email flows provider. It works like a charm because I adjusted it to my needs.

If you are still looking there it is: undersend.com


👤 rolae
For people on Rails I recommend checking out https://www.heya.email/ from The guys at honeybadger. It is a paid/open source gem, that will let work with the db data instead of having to transmit all that user data to a third party.

👤 xiaoyang88
Does anyone need a/b testing for email drip campaigns?

A/B testing the whole campaign, not just components inside a campaign. I.e. ability to create multiple versions of a campaign and seeing which one performs the best.


👤 pkrotich
Been using Sendy for years but now looking into drip.com for better workflow.

👤 dyeje
If you're already using Mailgun, try out their email marketing tool.

👤 HatchedLake721
We allow starting workflows based on user actions at https://automations.io via something simple as:

curl --request POST \

  --url https://api.automations.io/events \

  --header 'Authorization: Bearer key123' \

  --header 'Content-Type: application/json' \

  --data '{ "event": "Signed Up", "properties": { "userId": 123, "name": "Bob" } }'
We're running a beta right now, give me a shout alex [at] automations.io if you're interested in giving it a spin!