# 9. Auth0 and Mailchimp direct integration

Date: 2020-06-10
Driver: Wisen Tanasa

# Status


# Context

We are required to send marketing emails from Mailchimp, which means we'll need to be able to create contacts in Mailchimp when a user signs up automatically.

Based on our current architecture, there are three locations where we can hit Mailchimp API, which is numbered below:

# Decision

We are going with approach #1 which is to integrate Auth0 and Mailchimp directly

# Consequences

We'll be able to create Mailchimp contact automatically regardless of where the user creation is coming from, whether it's created from Auth0 manually, or automatically. Unlike approach #3, we also don't need to figure out how we could create the Mailchimp contact when someone is signing up from Auth0 Universal login page.

By not adopting approach #2, we will also be maintaining the performance of our webapp by not hitting Mailchimp from our webapp. Not hitting Mailchimp API also means that we'll be more secure as we'll have less area to be attacked - an attacker brute forcing contact creation.

One of the downside of this approach is this is a new type integration that we haven't explored and we risk it not too work. The feature that we're looking to leverage in Auth0, Log Stream, may also require us to pay Auth0 in every tenants (hopefully not).