Creating Note via API with Multiple Lines

Your software
My Mautic version is: 4.4.5
My PHP version is: 7.4.3
My Database type and version is: MySQL 8.0.30
Installation Method: Installed via Cloudron

Your problem
My problem is: I’m currently using Make.com to integrate my WordPress forms with Mautic as I would like to use Mautic for sending newsletters and as a basic CRM. When someone submits a contact form, they’re added to the “Contacts” segment and if they checked that they want to subscribe they also get added to the “Newsletter” segment.

Anyways, on the contact form, the user can leave a message which I would like to have added as a note in Mautic categorized as an “Email”.

So, in Make.com I have it call the API endpoint “/notes/new” as there isn’t an official Notes integration. I’ve specified the content-type as application/json and for the body I have the following:

{"lead": {{2.id}}, "type": "email", "text": "{{10.text}}"}

Originally I had it passing in the original value of the contact form, but it would error because there were new lines in message. So, I added a “Text parser” module to replace new lines with:

\r\n\r\n

This allows the message to get posted into Mautic, but it doesn’t create the new lines. Instead, the message appears as one line of text in Mautic.

How can I make it so that new lines appear in Mautic?

Steps I have tried to fix the problem:
I’ve contacted Make.com support and they investigated the issue and said they read Mautic’s API documentation as well, but weren’t sure why the line breaks weren’t being preserved/respected.

Any help or advice would be greatly appreciated!

Thanks,
AJ

Hi ajtatum.

Did you manage to get a solution?

FYI: Doesn’t work for now. Mautic API doesn’t support it.

1 Like