# Get told in Slack, or in your own tools, when something moves

> Surfacedd posts events to Slack or to any https endpoint, such as Zapier, Make or n8n, when a run completes or fails, or when visibility, Google top-10 rankings or a local grid change significantly. JSON bodies carry an HMAC-SHA256 signature. Deliveries are free, retried three times, and sent while the app is running.

Source: https://surfacedd.com/docs/integrations/webhooks-and-slack · Updated 2026-11-20

Open **Settings › Integrations** and find **Webhooks and Slack**. Each webhook has a name, a URL, the events it receives and the brands it covers. The list shows **Send test**, an on/off switch, **New signing secret** and delete for each one, and **Recent deliveries** shows every attempt with its tries and HTTP code. Webhooks cost nothing. 

## Add a Slack webhook

1. In Slack, go to **Apps › Incoming Webhooks › Add to channel**, pick the channel and copy the **Webhook URL**. It starts with `https://hooks.slack.com/services/`.
2. In Surfacedd, choose **Add a webhook** and pick Slack.
3. Paste the URL, give it a name (for example the client's name), choose the events and the brands (**All brands** or specific ones).
4. Choose **Send test**. A message should appear in the channel.

Slack gets a formatted message with the numbers: the brand, what happened and the figures behind it. Slack URLs aren't signed; Slack's own URL is the secret, so keep it private. 

## Add a JSON webhook (Zapier, Make, n8n or your own endpoint)

1. Create a "catch hook" or webhook trigger in your tool and copy its URL. It must be `https://`; `http://` works only for `localhost`, for testing.
2. Choose **Add a webhook**, pick JSON, paste the URL, name it and choose events and brands.
3. Copy the **Signing secret**. It's shown once. Use **New signing secret** later if you lose it or want to rotate it.
4. Choose **Send test** and check that your endpoint returns a 2xx status.

## Events

| Event | Sent when |
|---|---|
| `run.completed` | Any run finishes |
| `run.failed` | Any run fails |
| `significant_change` | A report's visibility moved significantly (the same like-for-like rule as the app's change arrows); a rank check moved keywords into or out of Google's top 10; or a local grid dropped (top-3 share down 15 points or more, or average rank 2 or more places worse) |

A significant change uses the same test as the app, so a webhook fires only when the app itself would mark a change, not on run-to-run noise. See [ranges and samples](/docs/concepts/ranges-and-samples).

## Payload and headers

Every JSON delivery is a `POST` with this body:

```json
{
  "id": "…",
  "type": "significant_change",
  "created_at": "2026-11-20T09:00:00Z",
  "brand": { "id": "…", "name": "…" },
  "title": "…",
  "data": { … }
}
```

`id` is the delivery id, `brand` can be `null` when an event isn't tied to one brand, and `data` holds the numbers for that event. **Send test** delivers an event of type `test`. Three headers come with it: 

| Header | Contents |
|---|---|
| `Surfacedd-Event` | The event type |
| `Surfacedd-Delivery` | The delivery id; use it to ignore a repeat if a retry reaches you twice |
| `Surfacedd-Signature` | `t=<unix seconds>,v1=<hex>`: an HMAC-SHA256 of `"<t>.<raw body>"` with your signing secret |

## Verify the signature

Verify on the raw request body, before any JSON parsing, and reject requests older than five minutes. In Node.js:

```js
import crypto from "node:crypto";

export function verify(secret, header, rawBody) {
  const p = Object.fromEntries(header.split(",").map((x) => x.split("=")));
  if (!p.t || !p.v1) return false;
  if (Math.abs(Date.now() / 1000 - Number(p.t)) > 300) return false;
  const mac = crypto.createHmac("sha256", secret).update(`${p.t}.${rawBody}`).digest("hex");
  return mac.length === p.v1.length && crypto.timingSafeEqual(Buffer.from(mac), Buffer.from(p.v1));
}
```

The same scheme is shown in the app under **For developers**.

## Delivery and retries

| Step | When |
|---|---|
| Written to the delivery log | Before anything is sent |
| Try 1 | At once |
| Try 2 | 1 minute later |
| Try 3 | 5 minutes after that |
| Failed | After 3 failed tries; a notice goes to your inbox |

A try counts as delivered when your endpoint returns a 2xx status. **Recent deliveries** shows **Delivered**, **Retrying** or the failure with its HTTP code.

> [!note] Deliveries need the app running
> Surfacedd has no server. Deliveries go out while the desktop app runs. If your computer was asleep, deliveries that were due are sent when the app opens again.

## Privacy

Webhook URLs and signing secrets are stored in your system keychain, not in the database. The database and logs see only a shortened form, such as "hooks.slack.com …Q7xT". Deleting a webhook drops its queued deliveries and removes the URL from the keychain. Sample brands never send. 

What a webhook sends is your choice: the brand's name and the numbers for the event go to the URL you entered. See [what leaves your computer](/docs/privacy/what-leaves-your-computer).

## What it doesn't do

- No email delivery: there's no Surfacedd server to send from.
- No deliveries while the app is closed; they catch up when it opens.
- No inbound webhooks: nothing outside can start a run.

## Troubleshooting

| What you see | Cause | What to do |
|---|---|---|
| "Use an https:// URL" | The URL is `http://` and not localhost | Use the `https://` URL your tool gives you |
| "Slack incoming webhook URLs start with https://hooks.slack.com/services/" | A Slack URL from somewhere else | Copy the URL from Slack's Incoming Webhooks page |
| The test returns HTTP 401 or 403 | Your endpoint rejected the signature | Check you verify the raw body and use the current secret |
| Failed after 3 tries | Your endpoint was down or returned errors | Fix the endpoint; later events are delivered normally |
