You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 27, 2025. It is now read-only.
> :sparkles:*Updated August 2018: As we have introduced the workspace app (currently in beta), this tutorial and the code samples have been updated using the new token model! All the changes from the previous version of this example, read the [DIFF.md](DIFF.md)*
4
-
5
-
*Learn more about the workspace app at the [Slack API doc](https://api.slack.com/workspace-apps-preview).*
3
+
> :sparkles:*Updated October 2018: As we have introduced some new features, this tutorial and the code samples have been updated! All the changes from the previous version of this example, read the DIFF.md*
6
4
7
5
## Creating a helpdesk ticket using a Slash Command and a Dialog
8
6
@@ -14,15 +12,17 @@ Use a slash command and a dialog to create a helpdesk ticket in a 3rd-party syst
14
12
15
13
#### Create a Slack app
16
14
17
-
1. Create a *workspace app* at [https://api.slack.com/apps?new_app_token=1](https://api.slack.com/apps?new_app_token=1)
15
+
1. Create an app at [https://api.slack.com/apps](https://api.slack.com/apps)
18
16
2. Add a Slash command (See *Add a Slash Command* section below)
19
-
3. Enable Interactive components (See *Enable Interactive Components* below)
20
-
4. Navigate to the **OAuth & Permissions** page and add the following scopes:
17
+
3. Navigate to **Bot Users** and click "Add a Bot User" to create one.
18
+
4. Enable Interactive components (See *Enable Interactive Components* below)
19
+
5. Navigate to the **OAuth & Permissions** page and add the following scopes:
21
20
*`commands`
21
+
*`bot`
22
22
*`users:read`
23
23
*`users:read.email`
24
-
*`chat:write`
25
-
5. Click 'Save Changes' and install the app (You should get an OAuth access token after the installation)
24
+
*`chat:write:bot`
25
+
6. Click 'Save Changes' and install the app (You should get an OAuth access token after the installation)
26
26
27
27
#### Add a Slash Command
28
28
1. Go back to the app settings and click on Slash Commands.
@@ -31,20 +31,20 @@ Use a slash command and a dialog to create a helpdesk ticket in a 3rd-party syst
31
31
* Request URL: Your ngrok or Glitch URL + `/command`
32
32
* Short description: `Create a helpdesk ticket`
33
33
* Usage hint: `[the problem you're having]`
34
-
1. Save and reinstall the app
35
34
36
-
If you are using Glitch, the Request URL should look like: `https://slack-slash-command-and-dialogs-blueprint.glitch.me/command`.
35
+
If you are using Glitch, the Request URL should look like: `https://my-slash-comm-app.glitch.me/command`.
37
36
38
37
39
38
#### Enable Interactive Components
40
39
1. Go back to the app settings and click on Interactive Components.
41
-
1. Set the Request URL to your server (*e.g.*`https://yourname.ngrok.com`) or Glitch URL + `/interactive-component`
40
+
1. Set the Request URL to your server (*e.g.*`https://yourname.ngrok.com`) or Glitch URL + `/interactive`.
41
+
1. Save the change.
42
42
43
43
#### Run the app locally or [](https://glitch.com/edit/#!/remix/slack-slash-command-and-dialogs-blueprint)
44
44
1. Get the code
45
45
* Either clone this repo and run `npm install`
46
46
* Or visit https://glitch.com/edit/#!/remix/slack-slash-command-and-dialogs-blueprint
47
47
2. Set the following environment variables to `.env` (see `.env.sample`):
48
-
*`SLACK_ACCESS_TOKEN`: Your app's `xoxa-`token (available on the ****OAuth & Permissions** once you install the app)
48
+
*`SLACK_ACCESS_TOKEN`: Your bot token, `xoxb-` (available on the **OAuth & Permissions** once you install the app)
49
49
*`SLACK_SIGNING_SECRET`: Your app's Signing Secret (available on the **Basic Information** page)
50
-
3. If you're running the app locally, run the app (`npm start`)
50
+
3. If you're running the app locally, run the app (`npm start`). Or if you're using Glitch, it automatically starts the app.
0 commit comments