# Automations

Source: https://developers.weerom.com/docs/use-cases/automations

> n8n, Make or Zapier, started by a WeerOm webhook or on a schedule, with an HTTP request to WeerOm and your own steps after it.

**For** a shop or an agency that wires tools together without a server of its own: a message in the staff chat for every new booking, a row in a sheet for every cancellation, a block for a customer who missed two appointments.

The flow starts when WeerOm sends a webhook, a few seconds after a booking or a payment changes. Where the shop cannot add an address, it starts on a schedule and asks WeerOm what changed since the last run. The steps after it are the tool's own: post a message, add a row, send a mail. A flow that changes something in WeerOm sends a request with a write key.

| What | You need |
| --- | --- |
| Key | **Read key** A read key for a flow that only reads. **Write key** A write key for a flow that cancels, moves or blocks. |
| Webhook | An address from the tool's webhook trigger, which the shop adds in its admin. See [Webhooks](https://developers.weerom.com/docs/webhooks#add-an-address). |
| Endpoints | `GET /bookings/{id}` and `GET /payments/{id}` after a webhook. `GET /bookings`, `GET /customers` or `GET /payments` with a time filter on a schedule. `PATCH /customers/{id}` and the booking writes for a flow that changes things. |
| Tool | n8n, Make, Zapier or anything with a webhook trigger or a schedule, and an HTTP request step. |

What we checked in each tool's documentation on 2026-11-21 and 2026-11-22:

