Dashboard

Workflow Destinations

Deliver workflow results to external systems via webhooks, email, or storage. Destinations are configured per workflow and fire after each successful run.

Webhook Destinations

Send workflow results as a JSON POST request to any URL.

Setting Up a Webhook

  1. Open your workflow in the editor
  2. Click Destinations in the toolbar
  3. Add a webhook URL
  4. Optionally add custom headers (e.g., for authentication)
  5. Save

Webhook Payload

POST https://your-server.com/webhook/scrayle

Headers:
  Content-Type: application/json
  X-Scrayle-Workflow: wf_abc123
  X-Scrayle-Run: run_xyz789

Body:
{
  "workflowId": "wf_abc123",
  "runId": "run_xyz789",
  "status": "completed",
  "startedAt": "2025-01-15T10:00:00Z",
  "completedAt": "2025-01-15T10:02:30Z",
  "data": [
    { "title": "Product 1", "price": "$29.99" },
    { "title": "Product 2", "price": "$49.99" }
  ]
}

Via the API

POST https://api.scrayle.com/api/v1/workflows/{workflowId}/destinations

Headers:
  x-api-key: YOUR_API_KEY
  Content-Type: application/json

Body:
{
  "type": "webhook",
  "config": {
    "url": "https://your-server.com/webhook/scrayle",
    "headers": {
      "Authorization": "Bearer your-token"
    }
  }
}

Retry Behavior

Webhook deliveries are retried up to 3 times with exponential backoff if the destination returns a non-2xx status code. After all retries fail, the delivery is marked as failed and visible in the run history.

Testing Destinations

Use the Test button in the destination configuration to send a sample payload to your endpoint. This helps verify that your webhook is properly configured before scheduling real runs.