Skip to main content

Slack Events & Message Format

Events we send

  • diff — visual difference detected.
  • completed — run completed.

Message format

Messages use Slack Block Kit with:

  • Header: “ScanU • Visual diff detected” or “ScanU • Test run completed”.
  • Fields: project name, branch, environment.
  • Buttons: View in ScanU, optional Open Diff, and (on diff messages only) Approve Baseline. Only the Slack user who connected the workspace for the project owner can approve; anyone else in the channel gets a private notice to open the run in ScanU.
json
POST /api/internal/slack/notify
Headers:
  x-internal-service-token: <INTERNAL_SLACK_NOTIFY_TOKEN>
  content-type: application/json

{
  "projectId": "7f2...",
  "testId": "913...",
  "eventType": "diff",
  "branch": "feature/new-header",
  "environment": "preview",
  "runUrl": "https://scanyou.eu/projects/..../runs/....",
  "diffUrl": "https://scanyou.eu/projects/..../runs/.../compare/..."
}