Webhook Guide
Rin can send notifications to a custom webhook when:
- a new comment is created
- a new friend-link application is submitted
You can use this to connect Rin to Discord, Telegram bots, Slack gateways, Feishu, DingTalk, n8n, Zapier, or any custom HTTP endpoint.
Where to Configure It
After deployment, open the admin Settings page and find the Webhook section.
You can also provide an initial default through the WEBHOOK_URL environment variable, but the settings page is the recommended place to manage webhook behavior.
Supported Fields
Rin currently supports these webhook settings:
Webhook URL: target endpoint. Template variables are supported here too, which is especially useful for GET query strings.Webhook Method:GET,POST,PUT,PATCH,DELETE,HEAD, orOPTIONSWebhook Content-Type: for exampleapplication/jsonortext/plainWebhook Headers: JSON template for custom request headersWebhook Body Template: request body template for non-GET requestsSend Test Webhook: sends a test request using the current page values, including unsaved edits
Template Variables
You can use these variables in the webhook URL, headers, and body template:
{{event}}{{message}}{{title}}{{url}}{{username}}{{content}}{{description}}
Default Behavior
If you only set Webhook URL, Rin uses:
- method:
POST - content type:
application/json - headers:
{} - body:
GET Example
If your webhook provider expects query parameters, you can put variables directly in the URL:
Recommended settings:
- Method:
GET - Body template: leave default or ignore it
Rin will URL-encode query parameter values for GET-style URLs.
JSON POST Example
Use these settings when your endpoint accepts JSON:
Webhook URL
Webhook Headers
Webhook Body Template
Notes
GETandHEADrequests do not send a request body.- Template variables in webhook URLs are URL-encoded before substitution.
Webhook Headersmust be valid JSON after template rendering.- If
Webhook HeadersorWebhook Body Templateis valid JSON, Rin escapes inserted values as JSON strings to avoid breaking the JSON structure. - If the body template is not valid JSON, Rin keeps plain-text substitution behavior unchanged.
- The test button is the fastest way to verify your endpoint before saving.
Troubleshooting
Test webhook failed with JSON error
Your Webhook Headers value is not valid JSON after template rendering. Check commas, quotes, and braces.
The request was sent but my service rejected it
Check:
- HTTP method
Content-Type- authentication headers
- expected JSON field names
- whether your endpoint accepts GET query parameters or only POST bodies
I only want a simple message
Keep the defaults and set only Webhook URL. Rin will send: