Baserow webhooks in production: duplicates, ordering, retries and timeouts

Published · Updated

This guide covers the problems Baserow webhooks cause in production and how to handle each one. What Baserow sends and how to set up a webhook is on the Baserow webhooks overview, every event type is on Baserow webhook events, and the header check is on Verify Baserow webhooks.

Baserow publishes its retry, timeout and deactivation values only as self-hosted defaults, which an administrator can change. Those are the figures below, and Baserow Cloud's may differ. Where this guide describes behaviour from Baserow's open-source code rather than its docs, it says so.

At a glance

ProblemWhat to doWith Event Gateway
TimeoutsReturn 200 straight away; process in a background jobAnswers Baserow on arrival, so its queue doesn't back up
DuplicatesKey on event_id and batch_id togetherCan deduplicate on both fields
OrderingRead the row from the API when order mattersLogs every event, so you can see what arrived when
RetriesStay available; reactivate the webhook and reconcile after an outageKeeps answering while your service is down, and replays events
Choosing eventsSelect only what you process; route on the body's event_typeFilters and routes events by type
TestingUse Trigger test webhook, then real table changesForwards to localhost and replays past events
Other limitsAccept the webhook's method; treat the header as the only credentialChecks your secret header; keeps Baserow's URL stable

Baserow webhook timeouts and slow handlers

Return 200 as soon as the header checks out, then do the work in a background job. Self-hosted Baserow waits 5 seconds by default. Baserow doesn't publish the Cloud timeout.

Why it happens: Baserow's docs say webhook calls are handled one at a time, so a slow handler delays every later event as well as risking a timeout. On Baserow Cloud, a long enough backlog loses events: it keeps at most 5,000 pending calls per webhook and drops the rest. Self-hosted Baserow has no such limit by default. The docs say success means 200 OK. The open-source code accepts any status below 400, but return 200 to match the docs.

Fix it in your handler:

  1. Check the header, store the call and return 200 straight away.
  2. Process it in a background job. See why to process webhooks asynchronously.
  3. Split busy tables across several webhooks with narrower event selections, because each webhook has its own queue.

With Event Gateway: Hookdeck accepts each call as soon as it arrives, so Baserow's queue drains at Hookdeck's speed rather than your service's. Hookdeck then delivers to your service at a max delivery rate you set.

Duplicate Baserow webhooks

Baserow retries failed calls, so the same call can arrive twice. Key on event_id and batch_id together, because the batches of one event share an event_id.

Why it happens: A handler can finish its work and still miss the timeout, and the retry repeats the same event_id. Separately, Baserow's open-source code splits two kinds of call when they cover more rows than the batch size, which is 200 by default on self-hosted Baserow: view.rows_entered, and rows.updated calls caused by a change in a linked table. Those calls share an event_id and carry batch_id, offset, batch_size and total_count. Deduplicating on event_id alone drops every batch after the first. A rows.* call about a change in the webhook's own table goes out whole.

Fix it in your handler:

  1. Store event_id and batch_id before processing, in a table with a unique constraint. A missing batch_id means a single call.
  2. Make every handler idempotent: the same result however many times it runs.
  3. Use total_count and offset to check you received every row. By default, self-hosted Baserow stops after 5 batches and notifies the workspace admins that the payload was too large, and the remaining rows aren't sent.
  4. If one handler serves several webhooks, add webhook_id to the key, because an event gets one event_id across every webhook it reaches.

With Event Gateway: Hookdeck's deduplication can use several fields, so you can deduplicate on event_id and batch_id together.

Out-of-order Baserow webhooks

Baserow doesn't document an ordering guarantee. Calls go one at a time, but a retried call can land after a newer one, so read the row from the API when order matters.

Why it happens: In Baserow's open-source code, a failed call waits to retry while the next queued call goes ahead, and the retry can end up behind others in the queue. The body has no timestamp to compare, because Baserow's envelope carries only IDs and the event type.

Fix it in your handler:

  1. Treat items as what the row looked like when the event fired.
  2. Fetch the current row from the Baserow API by its ID before acting on a change that depends on order.
  3. Add a Last modified field to the table if you want a time to compare. Row events send the whole row, so the field's value comes with it.

With Event Gateway: Every call is stored in Hookdeck with its body and arrival time, so you can see what arrived when, and replay events after fixing your handler.

Baserow webhook retries and deactivation

Baserow's docs say failed calls are retried "a limited number of times", with no Cloud figures. On self-hosted defaults, nine failed attempts in a row deactivate the webhook, which takes about four minutes.

