Slack Integration
Overview
Section titled “Overview”Orvanta’s Slack integration has two directions: calling the Slack API from Orvanta scripts and flows and triggering Orvanta scripts from Slack commands or mentions, which is not available.
Action on Orvanta from Slack
Section titled “Action on Orvanta from Slack”Connecting a workspace to Slack
Section titled “Connecting a workspace to Slack”A workspace admin can connect the workspace to Slack either by pasting a bot token (Orvanta verifies it against Slack’s auth.test before saving it) or through the OAuth authorization-code flow using the workspace’s own Slack app credentials (slack_oauth_client_id and slack_oauth_client_secret); there is no shared instance-wide Slack app. The bot token is stored as an encrypted secret at f/slack_bot/bot_token and is what interactive Slack approvals use. This connection is part of the beta-gated slack_oauth capability (not yet verified against a live Slack app), so it is hidden unless the instance runs with the beta toggle on.
Action on Slack from Orvanta
Section titled “Action on Slack from Orvanta”Creating a Slack connection
Section titled “Creating a Slack connection”From the Connections page, add a Slack connection through the standard OAuth flow — sign in with the workspace you want to authorize, and Orvanta stores the resulting token as a connection. Scripts and flows can then call the Slack API using that connection.
Publishing messages
Section titled “Publishing messages”import { WebClient } from '@slack/web-api';type Slack = { token: string };export async function main(text: string, channel: string, slack: Slack) { const web = new WebClient(slack.token); await web.chat.postMessage({ channel, text });}Messages post under your own Slack identity when the connection uses a user token, or under the Orvanta bot’s identity when it uses a bot token.
Approval steps
Section titled “Approval steps”Orvanta’s Python and TypeScript clients expose helpers to request an approval directly inside a Slack message, rendered as an interactive modal:
await orvanta.requestInteractiveSlackApproval({ slackResourcePath: "/u/alex/my_slack_resource", channelId: "admins-slack-channel", message: "Please approve this request"});The approver can act on the request without leaving Slack; the flow resumes once they respond.
Error handling and alerts
Section titled “Error handling and alerts”Error handlers
Section titled “Error handlers”A flow or script’s error handler can post to Slack the same way any other step would — using a Slack connection and the Web API client shown above. See the error handling documentation for how to attach one.
Critical alerts
Section titled “Critical alerts”Instance settings support configuring a Slack channel (alongside email and Teams) to receive critical-error notifications — worker/queue health problems the instance itself detects, distinct from a flow’s own error handler. This requires the Business tier or higher. Alerts are delivered with the instance-wide Slack bot token held as the f/slack_bot/global_bot_token resource in the admins workspace; if that resource is missing or the Slack call fails, the failure is logged and Orvanta moves on to the next configured channel.
For more Slack scripts and flows, visit the Orvanta Hub.