Hello, I’m trying to build a workflow that generates a token, registers a key, and then uses the returned information to send an HTTP request with an XML file. This process works perfectly in Postman, where I can select and attach the file. However the problem is, I’m having trouble sending the XML file with the HTTP request in N8N. I obtained some JavaScript code from someone that makes the request directly, but I haven’t been able to incorporate the XML file into it. Additionally, I don’t have access to their workflow, which is likely different from mine. In my system, I save the XML in Base64 format, then convert that string back to XML before sending the request (or whatever conversion is necessary since the system only accepts XML due to invoicing requirements).
PS: The last node is just to check that the file has been sent, if it has been accepted (XML) and processed, you can ignore it.
What is the error message (if any)?
First Error: Cannot read properties of undefined (reading '#>Object> ') Second Error: I tried sending the Base64 directly but don’t work, needs to be a XML.
I tried that too… placing the file on the name and binary file on the file but didn’t work.
The JS XML was done by another guy who was implementing this system and it worked, but I don’t have access to its workflow or the guy’s contact details.
Could you please attach any information, such as screenshots of the error you’re encountering with this approach? I’m unable to replicate the attached workflow on my end.
Based on your first error it looks like you are either using an expression or json path that doesn’t exist in the data. the node before JS XML are you getting the output correctly? I am guessing you might have an incorrect key to the base64 data you are trying to parse.
For your second error I think in your JS XML node if you are able to convert the base64 to raw XML it should get resolved.
The first one i was trying to get the Binary Data and sending to the Step 2 (inside the JS XML), but i tried sending the Base64 string too and didn’t work.
The second one i made the Payload with the Base64 in the Body but needs to be a XML file… soo i run out of ideas, any tips for the “raw xml” you said?