Webhook-relay

This is a simple tool to relay webhooks to another endpoint with a certain transformation. Many webhook endpoint requre a certain url format, with dynamic variables embedded, while the producers of the webhooks do not support dynamic webhook urls. Therefore, you can use this tool to include dynamic variables in the target webhook url.

To relay a webhook, point it to
/api
of this host.
Add a query param
?dest=
, where you fill in your desination url.
The desitination url can then inculde variables that the origin sent in JSON for example, by prefixing the variable names with
$
For example,
/api?dest=https://usX.api.mailchimp.com/3.0/automations/$user_id/emails/$list/queue
will fill in the
$user_id
with the
user_id
of the post data, and
$list
with the
list
variable in post data.