Why it happens: Self-hosted Baserow defaults to 8 retries per call and 8 consecutive failures before disabling a webhook. In its open-source code, retries wait 1, 2, 4 and so on up to 128 seconds, 255 seconds in all. The failure count goes up on every attempt rather than every event, so a single failing event's nine attempts are enough, and any success resets it. Baserow then notifies the workspace admins. A deactivated webhook sends nothing, its queued calls are cleared, and changes made while it's off are never sent.

Fix it in your handler:

  1. Keep the endpoint available through deploys, and return 200 for events you ignore.
  2. Watch for the deactivation notification, and turn the webhook back on once the receiver is healthy.
  3. After an outage, check the webhook's Call log, then read the affected rows from the Baserow API. Baserow documents no resend, and self-hosted Baserow keeps only 10 log entries per webhook by default.

With Event Gateway: Hookdeck stays up when your service doesn't, so Baserow keeps getting successful responses and has no reason to deactivate the webhook. Hookdeck delivers to your service with retries you configure and lets you replay any event.

Choosing which Baserow events to handle

Select only the events you process, and route on the body's event_type. Send everything covers the standard events but leaves out view.rows_entered.

Why it matters: The full list is on Baserow webhook events, and a few of them behave differently from what the names suggest:

  • Conditional row update is rows.updated limited to the fields you choose, with no event type of its own.
  • Row enters view sends view.rows_entered. In Baserow's open-source code it needs the enterprise advanced webhooks feature and a chosen view, and its rows arrive in rows rather than items.
  • rows.deleted carries only row_ids, not the rows, even though the docs describe webhooks as sending the row's complete data.
  • rows.updated can fire because a linked row changed in another table. In the open-source code, that call has no old_items, and its X-Baserow-Event header names the event that fired in the other table, such as rows.created, while the body says rows.updated.
  • row.created, row.updated and row.deleted are deprecated, and the current code no longer registers them. Move any webhook still set to them to the rows.* types.

Fix it in your handler:

  1. Read event_type from the body, not the header, and return 200 for anything you don't recognise.
  2. Don't assume old_items is there on rows.updated.
  3. Keep your own copy of any data you need after a delete, because row_ids is all you get.
  4. Expect row keys like field_123, unless the webhook has Use field name instead of id turned on. Then keys are field names, and renaming a field changes them.

With Event Gateway: Hookdeck filters and routes events by type or any other property, so one Baserow webhook can feed several services and each gets only what it handles.

Testing Baserow webhooks

Use Trigger test webhook to check that your endpoint is reachable, then make real changes in the table to see real payloads.

Why it matters: A test call uses placeholder data, such as a row with an id of 0, so it proves the connection rather than your field handling. Baserow's docs include just one example body, for view.created. The hub's events page has payloads for the current events, most of them built from Baserow's own tests.

Test your handler:

  1. Click Trigger test webhook, then check the response Baserow shows.
  2. Save the webhook, and add, edit and delete a row. Check each call in the Call log.
  3. Baserow Cloud can't reach localhost, and self-hosted Baserow refuses private addresses unless an administrator allows them, so use a tunnel.
  4. To see the exact headers and body before you write any code, point the webhook at Hookdeck Inspect.

With Event Gateway: The Hookdeck CLI receives webhooks on your machine without a public server, and you can replay past events to your handler as you change it.

Other Baserow webhook limits

Plan for a method you choose per webhook, a static header instead of a signature, and no published IP addresses.

The method is configurable. A webhook set to PUT or GET gets 404 or 405 from a receiver that accepts only POST, and those count as failures. Baserow sends the JSON body whatever the method, even on GET. Use POST unless the receiving system needs something else, and register a route for each method your webhooks use.

No signature. Your custom header shows who sent a call and says nothing about its body. It can't detect a modified payload, and with no signed timestamp a captured request can be replayed and still pass. Use HTTPS and a long random value. The check itself is on Verify Baserow webhooks.

Self-hosted limits. By default, a table can have 20 webhooks. An administrator can change this, along with the batch and call log limits above.

No published IPs. Baserow Cloud's webhooks page names no source IP addresses, so you can't allowlist them.

With Event Gateway: Create a source with the Baserow type and enter your header's name and exact value, including any Bearer prefix. The source pre-selects POST but doesn't manage the method, so if your webhook uses GET, PUT, PATCH or DELETE, allow that method on the source too. Otherwise those requests are refused. The URL Baserow holds also stays the same while you move or change the service behind it.

Keep an outage from switching off your Baserow webhook.

Event Gateway checks your secret header, answers Baserow straight away and queues each event, then delivers it to your service with retries you configure.

Not affiliated with Baserow. Facts are compiled from public sources and linked inline.