Triggering Zaps

How to trigger metric-driven workflows in Zapier.

The true power of Morning is in allowing your metrics to work for you by triggering workflows in real-time as your data changes. Previously this could only be achieved by writing complex logic into your application code and running cron jobs and slow queries. But with Morning and Zapier you can instantly automate data-driven workflows without writing any code and it only takes minutes.

1. Create a trigger in Morning

In your Metric detail screen select “Add Trigger”.

Then configure the conditions under which your trigger should run:

Note: If want your workflow to run each time the criteria is met for a person, you need to “Group by” person.

Here’s an example of a valid trigger:

You can also set a schedule for your trigger to run. This is useful when you only want to run a trigger once for a user within a certain interval and not every single time the condition is met.

Once you’ve configured your conditions and schedule, save your Trigger.

Learn more about configuring Triggers

2. Use your Metric trigger to kick off workflows in Zapier

Create a new Zap and select Morning and “Metric Updated” as the event to start your workflow.

Test the trigger to see which properties are available for your workflow. If your trigger is grouped by “Person” you should see a person property included in the trigger output.

Learn more about the standard properties for every metric in Morning.

Example: Sending users a warning email when they’re getting close to exceeding their monthly service quota.

Metered usage is a common way to incentivize customers to upgrade to higher level of service but tracking that data month over month and prompting customers to upgrade is complex and time-consuming. But by tracking customer activity in a Morning metric and using Triggers to kick off workflows, you can automate this process without writing any code. It only takes minutes to improve your customer conversions.

In this example, we’ll use a metric of “New Forms” to send an email to free users asking them to upgrade their plan when they hit their limit.

1. Write a Trigger in Morning

In this example, we’re already tracking the “New Forms” metric in Morning so we can easily write a Trigger to start a workflow.

We want to trigger a workflow when a user reaches their limit of New Forms that they can create. Because this service only limits free users, we want to make sure to not to run this workflow for paying users. We can exclude paying users by only running it for users where stripeId does not exist.

If you’re curious about the results, you can easily preview the users that this workflow will run for before continuing.

Once we’ve confirmed that our Trigger is configured correctly, we click “Save”.

Note that our trigger has “0 workflows” attached because we haven’t yet configured them in Zapier.

2. Build the workflow in Zapier.

Open Zapier, create a new Zap and select Morning and “Metric Updated” as the event to start your workflow. Then select the Trigger you just created.

We want to use this trigger to send a personal email to users warning them that they’re hitting the limit and asking them to upgrade so we’re going to connect this to my Gmail account and use the “Send Email” event.

In the “To” field, we want to use the customer email from their Morning profile.

In the body field, we want to greet them by their name, so we use the name field from their Morning profile.

Once I’m sure that my email is formatted how I want, I can publish the Zap and Morning will run it for every customer that matches the Trigger criteria.

Now the worlflow appears alongside my Trigger

Last updated