Custom Dedicated Slack Bots

Credal can support the creation of custom Slack apps, which allow your organization to create a Slack app (like a bot) with a custom name and profile picture that connects to one specific agent. For example, you could create a Slack app called “Magic 8 Ball” with a custom logo, and when users tag that app or DM with it, all queries are routed to your specific agent.

Custom Slack App Example

There are two steps to configuring a custom Slack app:

  1. Create the application in Slack using the template below
  2. Share some key information about the Slack app with the Credal team to complete the configuration. This step will eventually be automated, but is manual while the feature is in beta.

Step 1: Create the application

To start, navigate to https://api.slack.com/apps

In the top right, click “Create New App”, then select “From a manifest”. Select the Slack workspace you want to deploy this app to.

Make sure “JSON” is selected, then paste the following manifest template in. Make sure you change [$NAME], [$DESCRIPTION], and [$LONG_DESCRIPTION] to the branding for your application. You’ll later have the opportunity to set a picture as well.

After creating the app from the manifest:

  1. Go to the App Home settings (findable from https://api.slack.com/apps) and at the bottom, check “Allow users to send Slash commands and messages from the messages tab”
  2. To enable DMs for your agent go to: App HomeMessages Tab and enable: Allow users to send Slash commands and messages from the messages tab
1{
2 "display_information": {
3 "name": "[$NAME]",
4 "description": "[$DESCRIPTION]",
5 "background_color": "#131415",
6 "long_description": "[$LONG_DESCRIPTION]"
7 },
8 "features": {
9 "bot_user": {
10 "display_name": "[$NAME]",
11 "always_online": false
12 },
13 "app_home": {
14 "home_tab_enabled": true,
15 "messages_tab_enabled": true,
16 "messages_tab_read_only_enabled": true
17 }
18 },
19 "oauth_config": {
20 "redirect_urls": ["https://app.credal.ai/custom-auth/slack"],
21 "scopes": {
22 "bot": [
23 "app_mentions:read",
24 "channels:history",
25 "channels:join",
26 "channels:read",
27 "chat:write",
28 "chat:write.public",
29 "im:history",
30 "im:write",
31 "incoming-webhook",
32 "reactions:read",
33 "reactions:write",
34 "users.profile:read",
35 "users:read",
36 "users:read.email",
37 "groups:history",
38 "groups:read"
39 ]
40 }
41 },
42 "settings": {
43 "event_subscriptions": {
44 "request_url": "https://app.credal.ai/api/slack-events",
45 "bot_events": [
46 "app_mention",
47 "message.channels",
48 "message.groups",
49 "message.im"
50 ]
51 },
52 "interactivity": {
53 "is_enabled": true,
54 "request_url": "https://app.credal.ai/api/slack"
55 },
56 "org_deploy_enabled": false,
57 "socket_mode_enabled": false,
58 "token_rotation_enabled": false
59 }
60}

Step 2: Configure in Credal

After creating your Slack app, you can now configure it directly in Credal. Simply open the Deploy as Custom Slack App pane and input the required information from your Slack app.

Deploy Panes

In the configuration pane, you’ll need to provide the following details from your Slack app:

Custom Slack Configuration

Once you’ve entered the information, your custom Slack app will be live!