Slack integration
Use Slack as a trigger and notification surface while Viewport remains the source of truth.
Slack is part of the launch path for early partners:
- start a workflow from a message, mention, slash command, or seeded equivalent;
- notify the team when a run needs attention or completes;
- reply in the source thread when a live Slack-triggered run has a source timestamp;
- link back to the Viewport run detail;
- record the Slack delivery as a receipt.
The Viewport run detail remains the source of truth for approvals, artifacts, provider actions, usage, and audit.
Set Up
- Open Settings -> Integrations -> Slack.
- Connect the workspace.
- Pick the channel used for the first workflow.
- Trigger a small test workflow before connecting production channels.
Use a channel where the operator can see the trigger and completion receipt during the first proof.
First-Route Walkthrough
Use one controlled channel first. Do not start with multiple support channels or private production channels.
- Invite the Viewport Slack app or bot to the launch channel.
- Create or sync one
.viewport/routes/*.yamlroute withintegration: slackand the channel condition for that launch channel. - Keep
.viewport/policy.yamlon the launch-safe path: plan gate, human approval, bounded branch publish, and Slack notification. - Run
vpd check .before pushing the route. - Push
.viewport/and wait for GitOps sync to show the new SHA. - Start the paired worker with the app-generated command.
- Post one real source message in the launch channel.
- Approve the plan gate in Viewport.
- Confirm the completion message appears in the source thread.
- Open run detail and verify the Slack provider receipt.
Minimum launch route shape:
name: slack-support
route:
integration: slack
event: app_mention
conditions:
channel: C0123456789
mentionsAny: ["viewport"]
target:
policy: ../policy.yamlUse the channel id, not the visible channel name. If the route starts from a fixture or replay without a source timestamp, a fallback channel post is acceptable for that fixture only. It does not prove live source-thread delivery.
What To Verify In Run Detail
After the first Slack-backed run, the run should show:
- source provider
slack; - source channel id and event timestamp;
- matched route file and Git SHA;
- plan gate and human approval;
- worker claim and cleanup receipt;
- Slack completion receipt with provider permalink;
- source thread timestamp when a source message existed;
- GitHub PR or provider proposal receipt if the workflow opened one.
If the Slack message appears but run detail has no provider receipt, treat that as incomplete proof. If run detail has a receipt but Slack has no visible message, follow Provider receipts are missing.
Message Quality
Slack messages should be readable summaries:
Viewport completed the support run.
GitHub PR -> PR #44
Audit packet -> Open audit packet
Run -> Open runIf you see literal \n in a message, that is a renderer bug. The provider
payload should contain real line breaks before it reaches Slack.
Threads
When the workflow has a source Slack message, completion notifications should prefer the source thread when that target is available. Some fixture or seeded demo runs may post directly to the configured channel because there is no real source thread to reply to. Treat an unexpected channel post during a live Slack-triggered run as a regression and capture the run id plus Slack timestamp.
Do not generalize one route proof to every channel. Each launch route should be verified with its own source message, completion permalink, and run receipt.
Approvals
For the launch path, review and approval should happen in Viewport. Slack cards can route users to the run detail, but do not rely on Slack-only approval until the workspace has explicitly enabled and tested that behavior.
Troubleshooting
| Symptom | Check |
|---|---|
| No message posts | Integration connected, channel selected, bot invited, run has notification target. |
| Message posts in channel instead of thread | Confirm the run came from a live Slack source with a source timestamp. |
Literal \n appears | Capture payload/run id; the canonical Slack renderer should normalize it. |
| Slack says channel not found | Bot may not be in the channel or the channel id is stale. |
| Slack event arrives but no run starts | Check the route channel id, mentionsAny, GitOps sync status, and route match proof. |
| Thread proof is unclear | Compare the source message timestamp, completion permalink, and run detail source event. |
Do not paste Slack bot tokens into support notes.