Mautic integration [GOT CREATED]

It would be great to be able to hook into mautic.org to enable more advanced workflows

Could you please explain what functionality you would need exactly. That when it gets created we can be sure it can do the things you all need. Thanks!

I’m looking for integrate Mautic to Active Campaign through a middleware like n8n. The idea is that when an action is performed on and from a contact at Active Campaign or Mautic, the middleware send the data one to another. For example: when a contact at Active Campaign receives a tag called “inactive”, the middleware send this contact to Mautic, and when a contact at Mautic reengage, he should be send to Active Campaign. The deal is that I need to use Mautic to manage my inactive contacts, and Active Campaign as a main contacts base (qualified leads). Hope I get to make myself clear… thank you guys.

Hey, @simeia welcome to the community.

About the first use case:

Sending data from Mautic to Active Campaign

We currently have an Active Campaign node so that you can add data (create a contact) from an event fired on Mautic as long as the event you want to detect is one of the ones below:

Mautic can send webhook payload on these actions:

  • Email open
  • Form submit
  • Lead delete
  • Lead point change
  • Lead update
  • Lead create
  • Page hit

Info about how to create a webhook on Mautic here: https://developer.mautic.org/?php#create-a-webhook

So the flow would be like this:

1 - You create a Webhook node on N8N and grab the URL.
2 - You connect that Webhook node to the Active Campaign node.
3 - You create the webhook on Mautic with the URL you grabbed from the webhook node on N8N.

So every time an event is fired on Maurtic the webhook in N8N is gonna receive the data and that data is gonna be sent to Active Campaign as a create contact action. You are gonna have to reference the data from the Webhook node to the Active Campaign node using expresions. it’s easier than it sounds. More info about that here: https://docs.n8n.io/#/node-basics?id=expressions.

About the second use case:

Sending data from Active Campaign to Mautic

Sadly we do not have a node for adding information to Mautic just yet but since the node is doing an HTTP request you can use the HTTP request node to accomplish that. To this, you gotta have a little bit of experience working with REST APIS. I can help to set this up if you are ok with it.

Just checked and Active Campaign has supports for webhooks and supports the event you are looking for (Contact tag added). More info about that here: https://help.activecampaign.com/hc/en-us/articles/115001403484-Working-with-webhooks

So the flow would be like this:

1 - You create a Webhook node on N8N and grab the URL.
2 - You connect that Webhook node to the HTTP request node.
3 - You create the webhook on Active Campaign with the URL you grabbed from the webhook node on N8N.

So every time an event is fired on Active Campaign the webhook in N8N is gonna receive the data and that data is gonna be sent to the HTTP node which is gonna make a request to Mautic using the REST API and will create the contact. As I explained before you are gonna have to reference the data from the Webhook node to the HTTP request node using expresions.

Do not hesitate to ask any further questions. I’m happy to help.

Regards

Ricardo.

2 Likes

@simeia have good news. @RicardoE105 created a Mautic-Integration (thanks a lot!) which will make that now much easier. It did just get merged and will be released with the new n8n-version in the next days.

2 Likes

Hello guys, wow!! Thank you very much @RicardoE105 you are awesome! Thanks @jan what a great community you have here. Cheers! Siméia.

2 Likes

Thanks, @simeia ! I could not agree more with what you said!

1 Like

Got released with [email protected]

1 Like

Hello friends,
I’m almost there =)
After 2 days working on it (I used to be a PHP programmer about 5 years ago, REST APIs is not a thing I really know) just trying to handle.

I’ve already got the workflow from Mautic to Active Campaign working like a charm.

Now I’m trying to send AC data to Mautic, but the Mautic node show me an error:

"Issues: - There was a problem loading the parameter options from server: “Mautic Error: {}”
"
at “Primary Company” parameter.

I’m trying to figure this out, I don’t know if its an error from the Mautic integration plugin, or what.
Thanks.

Hey @simeia,

I’m glad you figured it out. Just checked and seems to be working for me as you can see in the picture below:

The only thing that comes to mind is that the credentials are not set correctly. I am gonna leave you my credentials here so that you can test that out.

URL: https://n8n.mautic.net
Username: [email protected]
Password: nWdApUz9e102

Keep me posted. We are happy to help.

Regards

Ricardo

1 Like

Hello there, thank you very much… =D

I’ve used your credentials and it gives me the same error…

And I notice another wierd thing: when I go to create a Mautic credential, the password field is not showing…
Check it out:

Thanks!
Simeia.

Ah yes, it seems like you are running an old version which contained a bug. Can you please upgrade to the latest [email protected]

1 Like

Perfect @jan just updated and it’s working now.
The field “Primary Company” are working with @RicardoE105 credentials, not with mine, so the problem is not this application anymore… :grimacing:
I’ll try to discover what about my Mautic now :see_no_evil:

1 Like

Ah great to hear! Then good luck with finding the problem!

To maybe help a little bit. This is where the request happens that causes the error:

So all it is doing is making a “GET” request to the “/companies” endpoint.

1 Like

Perfect! Good to know, thanks.