HTTP Sink
The HTTP sink allows you to trigger workflow executions via standard HTTP requests. This is the most flexible sink type, supporting any HTTP method and custom paths.
Endpoint Format
Section titled “Endpoint Format”POST/GET/PATCH/DELETE /sink/trigger/http/{app_id}/{path}app_id: Your application’s unique identifierpath: Custom path you configure (must start with/)
Configuration Options
Section titled “Configuration Options”| Field | Type | Description | Required |
|---|---|---|---|
path | string | URL path for the endpoint (e.g., /webhook) | Yes |
method | string | HTTP method (POST, GET, etc.) | Yes |
auth_token | string | Optional Bearer token for authentication | No |
Local Mode
Section titled “Local Mode”When running locally, the desktop app exposes an HTTP server on port 9657:
http://localhost:9657/{app_id}{path}Example Request
Section titled “Example Request”curl -X POST "http://localhost:9657/app_abc123/webhook" \ -H "Content-Type: application/json" \ -d '{"event": "test", "data": {"key": "value"}}'Remote Mode
Section titled “Remote Mode”When deployed to a server, the endpoint is publicly accessible:
https://your-domain.com/sink/trigger/http/{app_id}{path}Example Request
Section titled “Example Request”curl -X POST "https://your-domain.com/sink/trigger/http/app_abc123/webhook" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer your-auth-token" \ -d '{"event": "test", "data": {"key": "value"}}'Authentication
Section titled “Authentication”Bearer Token
Section titled “Bearer Token”If you configure an auth_token, all requests must include it in the Authorization header:
curl -X POST "https://your-domain.com/sink/trigger/http/app_abc123/webhook" \ -H "Authorization: Bearer your-secret-token" \ -d '{"data": "payload"}'Requests without the correct token will receive a 401 Unauthorized response.
No Authentication
Section titled “No Authentication”If no auth_token is set, the endpoint is publicly accessible. Use this for:
- Webhooks from third-party services that can’t add custom headers
- Development/testing environments
Response Format
Section titled “Response Format”The HTTP sink returns a streaming response with execution progress:
HTTP/1.1 200 OKContent-Type: text/event-stream
data: {"type":"progress","run_id":"run_xyz","progress":25}
data: {"type":"progress","run_id":"run_xyz","progress":50}
data: {"type":"progress","run_id":"run_xyz","progress":100}
data: {"type":"complete","run_id":"run_xyz","output":{...}}For non-streaming clients, the final result is included in the last event.
Use Cases
Section titled “Use Cases”Webhook Receiver
Section titled “Webhook Receiver”Receive webhooks from external services like GitHub, Stripe, or Slack:
{ "path": "/github-webhook", "method": "POST", "auth_token": null}API Endpoint
Section titled “API Endpoint”Create a custom API endpoint for your application:
{ "path": "/api/v1/process", "method": "POST", "auth_token": "secret-api-key"}Form Handler
Section titled “Form Handler”Handle form submissions from a website:
{ "path": "/submit-form", "method": "POST", "auth_token": null}Error Handling
Section titled “Error Handling”| Status Code | Description |
|---|---|
200 OK | Request accepted, execution started |
401 Unauthorized | Invalid or missing auth token |
404 Not Found | No matching sink found for path |
500 Internal Server Error | Execution dispatch failed |
Best Practices
Section titled “Best Practices”- Use descriptive paths:
/webhook/github/issuesis better than/hook1 - Enable authentication for production endpoints
- Use HTTPS in production for encrypted communication
- Monitor execution logs to track incoming requests
- Set up rate limiting at the infrastructure level if needed