Slack
import { Aside } from ‘@astrojs/starlight/components’;
Send an artifact to Slack — a message, a rendered snapshot, or a PDF — on demand, on a schedule, or on an event.
How it works
Section titled “How it works”Slack is a workspace-level connection: connect a Slack OAuth app once per
workspace (a bot token, stored encrypted), and any artifact in that workspace can
deliver to Slack. A workspace can hold several named connections (e.g. team,
alerts).
Connect a workspace
Section titled “Connect a workspace”1. GET /v1/workspaces/{id}/connections/slack/install?connection=team&returnUrl=…2. Open the returned URL and authorize the Slack app.3. Slack redirects to /v1/oauth/slack/callback; the bot token is stored.4. List channels: GET /v1/workspaces/{id}/connections/team/slack/channelsBot scopes include chat:write, files:write, and im:write (DMs). If DM
delivery fails with missing_scope on an older connection, reconnect Slack.
One-shot delivery
Section titled “One-shot delivery”POST /v1/artifacts/{id}/share/slack:
{ "connection": "team", "targetType": "channel", "channelId": "C0123456789", "mode": "snapshot", "message": "Latest numbers" }DM a user instead:
{ "connection": "team", "targetType": "dm", "slackUserId": "U0123456789", "mode": "pdf" }mode:message(text + link button),snapshot(PNG),pdf, orboth.- Channel posts need owner/editor; any viewer may DM themselves.
On a schedule or event
Section titled “On a schedule or event”Use a job with action: "slack":
{ "artifact_id": "art_abc123", "action": "slack", "schedule": "0 9 * * 1", "config": { "connection": "team", "channelId": "C0123456789", "mode": "snapshot" }}