webhooks.tailscale() verifies the HMAC-SHA256 signature Tailscale sends in tailscale-webhook-signature on every request.
/trigger/tailscale.ts
Set up Tailscale
- Start
trigger devor deploy, then copy the endpoint’s Webhook URL from the Webhooks page. - On the Webhooks page of the Tailscale admin console, select Add endpoint, enter the webhook URL, and choose the events your subscribers need. This needs the Owner, Admin, Network admin or IT admin role.
- Tailscale shows the webhook secret once, right after the endpoint is added. Copy it then, and choose Set signing secret on the Trigger.dev endpoint.
- Use the Tailscale endpoint’s menu, Test endpoint > Send test event, or use the endpoint’s Test tab, and check the endpoint’s Deliveries tab. See Verify the connection if nothing arrives.
Batched events
Each request body is a JSON array of events, and Tailscale can batch several into one request. Filters match an event anywhere in the array withevent any ( ... ), and a handler should process every event in the array.
