Hi everyone,
I’m working on a workflow in n8n that sends a SOAP XML request to an external API (Officetrack) to create tasks. The XML is dynamically generated using data from a CRM.
However, I’m running into an encoding issue: whenever the XML contains accented characters (like á
, é
, ç
), they are being replaced by double question marks (??
) in the final request.
Here’s what I’ve tried so far:
- Added the UTF-8 declaration at the top of the XML:
<?xml version="1.0" encoding="UTF-8"?>
- Set the header in the HTTP Request node:
- Name:
Content-Type
- Value:
text/xml; charset=UTF-8
- Name:
- Manually tested with hardcoded strings (not coming from previous nodes), and the issue still happens.
This leads me to believe the problem is:
- The way n8n sends the XML body (possibly wrong encoding at runtime);
Before applying a workaround like stripping accents using JavaScript, I’d like to confirm whether anyone else has faced this issue with character encoding in XML sent from n8n, and if there’s a proper solution.
Any advice or workaround you can recommend would be really appreciated!
Thanks a lot
Information on your n8n setup
-
n8n version:1.91.3
-
Running n8n via (Docker, npm, n8n cloud, desktop app):n8n cloud