Set up onboarding sequence

Let's look at how to set up an onboarding sequence for SaaS. The goal is to convert trial users to paid customers. This is a common use-case, and it's easy to set up with Sidemail.

We'll look at how to set up:

  • Trial expiration email sequence (draft pre-made)
  • Retry trial email sequence (draft pre-made)
  • Welcome email sequence (start from scratch, easiest to set up)

You'll send data about your users to Sidemail via API ⁠— you choose what data. When new data arrive, Sidemail checks whether the new data match automation trigger conditions. If there's a match, Sidemail schedules all emails in the email sequence for delivery.

Ok, let's set this up.

Configure contact profiles

You can push any data about your users to Sidemail via API, but first, you have to define the property name and its data type.

In your Sidemail project's settings, define the following properties:

  • pricingPlan as string
  • registredAt as date

Use your preferred naming convention (camelCase, snake_case, etc.)

Integrate the API

Sidemail has a single create/update API endpoint, so you don't have to write the handling logic yourself. Send the API request from your backend.

const configureSidemail = require("sidemail");
const sidemail = configureSidemail({ apiKey: "xxxxx" });
const response = await sidemail.contacts.createOrUpdate({
	emailAddress: "",
	identifier: "123", // ID representing the user in your database
	customProps: {
		pricingPlan: "premium",
		registeredAt: "2019-08-15T13:20:39.160Z",

(Read more about contact profile API)

You should place the code that sends the user's data to Sidemail in a strategic place in your server code to keep the users' data up-to-date in Sidemail. For example, in your billing and authentication controllers (or middlewares).

Alternatively, you could create a repeating background job that updates users' data in Sidemail every 15 minutes.

To verify that your application successfully pushed user data to Sidemail, find appropriate contact in contacts, and you should see when was the last time the contact property was updated and the current value.

Set up the automation

Go to Automation in your Sidemail project, and you'll find two automation drafts we pre-made: "Retry trial" and "7-day trial". Click to edit (or start from scratch by clicking the "+ New automation" button).

Set up the following trigger conditions:

  • registredAt -> is now (current hour)

"Is now (current hour)" condition means that the automation will only trigger at the current hour when the user registered. Ensure user data are sent to Sidemail when user registers (eg., in registration controller).

Next, let's focus on the email message.

Click on the message to edit (or click "+Add message" if you're starting from scratch). Adjust the message, subject, and from address to your liking. Keep it simple. You can always edit the message even after you activate the automation.

Edit how much time Sidemail should wait before delivering your message after the automation is triggered. The delay is always relative to the previous message, so if you choose to wait 2 days for the first message and 5 days for the second, the second message will be delivered 7 days after the automation was triggered.

Next, let's set up the goal.

The goal is to convert a user to a paid plan. When the goal is met, Sidemail will automatically delete all remaining emails from this automation that are scheduled for delivery. The goal is optional, so when there isn't necessarily any goal (eg., welcome email), you can leave it empty.

Keep in mind, that automation without a goal (or a goal that is impossible to hit) will get triggered multiple times if the data change from trigger-matching to non-trigger-matching back to trigger-matching. For example, leverage this behavior to send email notifications about user's usage/quota that resets every month).

Set up the following goal conditions:

  • pricingPlan -> equals -> "premium" (replace with your plan name)

If you have multiple plans, create another goal condition with the same property name and condition type, but with the additional plan name as the condition value. Repeat for all plans. Importantly, set "Filters match" to "Any condition".

Activate the automation

You're almost done. In your automation, click the "Activate automation" button. Confirm it. Congratulations!

Test your automation. When automation is triggered, you can find all emails scheduled for delivery in your project's History.

Next steps

Next up, you can set up customer retention automation. For example, set up automation to send an email notification when a customer's payment card is about to expire.