Skip to main content
Your webhook endpoint must be publicly accessible.

Setup

import { KadoaClient } from "@kadoa/node-sdk";

const client = new KadoaClient({ apiKey: "your-api-key" });

await client.notification.setupForWorkflow({
  workflowId: "your-workflow-id",
  events: ["workflow_data_change"],
  channels: {
    WEBHOOK: {
      name: "my-webhook",
      webhookUrl: "https://api.example.com/webhooks/kadoa",
      httpMethod: "POST",
    },
  },
});
For API configuration, see the API reference.

Dashboard Setup

  1. Go to Notifications in the sidebar
  2. Click Add ChannelWebhook
  3. Enter your endpoint URL
  4. Save changes
Webhook setup

Authentication

Add custom headers for webhook authentication:
// POST /v5/notifications/channels
{
  "channelType": "WEBHOOK",
  "name": "Authenticated Webhook",
  "config": {
    "webhookUrl": "https://api.example.com/webhooks/kadoa",
    "httpMethod": "POST",
    "auth": {
      "type": "HEADER",
      "headers": {
        "Authorization": "Bearer your-secret-token",
        "X-Custom-Header": "custom-value"
      }
    }
  }
}

Request Format

Every webhook request includes:
HeaderDescription
Content-Typeapplication/json
X-Kadoa-EventEvent type (e.g., workflow_data_change)

Payload Reference

All payloads follow this structure:
{
  "eventType": "event_name",
  "timestamp": "2025-01-15T10:30:00Z",
  "data": { /* event-specific data */ }
}
{
  "eventType": "workflow_data_change",
  "timestamp": "2025-01-15T10:30:00Z",
  "data": {
    "id": "change_123",
    "workflowId": "wf_123",
    "data": [
      { "id": "record-1", "name": "Product A", "price": 29.99 }
    ],
    "differences": [
      {
        "type": "changed",
        "fields": [
          { "key": "price", "value": 29.99, "previousValue": 24.99 }
        ]
      },
      {
        "type": "added",
        "fields": [
          { "key": "id", "value": "record-2" },
          { "key": "name", "value": "New Product" }
        ]
      }
    ],
    "url": "https://monitored-page.com",
    "createdAt": "2025-01-15T10:30:00Z",
    "metadata": {
      "workflowName": "Product Monitor",
      "tags": ["pricing"]
    }
  }
}
EventDescription
workflow_data_changeMonitored data changes. Difference types: changed, added, removed
workflow_finishedWorkflow completes successfully
workflow_failedWorkflow fails. Actions: retry, pause, notify
workflow_validation_anomaly_changeValidation anomalies change

Error Handling

Kadoa retries failed webhook deliveries with exponential backoff:
AttemptDelay
1st retry1 second
2nd retry2 seconds
3rd retry4 seconds
Your endpoint should return a 2xx status code to acknowledge receipt.