- **n8n** has a [Webhook](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.webhook/) node with a **Raw Body** option, and a [Crypto](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.crypto/) node with an **Hmac** action. It also has a [Schedule Trigger](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.scheduletrigger/) node and an [HTTP Request](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.httprequest/) node that sends headers.
- **Make** has a [Webhooks app](https://apps.make.com/gateway) with a **Custom webhook** trigger. Its advanced settings can pass the request headers on. Make also has an [HTTP app](https://apps.make.com/http) with a "Make a request" module. We did not check how Make schedules a scenario.
- **Zapier** has [Webhooks by Zapier](https://help.zapier.com/hc/en-us/articles/8496288690317) with a **Catch Raw Hook** trigger, which passes the body unparsed with its headers, up to 2MB. [Schedule by Zapier](https://help.zapier.com/hc/en-us/articles/8496288648461) starts a Zap on an interval. We did not check which Zapier step sends a GET request with your own header.

## Start a flow from a webhook

1. Add the tool's webhook trigger. It gives you an HTTPS address.
2. The shop pastes that address under **Settings**, **Features**, **Connections**, **Updates for other software**, and switches on the events the flow needs.
3. The shop presses **Send a test**. The tool receives a message of type `test`, which you can use to map the fields.
4. Let the trigger answer at once. In n8n, set **Respond** to **Immediately**. WeerOm waits 10 seconds for a 2xx and then counts the attempt as failed.

The message is `{ "id", "type", "created_at", "data": { "object" } }`. `data.object` is the whole booking or payment. [Webhooks](https://developers.weerom.com/docs/webhooks#the-message) shows both.

### Trust the message, or read it again

Anyone who learns the address can post to it. The signature in `WeerOm-Signature` proves WeerOm sent the message. Checking it needs the raw body and an HMAC with the shop's secret, which most flow tools make hard.

The safe pattern for a flow tool: treat the message as a tip. Take `data.object.id` and read the object again with `GET /bookings/{id}` or `GET /payments/{id}` and a read key. Act on what the API answers. A forged message then costs one request and changes nothing, because an unknown id answers 404.

In n8n, you can check the signature itself instead. Turn on **Raw Body** in the Webhook node, split the header into `t` and `v1`, and compute an **Hmac** with SHA256 in a Crypto node over `t`, a dot and the raw body, with the shop's secret. Compare the result with `v1`, and refuse a `t` more than 300 seconds old. We did not build this flow end to end. [Verify the signature](https://developers.weerom.com/docs/webhooks#verify-the-signature) has the rules and a test value.

### Skip a message you have seen

A message can arrive twice. Keep the `id` of each message the flow handled, in a sheet or the tool's data store, and stop when it is there already.

## Start a flow on a schedule

### The request

Every tool asks for the same things. Fill them in like this:

| Setting | Value |
| --- | --- |
| Method | `GET` |
| URL | `https://api.weerom.com/v1/bookings` |
| Header | `Authorization` with the value `Bearer wo_live_...`. Put the key in the tool's credentials store if it has one, not in the step's text. |
| Query | `updated_after` set to the run's start time less 16 minutes, as ISO 8601: `2026-11-21T09:44:00Z`. `limit` set to `100`. `order` set to `asc`. |

The answer is a list. Its `data` holds the bookings, and the next step loops over them.

```bash
curl "https://api.weerom.com/v1/bookings?updated_after=2026-11-21T09:44:00Z&limit=100&order=asc" \
  -H "Authorization: Bearer $WEEROM_KEY"
```

### Why 16 minutes for a 15-minute schedule

A tool's schedule drifts by a few seconds. A window one minute longer than the schedule overlaps the run before it, so no change falls between two runs. The cost is that a change near the edge can come twice. Make the step after it safe to repeat: update a row by the booking's `id` instead of adding one, or remember which `id` and `updated_at` you already posted.

A tool that stores state between runs can remember the highest `updated_at` it saw and send that instead. [Pagination](https://developers.weerom.com/docs/pagination#sync-only-what-changed) has that loop.

If `has_more` is `true`, more than 100 bookings changed in 15 minutes. That is rare for one shop. Ask again with `cursor` set to `next_cursor`, or run the flow more often.

## Flows to start from

| When | Webhook | Or on a schedule, ask for | Then |
| --- | --- | --- | --- |
| A new booking | `booking.created` | `GET /bookings?updated_after=...` and keep those with `created_at` inside the window | Post the time, `service.name` and `customer.name` to the staff chat. |
| A cancellation | `booking.cancelled` | `GET /bookings?updated_after=...&status=cancelled` | Add a row with `cancel_reason` to a sheet. |
| A payment | `payment.completed` | `GET /payments?paid_after=...` | Post the day's total to the owner. |
| A second no-show | `booking.updated` with `status` `no_show`, then `GET /customers/{id}` for `customer.id` | `GET /customers?updated_after=...` | Keep customers with `no_show_count` of 2 or more and `blocked: false`, and block them with a write key, below. |

## Changing something in WeerOm

A step that changes something sends a write key and an `Idempotency-Key`. Build the idempotency key from the object, so a flow that runs twice does it once:

| Setting | Value |
| --- | --- |
| Method | `PATCH` |
| URL | `https://api.weerom.com/v1/customers/{id}`, with the customer's `id` from the step before |
| Headers | `Authorization: Bearer wo_live_...`, `Content-Type: application/json`, `Idempotency-Key: block-{id}` |
| Body | `{ "blocked": true }` |

A blocked customer can no longer book online. Bookings they already have stay. The same pattern works for `POST /bookings/{id}/cancel` with `{ "reason": "..." }`.

## How often

A webhook flow runs once per change, a few seconds after it. Reading the object again is one request per run.

A scheduled flow every 15 minutes is 4 requests an hour, against 120 a minute for the key. Five flows on one key stay far under the limit. Pick the schedule when the shop cannot add an address, or when a flow needs a total over time rather than each change.

## Limits

- **No webhook for customers.** A change to a customer sends nothing. A flow about customers runs on a schedule, or starts from the booking event that changed them, as the no-show flow does.
- **Lost messages.** WeerOm tries a message 7 times over about 33 hours. A flow tool that was off for longer misses it. Run a scheduled flow once a day as well if nothing may be missed.
- **What a write can do.** The API makes, cancels and moves bookings and renames or blocks customers. It cannot note a payment, change a booking's service or make a customer without a booking.
- **One key per tool.** If the flow tool leaks the key, remove that one key in the admin and the rest keep working.
