Slack Integration
Overview
Section titled “Overview”Orvanta’s Slack integration has two directions: calling the Slack API from Orvanta scripts and flows (live today), and triggering Orvanta scripts from Slack commands or mentions (planned, tracked below).
Action on Orvanta from Slack
Section titled “Action on Orvanta from Slack”Once shipped, the intended flow is: a workspace admin connects Slack from Workspace Settings, after which a script bound to the /orvanta slash command receives parameters such as response_url, text, channel_id, user_name, user_id, and command, and can reply by posting to response_url. Mentioning the Orvanta bot in a channel would work the same way, with the mention text stripped before the handler runs and command set to a value that distinguishes it from a slash command. Slack’s Events API requires a response within 3 seconds, so any @mention handler that needs longer would hand off to the Slack Web API with a bot token instead of relying on the synchronous response.
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 'https://deno.land/x/@slack/web-api@6.7.0/mod.ts';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 is an Enterprise-tier setting.
For more Slack scripts, flows, and apps, visit the Orvanta Hub.