> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anyformat.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Slack

> Route workflow alerts to a Slack channel — an invoice over a threshold, a failed validation, a document classified as high-priority.

The **[Slack alert](/guides/nodes/slack-alert)** node posts a message to a Slack channel whenever a document flows through it — typically placed after an [If/Else](/guides/nodes/if-else) or [Validate](/guides/nodes/validate) node so it only fires on matches (for example, "invoice total > \$10,000", "classification = escalate", or "a validation rule failed"). This page covers the connection; the node's options and API shape live on the [node page](/guides/nodes/slack-alert).

***

## Connect your Slack workspace

The Slack connection is set up once per organization; every workflow in the org can then send alerts through it.

1. Open **Connectors** from the user menu (avatar → Connectors).
2. Find the **Slack** row and click **Connect**.
3. Approve the anyformat app in Slack's consent screen.
4. You're returned to the same page with Slack showing as **Connected**.

<Note>
  **Who can connect:** organization admins only. Non-admins see a note asking them to reach out to an admin instead of the **Connect** button.
</Note>

**What we ask Slack for:** permission to post messages as the anyformat app, list your public channels so you can pick one, and automatically join a channel the first time you send an alert to it.

<Note>
  **Private channels are not supported** in the current release. The channel picker only lists public channels. If you need alerts in a private space, ask an admin to open a matching public channel, or [reach out to us][support].
</Note>

**One workspace per organization.** If you need to switch workspaces, use **Change account** (see [Managing the connection](#managing-the-connection)). If you need alerts routed to more than one Slack workspace from the same org, [reach out to us][support].

***

## Add a Slack Alert node

In Studio, add a Slack Alert node one of two ways:

* Drag **Alerts → Slack Alert** from the sidebar onto the canvas.
* Or click the **+** chip on an upstream Extract, Validate, or If/Else handle and pick **Slack Alert**.

Then configure it:

### Channel

Pick from the dropdown of your public channels. anyformat joins the channel the first time it posts there — no manual invite needed.

### Message template

Compose the message with the built-in editor. Click the **picker** to drop a **field chip** into the template — for example:

```
New invoice from [vendor_name] — total [invoice_total]
```

Chips resolve to the field's current value on delivery. Renaming the field in Studio keeps the chip working; deleting the field breaks it (and the alert will land with a visible `<missing: …>` marker in that spot).

**Validation chips** — when there's a [Validate](/guides/nodes/validate) node upstream, you can also drop a rule-outcome chip. For a rule whose id is `amt_positive`:

```
Rule "amount positive" [amt_positive.status]: [amt_positive.detail]
```

* Each rule exposes three attributes you can insert: `status`, `detail`, `severity`.
* `status` lands in Slack as one of `pass`, `fail`, or `inconclusive`.

### Severity

Pick the severity that determines the color bar on the Slack card:

| Severity | Color |
| -------- | ----- |
| Info     | Blue  |
| Warning  | Amber |
| Critical | Red   |

### Preview and test

* The **Preview** panel shows the message with each chip replaced by the field name in brackets (e.g. `[vendor_name]`), so you can eyeball the layout before you save. If a chip can't be resolved (renamed / deleted field), the preview shows `<missing: …>` in that spot.
* Click **Send test** to post a rendered `[Test]`-prefixed message to the selected channel — the fastest way to confirm the bot has access and the layout looks right. **Test messages do not count against your alert budget.**

***

## How alerts are delivered

* **Order of operations.** The alert fires after the upstream node (Extract, If/Else, or Validate) produces its result for the document.
* **Open document button.** Every alert has an **Open document** button that opens the file in Studio with the exact workflow version the alert fired against — so recipients land on the same schema the alert was built with.
* **Missing values are visible.** If a chip's field or validation rule didn't produce a value for a document, the delivered alert shows `<missing: …>` in that spot instead of silently dropping it — so you can see and fix the broken template.
* **Per-organization rate limits.** To protect your Slack workspace from a runaway workflow, deliveries are capped at **60 per minute** and **500 per hour** across the whole org. Alerts over the cap are dropped for that window (they aren't queued or retried).

***

## Managing the connection

Open **Connectors → Slack → ⋯** (from the user menu) for these controls:

* **Change account** — installs anyformat into a different Slack workspace. The credentials for the old workspace are discarded on our side, **but the app stays installed in that workspace** until you remove it there. If you want it fully cleaned up, open Slack's **Apps → anyformat → Remove app** in the old workspace.
* **Disconnect** — stops all Slack Alert deliveries and asks Slack to uninstall the app from your workspace. Disconnection on our side is immediate; if Slack rejects the uninstall (rare — usually a network hiccup or an already-invalid token) you may need to remove the app manually from Slack's app directory. Your Slack Alert nodes aren't deleted — they simply pause until you reconnect.

<Note>
  **Uninstalling from Slack directly** (via Slack's own **Apps → anyformat → Remove app**) doesn't notify anyformat. Deliveries will start failing on the next attempt, but the integration stays shown as connected in Studio until you also click **Disconnect** here. Prefer **Disconnect** — it flips both sides at once.
</Note>

***

## Troubleshooting

**"Slack isn't connected" appears when I open the node.**
Nobody has connected Slack for your organization yet. If you're an admin, click **Connect Slack** — you'll be walked through the same flow as [Connect your Slack workspace](#connect-your-slack-workspace). If you're not an admin, ask one to set it up.

**The channel picker won't load or says "Slack workspace unreachable".**
Slack rejected our request — usually a revoked token, a rate-limit, or a transient outage on their side. Try again in a minute; if it persists, disconnect and reconnect from **Connectors**.

**Message arrives with `${field.…}` shown literally.**
The chip was typed by hand with characters the substitution can't parse. Delete the raw text and re-insert it from the **picker** instead.

**Message arrives with `<missing: …>` where a value should be.**
Either the referenced field was renamed or deleted (re-insert the chip from the picker), the field wasn't extracted from this particular document, or the referenced validation rule didn't run for this document.

**The alert didn't fire at all.**
Slack Alert only fires when the upstream node produces a result for the document. If it's behind an If/Else, check that the branch condition was true for this input.

**Deliveries stopped mid-run.**
You may have hit the rate limit (60/minute or 500/hour). Wait for the next window, and consider scoping the alert with an If/Else so it only fires on the cases you actually need paged for.

[support]: mailto:support@anyformat.ai
