# Alerts to Discord, Slack and a webhook > Send every alert your rules fire to a Discord channel, a Slack channel or a server of your own, and check that a delivery really came from Port_. Source: https://docs.getport.app/using/channels/ Alerts already reach you by push, by email and through your own Telegram bots. A channel is one more place: a Discord channel, a Slack channel, or an endpoint you run. They are on Pro+ and Ultra, five on Pro+ and twenty on Ultra. ## What a channel receives A channel is set up once, the way a phone is. **Every alert a rule sends by push or by email also goes to each channel that is switched on.** A rule that stays in the inbox, or waits for the morning briefing, reaches none. There is nothing to choose per rule. Discord and Slack get the alert’s sentence, and for a move by a wallet you follow, the chain and a link to the transaction. A message can never mention `@everyone` or a channel, whatever a token has been named. ## Adding one Under **Settings, Discord, Slack and webhooks**, pick the kind and paste the address. - **Discord.** In Discord, open the channel, then Edit channel, Integrations, Webhooks, New webhook, and Copy webhook URL. - **Slack.** Add an incoming webhook for the channel and paste its address. It starts with `https://hooks.slack.com/services/`. - **A webhook of your own.** An `https` address on a domain name, on the standard port. Addresses written as numbers, names inside a private network and anything that does not resolve to the public internet are refused. The address is stored encrypted and never shown again, because a Discord or Slack webhook address is itself a credential. You are told by email each time a channel is added. Press **Send a test** to see a message arrive before you rely on it. ## What your endpoint is sent A `POST` with a JSON body, and three seconds to answer with any `2xx`. Redirects are not followed. ``` { "id": "0b8c6d3e-5a41-4f0e-9d2a-7c1e2f3a4b5c", "type": "alert", "kind": "price", "scope": "ETH", "text": "ETH rose above $3,000, now $3,012", "at": "2026-09-30T07:00:00.000Z", "url": "https://getport.app/alerts", "chain": null, "transaction": null } ``` `type` is `alert`, or `test` for the line the settings page sends. `kind` is the kind of rule. `chain` and `transaction` are filled for a move by a followed wallet. `id` is the same for a delivery that is tried again, so you can drop a repeat. Three headers come with it: `X-Port-Event` (the same as `type`), `X-Port-Signature`, and a `User-Agent` that starts with `Port_-webhooks/`. ## Checking the signature When you add an endpoint you are shown a signing secret, once. Every delivery is signed with it: ``` X-Port-Signature: t=1790751600,v1=5f2b… ``` `t` is the time it was sent, in seconds. `v1` is the HMAC-SHA256, in hex, of `t`, a full stop and the raw body, under your secret. Compute the same and compare, and refuse anything more than five minutes old so a captured delivery cannot be replayed. ``` import { createHmac, timingSafeEqual } from 'node:crypto' function fromPort(secret, header, rawBody) { const t = /(?:^|,)t=(\d+)/.exec(header)?.[1] const v1 = /(?:^|,)v1=([0-9a-f]{64})/.exec(header)?.[1] if (!t || !v1) return false if (Math.abs(Date.now() / 1000 - Number(t)) > 300) return false const want = createHmac('sha256', secret).update(`${t}.${rawBody}`).digest() const got = Buffer.from(v1, 'hex') return want.length === got.length && timingSafeEqual(want, got) } ``` ``` import hashlib, hmac, re, time def from_port(secret: str, header: str, raw_body: bytes) -> bool: t = re.search(r"(?:^|,)t=(\d+)", header) v1 = re.search(r"(?:^|,)v1=([0-9a-f]{64})", header) if not t or not v1 or abs(time.time() - int(t.group(1))) > 300: return False want = hmac.new(secret.encode(), t.group(1).encode() + b"." + raw_body, hashlib.sha256).hexdigest() return hmac.compare_digest(want, v1.group(1)) ``` Use the body exactly as it arrived, before any JSON parsing. ## When a channel stops - If Discord or Slack says the webhook no longer exists, or your endpoint answers `410`, the channel is switched off at once and its row says why. - Anything else that is not a success counts, and ten in a row switches it off. A `429` is honoured as “slower” and never counts. - Fix it, then press **Send a test**: a test that arrives switches it back on. An alert is never lost when a channel is down. It is in your inbox either way, and push and email are not affected. ## On Ultra A channel on Ultra cannot be added until [two-factor sign-in](https://docs.getport.app/security/two-factor/) is on, the same rule an API key has.