How can I change webhook response?

Hi my dear friends;

In my case:
I forced from third party website to have callback page for post data to it to show them to my users. (Some payment data)
In other hand I force for getting that data in my workflow, give them my “webhook address” in my installed n8n.

My Question is that:
Are there any way to customize webhook message page?
For example can I use html code to design it or can I redirect my users to another page with this address: “http://mysite.com/callback

The message of webhook now is:
{"message":"Workflow got started."}

Best regards;

It is possible to return HTML and redirect to another page with meta-refresh like this:

{
  "nodes": [
    {
      "parameters": {
        "path": "test",
        "responseMode": "lastNode",
        "responseData": "firstEntryBinary",
        "options": {}
      },
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [
        550,
        450
      ]
    },
    {
      "parameters": {
        "keepOnlySet": true,
        "values": {
          "string": [
            {
              "name": "html",
              "value": "<html>\n  <head>\n    <title>Redirect</title>\n    <meta http-equiv=\"refresh\" content=\"0; URL=http://example.com\">\n  </head>\n  <h1>Redirect</h1>\n</html>"
            }
          ]
        }
      },
      "name": "Set",
      "type": "n8n-nodes-base.set",
      "typeVersion": 1,
      "position": [
        750,
        450
      ]
    },
    {
      "parameters": {
        "mode": "jsonToBinary",
        "convertAllData": false,
        "sourceKey": "html",
        "options": {
          "mimeType": "text/html",
          "useRawData": true
        }
      },
      "name": "Move Binary Data",
      "type": "n8n-nodes-base.moveBinaryData",
      "typeVersion": 1,
      "position": [
        950,
        450
      ]
    }
  ],
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "Set",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set": {
      "main": [
        [
          {
            "node": "Move Binary Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
1 Like