Guides

Dashboard guides

Step-by-step guides for workspace setup, inviting teammates, and permissions.

Claix dashboard

Connect Slack to Claix for Guard alerts

Claix Guard can send each verdict to a Slack channel, or to a free public HTTPS endpoint you already have. This guide is the Slack path: one click, pick a channel, send a test message. You do not create a Slack app and you do not paste a token.

Slack is not tied to the Google account you used to sign in to Claix. Your Claix login only says which Claix account receives the channel. Slack's own screen is where you choose the workspace and the channel.

1. Before you start

You need:

  • A Claix account. Only the workspace owner can connect Slack.
  • A Slack workspace where you are allowed to install an app and pick a channel.
  • For Approve and Reject, two public HTTPS URLs you control: one for approve, one for reject. They can be an n8n Webhook, Make, Zapier, a serverless function, or your own API.

In the dashboard, open Guard, then Traces, and open Configure alert endpoints.

2. A free endpoint, without Slack

You can skip Slack. In the same popup, set a verdict to Endpoint and paste a public HTTPS URL. Claix POSTs the check result there, including the proposed SQL and the verdict.

  • Allowed, Denied and Needs approval can each use an endpoint.
  • A Needs approval alert sent to an endpoint has no buttons. Use Slack when a person should click Approve or Reject in a channel.
  • Each verdict has one destination. You can mix them: leave Allowed on the endpoint you already use, and send Needs approval to Slack.
  • An empty endpoint sends no alert for that verdict. Existing endpoint alerts keep working until you change that destination.

The URL must be public HTTPS, with no username or password in it.

3. Add to Slack

  1. In the alerts popup, click Add to Slack.
  2. Slack opens its permission screen. Choose the workspace, then the channel that should receive the alerts, and allow it.
  3. Claix brings you back to Guard Traces. The popup shows Connected to #channel.
  4. Click Send test message. The text "Claix Guard is connected to this channel." should appear in that channel.

The channel you may have picked when the Claix app was first installed in Slack is not this connection. Alerts go to the channel you choose on this screen.

Change channel opens the same Slack screen. Disconnect removes the connection from this Claix account. If the popup says the connection is broken, click Reconnect Slack and pick the channel again.

4. Choose a destination for each verdict

On the left of the popup, each verdict is Endpoint or Slack. Save after you choose.

VerdictEndpointSlack
AllowedPOST of the check result, including the SQL.A plain message. No buttons.
DeniedPOST of the check result, including the SQL.A plain message. No buttons.
Needs approvalPOST of the check result. No buttons.A message with Approve and Reject. You also set the two endpoints those buttons call.

Needs approval on Slack still needs both URLs: Endpoint on approve and Endpoint on reject. Connect Slack before you select Slack for a verdict.

5. What a button does

The Slack message shows the proposed SQL so a person can read it. Approve and Reject do not run the statement. Claix has no write access to your database. The click calls the endpoint you configured for that button, and that endpoint does the work.

The call is a signed HTTPS POST. The body looks like this when you leave SQL out:

{
  "approval_id": "7d8e9f0a-1b2c-4d3e-8f90-a1b2c3d4e5f6",
  "decision": "approved",
  "statement_hash": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
  "timestamp": "1763726400",
  "approver": "U0123456789"
}
  • decision is approved or denied. Reject, and an approval that expires, are delivered as denied.
  • approver is the Slack user who clicked.
  • Turn on Include the SQL in the approve and reject requests if the body should also contain the statement. Leave it off when the channel should see the SQL and the endpoint should not.
  • A second click does not send a second call. Claix tells Slack the decision was already made.

Claix signs the body. The header is X-Claix-Signature, an HMAC-SHA256 of the timestamp and the body, using a secret shown once when you save the endpoint. Copy it then. Check the signature in your endpoint before you run anything.

By default, any current member of the connected channel can click. To limit that, fill Slack users allowed to approve with Slack user ids (they look like U…). An empty list means channel members. If Claix cannot prove the person is allowed, your endpoint is not called.

6. Example: a refund in n8n

  1. Your workflow calls POST /check-sql and receives Needs approval. Do not run the statement yet.
  2. Claix posts the request in the channel. The person who should decide reads the SQL and clicks Approve.
  3. Claix calls your approve URL. In n8n that is a Webhook trigger, then a Postgres node that runs the same statement, then a step that tells the customer.
  4. Reject calls the other URL, which tells the agent the change was declined.

Make, Zapier, a serverless function and your own API use the same shape: one URL that can receive an HTTPS POST.

7. Good practices

  • Pick a channel only the right people can see. Messages can include the proposed SQL.
  • Make the approve endpoint do the whole job, including running the statement, so the button always ends in an outcome.
  • Keep Denied for what nobody should be able to do. Use Needs approval for a case a person can judge.
  • Send the test message, then try one real Needs approval, before you rely on the channel.
  • If almost every request is approved, the rule is probably too strict. If almost every one is rejected, it should be Denied.