Skip to main content

Webhooks

If you want to customize your Omni deliveries, webhooks may be a good fit. While you can specify some things - like the email sender for email deliveries or the channel message for Slack deliveries - webhooks give you the ability to create context-specific workflows.

For example, you could use a platform like Zapier to catch Omni webhooks and perform different actions based on data values, such as those for CSV-formatted deliveries.

Requirements

To successfully use Omni webhook deliveries, your webhook must return an HTTP 200 status response upon delivery. A different status could cause delivery retries or failures.

Setup

Prior to using webhooks as a delivery destination, you'll need to create a webhook URL for Omni to send requests to. For example, using Zapier's webhook trigger in a Zap will create a webhook URL for you to use.

To create a webhook delivery in Omni, refer to the Creating deliveries guide for instructions.

Webhooks & firewalls

If access to your webhook server is restricted, you'll need to whitelist Omni's IP addresses to ensure deliveries are successful.

Omni's IP addresses can be found on any database connection's page, accessed by navigating to Settings > Connections and clicking a connection. All IP addresses on this page must be included in the allowlist.

Request formats

The type of delivery Omni sends determines the format the request body will take:

Omni will send a POST request with a JSON object in the body that contains:

{
"url": "<dashboard_url>"
}

All file formats

Omni will send a POST request with the file content directly in the body using streaming delivery:

  • Headers:
    • Content-Type - Appropriate MIME type (text/csv, application/json, application/pdf, image/png, etc.)
    • Content-Length - Size of the file in bytes (when available)
    • X-Filename - Original filename for reference
  • Body: Raw file content streamed directly

Note: For dashboard deliveries with multiple queries, CSV content will be delivered as a ZIP file with Content-Type: application/zip.