Documentation

Webhooks

Trigger scripts via HTTP requests. Integrate with GitHub, Slack, or any service that can send webhooks.

Creating Webhooks

  1. Open a script and click Webhook
  2. Enable the webhook
  3. Copy the webhook URL

Webhook URL format

https://your-domain.com/webhook/<token>/

Triggering Webhooks

Send a POST request to the webhook URL:

curl -X POST https://your-domain.com/webhook/abc123/ \
  -H "Content-Type: application/json" \
  -d '{"event": "deploy", "branch": "main"}'

Accessing Webhook Data

The webhook payload is available in your script:

import json
import os

# Get webhook payload from environment
payload = json.loads(os.environ.get('WEBHOOK_PAYLOAD', '{}'))

print(f"Event: {payload.get('event')}")
print(f"Branch: {payload.get('branch')}")

Common Use Cases

  • GitHub: Run tests on push events
  • Slack: Trigger scripts via slash commands
  • Stripe: Process payment events
  • Custom: Integrate with any HTTP-capable service