I want to receive a JSON via webhook from an internal system and send it via an HTTP request, but the data becomes empty during the HTTP request stage.
I’ve confirmed that the content of the received JSON is displayed when outputting _webhook_raw in the output block.
I’m using the on-premise version 1.10.0.
If you have any similar issues or solutions, I would appreciate your guidance.
Thank you for your comment.
The configuration settings for both blocks are as shown above.
I have tried various inputs in the JSON field (in this case, {{ webhook._webhook_raw.body }}), but none have worked so far.
In this case, the following points are important as prerequisites:
_webhook_raw is a variable of type Object.
Inside the HTTP Request node, variables of type Object cannot be referenced.
Therefore, if you want to use the Body received from the Webhook within the HTTP Request node, you need to convert it into another form, such as a string (String type), using some method.
When you only need the value of specific keys (string or numeric type) from the received JSON
In this case, you can specify the key and its type in the Request Body Parameters of the Trigger node, allowing subsequent nodes to reference it as a variable of that type. However, if the expected type is Object, you will still hit the limitation that Object variables cannot be referenced within the HTTP Request node.
When you need the entire received JSON
My personal recommendation is to convert the Object to a String via a Template node.
Place a Template node (roughly like this) between the Trigger node and the HTTP Request node, passing _webhook_raw as input.
Then, within the HTTP Request node, simply reference the output of the Template node above .