> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.drazill.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.drazill.com/_mcp/server.

# Automation (Zapier & Make)

Drazill's webhook system is reachable from Zapier and Make, so "when X happens, do Y"
does not require writing a consumer. Both connectors are the same three triggers and
one search over the same public endpoints; each delivery is verified against
[the signature scheme](/webhooks/signing) before your workflow runs.

## Triggers

| Trigger                 | Fires on                                     | Event             |
| ----------------------- | -------------------------------------------- | ----------------- |
| Order Filled            | one of your orders fills                     | `order.filled`    |
| Market Resolved         | a market settles, naming the winning outcome | `market.resolved` |
| Price Alert Triggered   | one of your price alerts fires               | `alert.triggered` |
| Platform Status Changed | Drazill's published status changes           | `status.changed`  |

These are **instant** triggers, not polled. Connecting a workflow registers a webhook
endpoint on your account (`POST /api/v1/webhooks`) pointed at the platform's target
URL; disconnecting deletes it (`DELETE /api/v1/webhooks/{endpoint_id}`).

## Search

| Search      | Does                                                               |
| ----------- | ------------------------------------------------------------------ |
| Find Market | Look up a market by exact slug, or search titles and descriptions. |

## Recipes

Every recipe below runs on what exists today. The trigger, the event, and the
prerequisites are stated exactly; nothing here is aspirational.

### Log every fill to a spreadsheet

|                      |                                                                                                                                                                    |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Trigger**          | Order Filled (`order.filled`)                                                                                                                                      |
| **Action**           | Your spreadsheet app's "add row" step                                                                                                                              |
| **Fields available** | `order_id`, `market_id`, `outcome_id`, `side`, `quantity`, `filled_quantity`, `average_fill_price`, `status`, plus `created_at` and `event_type` from the envelope |
| **Prerequisites**    | An API key with `webhooks:read` and `webhooks:write`. Fills only arrive for orders placed on the environment the connection points at.                             |

Money-shaped fields arrive as **decimal strings** (`"0.62"`), never floats. Most
spreadsheet steps will store them as text — coerce on the way in if you plan to sum
them.

### Post resolutions to a team channel

|                      |                                                                                                                                                                                                                                                   |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Trigger**          | Market Resolved (`market.resolved`)                                                                                                                                                                                                               |
| **Action**           | Your chat app's "send message" step                                                                                                                                                                                                               |
| **Fields available** | `market_id`, `slug`, `title`, `status`, `winning_outcome_id`, `resolved_at`, `closes_at`, `total_volume`                                                                                                                                          |
| **Prerequisites**    | The market's `title` and `slug` are in the event, so a message can be written from the trigger alone. The winning outcome arrives as an **id**; to post its name, add a **Find Market** step on the event's `slug` and read the matching outcome. |

### Email yourself when a price alert fires

|                      |                                                                                                                                     |
| -------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| **Trigger**          | Price Alert Triggered (`alert.triggered`)                                                                                           |
| **Action**           | Your email step                                                                                                                     |
| **Fields available** | `alert_id`, `alert_type`, `market_id`, `outcome_id`, `target_price`, `threshold`, `current_price`, `direction`                      |
| **Prerequisites**    | **Create the alert first, in the Drazill app or developer dashboard.** The connectors cannot create one — see the limitation below. |

### Watch a market you do not have an order in

|                   |                                                                                                                 |
| ----------------- | --------------------------------------------------------------------------------------------------------------- |
| **Trigger**       | Your platform's Schedule trigger                                                                                |
| **Action**        | **Find Market** on the slug, then a filter on the outcome's `price`                                             |
| **Prerequisites** | None beyond a key. This is a public read, so it costs a request against your key's rate limit and nothing else. |

Use this when you want a threshold check on a market you hold no position in — the
webhook triggers above are scoped to *your* orders and alerts.

### Announce a platform status change

|                      |                                                                                                                                                  |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Trigger**          | Platform Status Changed (`status.changed`)                                                                                                       |
| **Action**           | Your chat app's "send message" step                                                                                                              |
| **Fields available** | `overall`, `previous_overall`, `generated_at`, `schema_version`, and `components[]` with each component's `name`, `status` and `previous_status` |
| **Prerequisites**    | None beyond a connection. This event is a **broadcast** — it is not scoped to your account, so you receive it whether or not you trade.          |

Edge-triggered: one event per transition, not a heartbeat, so a Zap that posts on every
event will not spam a channel while a component stays degraded. Both the previous and
current state are in the payload, so a message can read "Wallet & Payments:
operational → degraded" without your workflow keeping any history of its own.

## What the connectors deliberately cannot do

> **Warning**
>
> **There is no "create price alert" action, on either platform.** Creating an alert is
> a session-authenticated action — an API key cannot call `POST /api/v1/price-alerts`
> and receives a `403`. Rather than ship a step that always fails, the connectors read
> alerts and do not create them. Create alerts in the app or dashboard; the trigger
> then works.

There are **no actions at all**, for the same reason extended: every other write on
the platform moves real money, which does not belong behind an automated trigger with
no human in the loop.

A status-change trigger was missing for a similar reason when these connectors first
shipped — the platform published no `status.changed` event, so a subscription naming
it was rejected. It publishes one now, and the trigger exists.

## Setting up a connection

#### Mint a key with the right scopes

The instant triggers need **`webhooks:write`**, which is a write scope and is
therefore *not* granted by default — request it when you create the key.
`webhooks:read`, `markets:read` and `data:read` are on every key already. See
[Get an API key](/get-a-key).

#### Choose an environment

Connections default to **Staging** (`https://staging.drazill.com`, `drzl_test_`
keys). Build and test there. Switching a workflow to Production means it acts on
real-money activity.

#### Test the trigger before a real event happens

Set the trigger's **Event mode** to *No* to create a sandbox endpoint, then send a
test delivery from the developer dashboard. Set it back to *Yes* for real events —
an endpoint is one or the other, never both.

## Delivery guarantees worth designing around

* **Retries.** A delivery your workflow does not acknowledge with a `2xx` is retried on
  a fixed schedule before being dead-lettered. Design the action to be safe to run
  twice — dedupe on the event `id`, which is stable across retries and replays.
* **Signature freshness.** Deliveries older than 300 seconds are rejected by the
  connectors, so a workflow paused for a long time will not process a backlog of stale
  events on resume.
* **Secret rotation.** During the 24-hour grace window after a rotation, the signature
  header carries two candidates and either verifies. Your workflow needs no change.

Full contract: [Webhook delivery](/webhooks/delivery) and
[Signing](/webhooks/signing).

## Installing the connectors

> **Note**
>
> Neither connector is listed in a public directory yet. That submission is a
> deliberate, separate decision and it has not been made — so there is no one-click
> install, and this page does not imply one.

Both are available today as private apps you deploy into your own account:

* **Zapier** —
  [`integrations/zapier`](https://github.com/ishreet-fan-club/drazill/tree/main/integrations/zapier).
  `zapier-platform register`, `zapier-platform push`, then share the private invite
  link. A private app is fully functional for invited users.
* **Make** —
  [`integrations/make/drazill.app.json`](https://github.com/ishreet-fan-club/drazill/tree/main/integrations/make),
  importable into a custom app in your own Make organisation.

Each package's README covers the steps end to end.