Help with adding notes in Mautic

I want to add notes to Mautic via n8n and I’m struggling with how to proceed. Since the Mautic integration doesn’t support notes I guess using the API is the solution.

Mautic has an example in PHP

<?php 

$contactID = 1;

$data = array(
    'lead' => $contactID,
    'text' => 'Note A',
    'type' => 'general',
);

$note = $noteApi->create($data);

Would it be possible to transform this to json use the update node contact node and update fields to create notes in Mautic from n8n?

Hi @L-Jo, welcome to the community!

I am not very familiar with PHP, but it seems the code you have shared relies on $noteApi which isn’t defined in your snippet. From looking at Mautic Developer Documentation it looks like it’s as simple as making a POST request to POST $yourMauticUrl/api/notes/new with text, type and datetime parameters. Something like this:

Perhaps you can give this a go on your end?

Thanks @MutedJam for getting me started on this (and for the welcome!)

It worked like a dream - one small change was necessary - which lead it is written to if someone else finds this (I guess that has to be modified to the application though):

1 Like