Webhook Response in XML


i want to respond to a webhook with xml, in php i did it like this:

header('Content-type: application/xml');
echo '<?xml version="1.0" encoding="UTF-8"?><Response><Reject /></Response>';

How can i achieve that?

Thank you,

That is sadly currently not possible.

I want to release a new version of n8n later I have a fast look if I can think of something I can build (quickly) to solve that problem. But I can not promise you anything.

Thanks for the quick reply.

I would love to help, but i can’t find the nodes in source code.

No problem.

Sadly do not totally understand the second part of your message. But maybe that helps. You can find all the available nodes here:
And if you click on one it displays you a link to the source code.

1 Like

Ok was able to find a way. So for it to work you have to install the latest version of n8n (0.26.0).

An example workflow how it works can be found here:

1 Like

super awesome! thank you very much!

You are welcome. Have fun!

I need to return this structure, but if it create my jsonitem like

it will escape the <,> and this is the result:

is it possible to do it at the moment?

With the Set-Node was just one example. Thought you have “real” data you want to return. If you simply want to hardcode it you can also use a Function-Node like this:

  "nodes": [
      "parameters": {
        "functionCode": "const data = `<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<Respose>\n  <Reject />\n</Respose>\n`;\n\nreturn [\n  {\n    json: {\n      data\n    }\n  }\n];"
      "name": "Function",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
  "connections": {}