+1 (726) 227-3549

Ingesting Webhook Events with Fivetran: Setup, Payload Parsing and Replay Safety

Plenty of useful data never sits in a database or a REST API you can poll: payment events, form submissions, support-ticket changes, product telemetry from internal services. These systems push events to you. Fivetran's webhook-based ingestion lets you receive those pushes and land them in your destination alongside everything else, without running your own receiver. This tutorial walks through setup, parsing and the failure modes we see most often.

Connector options and column layouts change over time. Confirm details against the current Fivetran documentation before you build.

When webhooks are the right tool

  • The source pushes events and offers no good polling API, or its API is rate-limited.
  • You need event-level history (every state change), not just the current record.
  • The volume is moderate. For very high-volume streams, a streaming source such as Kafka or Kinesis is usually a better fit.

If a maintained connector already exists for the source, prefer it. Webhooks give you raw events, and you own the modeling.

Step 1: Create the connection

  1. In the Fivetran dashboard, add a new connection and choose the Webhooks option.
  2. Pick the destination and a schema name that reflects the source, for example stripe_events rather than webhooks.
  3. Fivetran generates a unique endpoint URL. Treat that URL as a secret.
  4. Paste the URL into the sending system's webhook settings and send a test event.

Step 2: Check what landed

Events arrive as JSON payloads. Expect the raw payload in a single semi-structured column plus Fivetran metadata columns such as _fivetran_synced. Query a few rows first and look at the real shape before you write any models.

select _fivetran_synced, payload
from stripe_events.events
order by _fivetran_synced desc
limit 20;

Column names differ by destination and connector version, so adjust the query to match your table.

Step 3: Parse in a staging model

Keep the raw table untouched and build a staging view that extracts the fields you need and casts types explicitly. Here is a Snowflake-style example:

create or replace view analytics.stg_stripe_events as
select
  payload:id::string          as event_id,
  payload:type::string        as event_type,
  to_timestamp(payload:created::number) as event_created_at,
  payload:data:object         as object_payload,
  _fivetran_synced
from stripe_events.events;

Use the equivalent JSON functions in BigQuery, Databricks or Postgres. Extract only the keys you need, and leave the rest in the payload column so a new field never forces a re-ingest.

Step 4: Make it replay-safe

Senders retry. Most webhook systems deliver at least once, so duplicates are normal, and events can arrive out of order.

  • Deduplicate on the event ID. Use the sender's event ID, not your load timestamp.
  • Order by the event's own timestamp, not arrival time, when you rebuild current state.
  • Keep the raw table append-only and do all deduplication downstream.
select *
from analytics.stg_stripe_events
qualify row_number() over (
  partition by event_id order by _fivetran_synced desc
) = 1;

Step 5: Verify authenticity

An endpoint URL that leaks lets anyone inject events. Where the sender signs its payloads, check what the current connector supports for signature verification. If you can't verify signatures, add a downstream sanity check: reject event types you don't expect and alert on volume spikes. Rotate the endpoint if you suspect exposure.

Step 6: Monitor

Silence is the hardest failure to notice. A broken sender looks identical to a quiet day.

  • Alert when no new rows have arrived within a window sized to normal traffic, using a freshness test in dbt or a scheduled query.
  • Track daily event counts per type and alert on sudden drops.
  • Alert on parsing failures, such as null event IDs in staging.

For general pipeline alerting, see our tutorial on observability with the Platform Connector.

Common pitfalls

SymptomLikely cause
Duplicate events downstreamSender retries with no dedupe on event ID
Missing events after an outageSender gave up retrying; backfill from the source's event log or API
Schema surprisesSender added fields; parse defensively and keep raw payload
Test events polluting productionSandbox and live senders pointing at the same endpoint; use separate connections

Need a hand?

SyncSpur designs and rescues Fivetran pipelines, including the awkward sources with no off-the-shelf connector. If you'd like help with event ingestion, get in touch.