Skip to main content

Overview

Send data to HTTP endpoints as JSON payloads.

Configuration

sinks:
  my_webhook_sink:
    type: webhook
    from: my_transform
    url: https://api.example.com/endpoint
    one_row_per_request: true | false
    headers:
      Authorization: Bearer YourSecretToken
      Content-Type: application/json
Turbo pipeline webhook sinks do not yet support Goldsky’s native secrets management. You must include sensitive values like API keys directly in your pipeline configuration.

Parameters

type
string
required
Must be webhook
from
string
required
The transform or source to read data from
url
string
required
The HTTP endpoint URL to send data to
one_row_per_request
boolean
default:"false"
If true, sends each row individually. If false, sends batches of rows.
headers
object
HTTP headers to include with each request. Useful for authentication or custom headers required by your endpoint.

Request Format

Data is sent as JSON: Single row (one_row_per_request: true):
{
  "id": "abc123",
  "address": "0x...",
  "value": "1000000",
  "timestamp": "2024-01-01T00:00:00Z"
}
Batch (one_row_per_request: false):
[
  {
    "id": "abc123",
    "address": "0x...",
    "value": "1000000"
  },
  {
    "id": "def456",
    "address": "0x...",
    "value": "2000000"
  }
]

Example: Send High-Value Transfers to API

transforms:
  high_value_transfers:
    type: sql
    primary_key: id
    sql: |
      SELECT *
      FROM erc20_transfers
      WHERE CAST(value AS DECIMAL) > 1000000000000000000000

sinks:
  webhook_alerts:
    type: webhook
    from: high_value_transfers
    url: https://alerts.example.com/high-value-transfer
    one_row_per_request: true
The webhook sink includes retry logic with exponential backoff for transient failures. Configure timeouts on your endpoint accordingly.