Send raw data with "Send a webhook" campaign action

Your software
My Mautic version is: 4.4.0
My PHP version is: 7.4.29
My Database type and version is: 10.4.25-MariaDB

Your problem
My problem is:

For a certain webhook POST i need to make i need to send the data value RAW as follows, they do any escaping of special characters at their end:

Desired situation:

"text": "Hallo Marc,\n\ntest"

Which would result in:

Hallo Marc,


Unfortunately, when i test my send a webhook action i receive the data as follows:

"text": "Hallo Marc,\\n\\ntest"

Is there a possibility to not escape any special characters by Mautic?

That sounds like a security risk to me.

1 Like

Hi Joey,

I got this working with Zapier Custom Request webhook but now want to switch to Mautic.

The endpoint gives me the following instructions:

“text” – a plain text UTF-8 encoded message to be sent (no markdown supported, except “\n” line separator)

But the resulting webhook POST by Mautic changes it to \ \n, while i need send “\n”. The result is that \n is being echo’d out and not processed.

The text is always the same, only gets added the name of the contact.

I’m not sure why Mautic is doing this. Let’s home soneone who understand webhooks better can chime in.