Before you begin
- Graph AI turned on in your deployment, with
costgraphAi.enabled: trueand a model key. - Permission to create apps in your Slack workspace.
- A CostGraph organization owner or admin in your deployment to add the app.
Connection modes
Slack reaches your deployment in one of two ways. The following table compares them.
In both modes, adding the app and connecting accounts happen in the browser. Only the people using CostGraph need to reach the dashboard.
Create the Slack app
1
Copy the manifest from CostGraph
In your CostGraph, open Integrations > Slack as an organization owner or admin. The setup guide shows an app manifest generated for your deployment’s URLs. Click Copy manifest.
2
Create the app from the manifest
Go to api.slack.com/apps, click Create New App, choose From a manifest, select your workspace, and paste the manifest.In socket mode, change
socket_mode_enabled to true and delete the url line under the slash command and the two request_url lines before you create the app.3
Copy the app credentials
In Basic Information > App Credentials, copy the Client ID, Client Secret, and Signing Secret.
4
Create an app-level token
In socket mode, go to Basic Information > App-Level Tokens, click Generate Token and Scopes, add the
connections:write scope, and copy the token. It starts with xapp-.Configure the chart
1
Store the credentials
Create a Secret whose keys are the setting names. Every deployment needs
SLACK_SIGNING_SECRET. In webhook mode, leave out SLACK_APP_TOKEN.2
Point the chart at it
Add the mode and the Secret to your values file.
3
Upgrade
Run the upgrade. If a credential is missing, the upgrade fails and names the value to fix.
/slack/events, /slack/interactivity, and /slack/commands as exact paths to the costgraph-selfhosted-costgraph-ai Service on port 4111.
After you change the Secret, restart both components so they read it:
Add the app and verify
1
Add the app to Slack
In your deployment, go to Settings > Integrations, open the AI agent category, select Slack, and click Add to Slack.
2
Connect your account
Send the app a direct message. Click Connect CostGraph in the reply and sign in to Slack.
3
Ask a question
Ask “What did we spend last month?” in the same direct message. The answer ends with the name of your tenant.