4 ways to automate your Mautic workflows

2022 research by Okta cites that large organizations deploy 187 applications on average. Marketers only are continuously either synching data between CRMs, building drip campaigns using several tools or setting up ads campaigns based on the contacts database.

Mautic is one of the most popular marketing tools used by over 200,000 organizations globally. Being open source, it's a particular favourite with n8n users. 

This article will cover 4 ways to automate your marketing workflows by using n8n, a source-available, self-hostable workflow automation tool that lets you to connect Mautic with third-party applications – you can read more about n8n further down. Let’s get started.

4 Workflow automation ideas for Mautic

Let’s look at four different scenarios where we can use n8n to connect Mautic with other tools.

Note that, the baseline prerequisite for working with any of the workflows below is having n8n setup. The easiest way is to sign up for n8n cloud but you can also self-host n8n.

Add new customers from Woocommerce to Mautic

This workflow adds new customers from Woocommerce to Mautic. It uses a WooCommerce trigger that will run when a new customer has been added. The workflow then checks Mautic for an existing contact matching the newly created Woocommerce customer. If the contact does not exist, then it is created, otherwise the existing contact is updated.

This workflow has four steps that execute in the following order:

  • Step 1: Customer Created or Updated – This step fires the Woocommerce trigger node when a customer has been created or updated on Woocommerce
  • Step 2: Check for Existing – This step checks to see if there is an existing Mautic contact matching the updated or created Woocommerce customer. A Mautic node  is used for this.
  • Step 3: If New – This step uses the output of the previous step to ascertain whether the data from Woocommerce is new or not. The If node  is used for this.
  • Step 4: Lastly, depending on the result of the previous step, a new contact is created on Mautic or an existing one updated. Mautic nodes are used in this step.

Overall, to use this workflow you will first of all need to do two things:

Create Mautic contact on a new Shopify customer

This workflow creates a new contact in Mautic when a new customer is created in Shopify. By default, the workflow will fill the first name, last name, and email address. You can add any other fields you require.

This workflow has two steps that execute in the following order:

  • Step 1: On new customer – This step invokes a  Shopify node when a new customer is created in Shopify.
  • Step 2: Create contact – This step receives the customer data from the previous step. It then creates a new Mautic contact with the customer data using a Mautic node.

Overall, to use this workflow you will first of all need to do two things:

  • Create a Shopify account on your n8n and set the credentials for the Shopify node.
  • Create a Mautic account and set the credentials for the Mautic node.

You could add more steps as well, like checking first if the customer is new before you create it on Shopify.

Create or update Mautic contacts for new invitee created events in Calendly

This workflow creates or updates a Mautic contact when a new event is scheduled in Calendly. The first name and email address are the only two fields that get updated.

This workflow has two steps that execute in the following order:

  • Step 1:  On new event – This step invokes the Calendly node when a new Calendly event is scheduled.
  • Step 2: Create/update contact – This step accepts data from the previous step and creates a Mautic contact or updates the contact’s first name if it already exists. The Mautic node is used here.

Overall, to use this workflow you will first of all need to do two things:

  • Create a Calendly account on your n8n and set the credentials for the Calendly node.
  • Create a Mautic account and set the credentials for the Mautic node.

Add item with a note in Monday.com on a new task/contact in Mautic

This workflow creates a new item in a Monday.com board when a new contact is created in Mautic. Additional fields can be added to the workflow to send more data to Monday.com.

This workflow has two steps that execute in the following order:

  • Step 1: On created contact – This step executes a Mautic node when a new contact is created in Mautic.
  • Step 2: Create item – This step receives the Mautic contact data from the previous step and creates a new item in the Monday.com board using the Monday.com node.

By default the workflow will send the contact's email address to Monday.com and name the item after the contact's first and last name.

Overall, to use this workflow you will first of all need to do three things:

How to use n8n to automate your own Mautic workflows?

Before we dive into set up and run n8n workflows, let’s first of all cover the basics.

What are Workflows and Nodes?

Think of a workflow as some major process you would want to automate. For example, the Woocommerce to Mautic workflow that automatically moves customer data from Woocommerce to Mautic. Workflows in n8n are not just limited to Mautic. As an example, you could even have a workflow that declutters an email’s inbox.

At the core of every n8n workflow are nodes. Remember, a workflow is some major process we are automating. On that note, think of a node as a sub-task or step in the process. For example, in the Woocommerce to Mautic workflow, we are going to have the following steps:

  • Customer created or updated: where the workflow would perform some action when a new Woocommerce customer is created or an existing one updated.
  • Create contact: here the workflow would create a new Mautic contact when it receives the new customer data from Woocommerce.

From a more technical standpoint, we can define a node as an entry point for retrieving data, a function to process data, or an exit for sending data. The data process performed by nodes can include filtering, recomposing, and changing data.

With these high level understanding of workflows and nodes, we can simply say that a workflow is a collection of connected nodes. Thus, to create a Mautic workflow or just any workflow, you just need to connect all the necessary nodes.

Setting up and running your own workflows would require one or more of the following steps in the order they appear.

Step 1. Set up n8n instance 

As mentioned earlier, the first step to automating any workflow with n8n is to spin up an n8n instance. n8n is available as a Cloud service, desktop app, npm module, and Docker image.

One other thing, most of the nodes you’d work with will require some authentication with the service they connect to. To learn more about creating, managing, and sharing credentials, refer to Manage credentials.

With an n8n instance setup, next, you need to create your workflows in the n8n UI. But what does creating a workflow entails?

Step 2. Choose how to start your workflow

Once you create your workflow, it can be started manually (with the Start node) or by Trigger nodes. When a workflow is started, it executes all the active and connected nodes. The workflow execution ends when all the nodes have processed their data.

In the image above, the rectangular boxes are the nodes, and the arrows between them are the connections.

A connection establishes a link between nodes to route data through the workflow. A connection between two nodes passes data from one node's output to another node's input. Each node can have one or multiple connections.

Step 3. Connect nodes

To create a connection between two nodes, click on the grey dot on the right side of the node and slide the arrow to the grey rectangle on the left side of the following node. See image below. To configure parameters and settings for the node, double click on the node block.

Wrap up

Integrating Mautic and the different marketing tools you work with using manual processes could be hard.

With n8n this is no longer a problem – it allows you to automate these manual processes that would normally be a hassle. 

To illustrate how n8n could be used to automate your marketing workflows, this article covered some use cases where Mautic integrates and shares data with platforms like Woocommerce, Shopify, Calendly and Monday.com.

Ready to connect your Mautic with other third party applications?

Sign up for the n8n cloud account to easily get started and start automating processes with n8n! The platform also offers hundreds of pre-built integrations and hundreds of automation templates, allowing your team to design the custom workflows you need.

What’s next?

Now that you’ve seen some practical use cases where n8n could be used along with Mautic, also keep in mind that the usefulness of n8n extends beyond Mautic. For example, you can automate how data is imported into Salesforce with n8n.

Additionally, you can also explore a list of some open-source marketing automation tools we curated.

 

Nyior Clement is a developer advocate @ 84codes & freelance technical writer. You can follow him on Twitter and read more of his articles about data transformation and automation on n8n’s blog.

This is a companion discussion topic for the original entry at https://www.mautic.org/blog/community/4-ways-automate-your-mautic-workflows