Webhook triggers let an external system start a routine by sending an authenticated HTTP request to a routine-specific URL.
This is the simplest way to:
• Start a routine from Zapier
• Start a routine from your own app or backend
• Send structured event data into Worklin for processing
How it works
Each routine can have its own webhook endpoint in Routine Settings.
When you enable it, Worklin creates:
• A stable webhook URL
• A secret bearer token
• A default trigger account for the run
When another system sends a valid request to that URL, Worklin starts a routine run using the routine’s existing tools, instructions, and mode.
Where to set it up
• Open a routine in Worklin
• Go to the routine’s Config page
• Find the Webhook section
• Choose a default account
• Optionally allow account_email override
• Click Enable
• Copy the webhook URL and secret
The secret is shown once when you enable or rotate the webhook. Save it in your automation tool or server configuration right away.
Authentication
Webhook endpoints use bearer-token authentication.
Send the secret in the Authorization header:
If the endpoint is disabled, the secret is wrong, or the endpoint does not exist, Worklin returns the same 404 response. This helps prevent endpoint discovery.
Supported request formats
Webhook endpoints accept:
• application/json
• text/plain
Worklin rejects other content types.
JSON requests
For JSON requests, you can optionally provide:
• account_email — choose the trigger account by exact email or synced alias
• data — the payload your routine should inspect
Example:
If data is present, Worklin uses that as the main payload. If data is missing, Worklin uses the full JSON body.
Text requests
For text/plain, send the raw text body directly.
If you want to select an account, include:
Trigger account selection
Every webhook run needs a trigger account. Worklin resolves it in this order:
• Request account_email, if provided and allowed
• The webhook’s configured default account
• Your primary connected account
Important details:
• account_email must match an active connected account or synced alias exactly, ignoring case
• If account override is disabled, Worklin rejects requests that include account_email
• The selected account must still be inside the routine’s existing account scope
• account_email does not expand what the routine can access
What the routine receives
Worklin treats webhook payloads as untrusted input.
Webhook payloads are not inserted as trusted instructions. Instead, the routine starts with a fixed Worklin-authored message explaining that the payload is untrusted data, and includes the payload inline for the routine to inspect.
This helps prevent prompt injection from external systems.
Security model
Webhook triggers are designed for server-to-server use.
Worklin protects them with:
• Per-routine bearer secrets
• Secret rotation
• Rate limiting
• Request-size limits
• Generic 404 responses for invalid endpoints or secrets
• Untrusted-input safety rules
Webhook-triggered routines are treated similarly to incoming-email routines from a safety perspective. If a routine combines untrusted input with autonomous external sending, Worklin may block the webhook until the routine is made safer.
Idempotency and retries
If your sender may retry requests, include:
Worklin uses this to avoid creating duplicate runs for the same webhook delivery.
Zapier setup
You do not need a custom Zapier app. Use Webhooks by Zapier.
Typical setup:
• Add Webhooks by Zapier as the trigger or action step that sends the request
• Choose POST
• Paste your Worklin webhook URL
• Add the Authorization header with your bearer secret
• Set Content-Type to application/json
• Send your event data in the JSON body
Example JSON body:
Example curl
Responses
Common responses:
• 202 — Request accepted and routine run created
• 400 — Invalid request, including bad account_email
• 404 — Unknown endpoint, disabled endpoint, or invalid secret
• 413 — Payload too large
• 415 — Unsupported content type
• 429 — Rate limited
Best practices
• Keep webhook payloads focused and structured
• Start with approval-required mode for routines that take actions
• Use a dedicated default account when the routine is account-specific
• Only allow account_email override when the caller truly needs it
• Rotate secrets if they may have been exposed
• Include an idempotency key when your sender can retry
Related
• Triggers — Overview of all routine triggers
• Security — Safety model and protections