You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -80,6 +81,30 @@ Example JSON object output from the node:
80
81
}
81
82
```
82
83
84
+
### Sending responses back to the caller
85
+
86
+
First, ensure that your bucket's input is configured to return responses (by default for security reasons it will always return 200 status code and an empty body):
87
+
88
+
1. Go to your buckets page https://my.webhookrelay.com/buckets
89
+
2. Go to the bucket details
90
+
3. Click on input's settings
91
+
4. From the dropdown select "Any output"
92
+
93
+
Now, to send back responses from the Node-RED back to Webhook Relay so it can respond to the caller, form a payload:
94
+
95
+
```javascript
96
+
return {
97
+
meta:msg.payload.meta, // this is original meta field from the payload (it's important to include it so we have the message ID)
98
+
status:200, // status code to return (200, 201, 400, etc)
99
+
body:"any payload here (if you want to send JSON, just stringify it first)"// body
100
+
headers: {
101
+
someheader: ['somevalue']
102
+
}
103
+
};
104
+
```
105
+
106
+
Then, send this payload back to the Webhook Relay node through its input.
107
+
83
108
## Alternative methods
84
109
85
110
You can also use Webhook Relay CLI. One way forwarding webhooks
0 commit comments