Sync WooCommerce Customers with Mautic
Automate contact synchronization between WooCommerce and Mautic. This workflow creates or updates Mautic contacts whenever a customer is added or updated in your WooCommerce store.
Overview
Automatically syncs customer data from WooCommerce to Mautic, creating new contacts or updating existing ones to maintain a consistent and up-to-date marketing database.
🔄 Description & Use Case
This workflow automates the process of keeping your Mautic marketing contacts synchronized with your WooCommerce customers. Whenever a new customer is created or an existing customer's details are updated in WooCommerce, this workflow will automatically create a corresponding contact in Mautic or update the existing one.
Workflow Steps:
- Trigger: The workflow is initiated by the
Customer Created or Updatedevent in WooCommerce. - Check for Existing Contact: It takes the customer's email from the WooCommerce data and uses the
Mauticnode to search if a contact with that email already exists in your Mautic instance. - Conditional Logic: An
Ifnode checks the result from the previous step.- If True (Contact is New): If the search returns no contact ID, it means the customer is new to Mautic. The workflow then proceeds to the 'Create Contact' branch.
- If False (Contact Exists): If a contact ID is found, the workflow proceeds to the 'Update Contact' branch.
- Create or Update in Mautic:
- Create Contact: A new contact is created in Mautic using the customer's first name, last name, email, and company from WooCommerce.
- Update Contact: The existing Mautic contact is updated with the latest first and last name from WooCommerce.
✅ Real-World Use Cases:
- Marketing Automation: Ensure your Mautic campaigns and segments are always populated with the most current customer information from your e-commerce store.
- Data Consistency: Eliminate manual data entry and reduce errors by maintaining a single source of truth that is automatically synchronized across platforms.
- Customer Onboarding: Instantly enroll new WooCommerce customers into a Mautic welcome series or onboarding campaign to improve customer engagement from day one.
- Personalized Communication: Use up-to-date customer data in Mautic to send targeted, personalized marketing communications that resonate with your audience.
Instructions
Basic steps
- Download workflow JSON
- Import into n8n
- Configure node parameters as needed
- Test and enable the workflow
💡 Tips
After importing, verify all connectors and credentials match your environment.
Preview
Workflow Visualization
Nodes
Check for Existing
mautic
If New
if
Create Contact
mautic
Update Contact
mautic
Customer Created or Updated
wooCommerceTrigger
Statistics
View full JSON structure
{
"nodes": [
{
"name": "Check for Existing",
"type": "n8n-nodes-base.mautic",
"position": [
280,
480
],
"parameters": {
"options": {
"search": "={{$json[\"email\"]}}"
},
"operation": "getAll",
"authentication": "oAuth2"
},
"credentials": {
"mauticOAuth2Api": {
"id": "54",
"name": "Mautic account"
}
},
"typeVersion": 1,
"alwaysOutputData": true
},
{
"name": "If New",
"type": "n8n-nodes-base.if",
"position": [
460,
480
],
"parameters": {
"conditions": {
"string": [
{
"value1": "={{$json[\"id\"]}}",
"operation": "isEmpty"
}
]
}
},
"typeVersion": 1
},
{
"name": "Create Contact",
"type": "n8n-nodes-base.mautic",
"position": [
680,
320
],
"parameters": {
"email": "={{$node[\"Customer Created\"].json[\"email\"]}}",
"company": "={{$node[\"Customer Created\"].json[\"billing\"][\"company\"]}}",
"options": {},
"lastName": "={{$node[\"Customer Created\"].json[\"last_name\"]}}",
"firstName": "={{$node[\"Customer Created\"].json[\"first_name\"]}}",
"authentication": "oAuth2",
"additionalFields": {}
},
"credentials": {
"mauticOAuth2Api": {
"id": "54",
"name": "Mautic account"
}
},
"typeVersion": 1
},
{
"name": "Update Contact",
"type": "n8n-nodes-base.mautic",
"position": [
680,
580
],
"parameters": {
"options": {},
"contactId": "={{$json[\"id\"]}}",
"operation": "update",
"updateFields": {
"lastName": "={{$node[\"Customer Created or Updated\"].json[\"last_name\"]}}",
"firstName": "={{$node[\"Customer Created or Updated\"].json[\"first_name\"]}}"
},
"authentication": "oAuth2"
},
"credentials": {
"mauticOAuth2Api": {
"id": "54",
"name": "Mautic account"
}
},
"typeVersion": 1
},
{
"name": "Customer Created or Updated",
"type": "n8n-nodes-base.wooCommerceTrigger",
"position": [
100,
480
],
"webhookId": "5d89e322-a5e0-4cce-9eab-185e8375175b",
"parameters": {
"event": "customer.updated"
},
"credentials": {
"wooCommerceApi": {
"id": "48",
"name": "WooCommerce account"
}
},
"typeVersion": 1
}
],
"connections": {
"If New": {
"main": [
[
{
"node": "Create Contact",
"type": "main",
"index": 0
}
],
[
{
"node": "Update Contact",
"type": "main",
"index": 0
}
]
]
},
"Check for Existing": {
"main": [
[
{
"node": "If New",
"type": "main",
"index": 0
}
]
]
},
"Customer Created or Updated": {
"main": [
[
{
"node": "Check for Existing",
"type": "main",
"index": 0
}
]
]
}
}
}Actions
Technical Specs
Compatibility
License
This workflow template follows MIT license, you can freely use, modify and distribute.
Please comply with relevant third-party service terms when using.