Combination of Webhook & HTTP

Hi, i having issue sending received data to another webhook.

I received the data from a source. I would like to send the all the data to another webhook after filter certain data. But i can’t set the HTTP part correctly. It keep show error. Anyone know how to solve it?

This is the error i got.

and after i change to string. i got unicode data.

How can i solve?

Thank you!

It all depends on how that other webhook is configured.
What are you expecting as the return?

I need to pass all the value received at the webhook to another webhook if the filter is correct.

Can you also share what the content of Body Parameters is? I’m assuming it’s an expression.

I ran into something similar. Unfortunately the templating language n8n expressions use is pretty limited and has nothing built in to sanitize this data. I ended up using a function node with the following code to stringify the body before sending to the HTTP request node.

// Loop over inputs and add a new field called 'myNewField' to the JSON of each one
for (item of items) {
  item.json.httpBody = JSON.stringify({
    message: item?.json?.body?.mesage.trim() || 'N/A',
  });
  
}

return items;

And my express in the body of the HTTP Request node is {{$json["httpBody"]}}

Hi eddywashere, here the body content.

[
  {
    "headers": {
      "host": "008.wazaps.my",
      "content-length": "810",
      "accept": "application/json",
      "accept-encoding": "gzip",
      "cdn-loop": "cloudflare",
      "cf-connecting-ip": "138.201.157.20",
      "cf-ipcountry": "DE",
      "cf-ray": "74c8950ade28c2a5-VIE",
      "cf-visitor": "{\"scheme\":\"https\"}",
      "content-type": "application/json",
      "x-forwarded-for": "138.201.157.20, 172.68.51.54",
      "x-forwarded-proto": "https"
    },
    "params": {},
    "query": {},
    "body": {
      "product_id": "acadbeab-24c0-4db7-ab17-aa9471915e03",
      "phone_id": 22802,
      "message": {
        "type": "text",
        "text": "Testing123",
        "id": "[email protected]_3A3A7A4374F5770006118E3FE80D3BD9",
        "_serialized": "[email protected]_3A3A7A4374F5770006118E3FE80D3BD9",
        "fromMe": false
      },
      "user": {
        "id": "[email protected]",
        "name": "Jerry Yong",
        "phone": "60199966312",
        "image": "https://pps.whatsapp.net/v/t61.24694-24/229898327_645980303302284_7476353534299597228_n.jpg?ccb=11-4&oh=01_AVwi4Y9xs02uU6m1gGenCjL3aRdGZc4fFtloF3k4nk0UKw&oe=6333C16C"
      },
      "conversation": "[email protected]",
      "conversation_name": "Jerry Yong",
      "receiver": "601129538263",
      "timestamp": 1663488384,
      "type": "message",
      "reply": "https://api.maytapi.com/api/acadbeab-24c0-4db7-ab17-aa9471915e03/22802/sendMessage",
      "productId": "acadbeab-24c0-4db7-ab17-aa9471915e03",
      "phoneId": 22802
    }
  }
]

i use the way you mentioned. Seem i having issue with the coding you provided.

Can you please post the data you are sending to the webhook and how you want to send it to the integromat?