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.
Copy file name to clipboardExpand all lines: README.md
+19-12Lines changed: 19 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,41 +10,48 @@ Use a slash command and a dialog to create a helpdesk ticket in a 3rd-party syst
10
10
11
11
## Setup
12
12
13
-
####Create a Slack app
13
+
### Create a Slack app
14
14
15
15
1. Create an app at [https://api.slack.com/apps](https://api.slack.com/apps)
16
16
2. Add a Slash command (See *Add a Slash Command* section below)
17
17
3. Navigate to **Bot Users** and click "Add a Bot User" to create one.
18
18
4. Enable Interactive components (See *Enable Interactive Components* below)
19
-
5. Navigate to the **OAuth & Permissions** page and add the following scopes:
19
+
5. Navigate to the **OAuth & Permissions** page and make sure the following scopes are pre-selected:
20
20
*`commands`
21
21
*`bot`
22
-
*`users:read`
23
-
*`users:read.email`
24
-
*`chat:write:bot`
25
22
6. Click 'Save Changes' and install the app (You should get an OAuth access token after the installation)
26
23
27
24
#### Add a Slash Command
28
25
1. Go back to the app settings and click on Slash Commands.
29
26
1. Click the 'Create New Command' button and fill in the following:
30
27
* Command: `/helpdesk`
31
-
* Request URL: Your ngrok or Glitch URL + `/command`
28
+
* Request URL: Your server or Glitch URL + `/command`
32
29
* Short description: `Create a helpdesk ticket`
33
30
* Usage hint: `[the problem you're having]`
34
31
35
-
If you are using Glitch, the Request URL should look like: `https://my-slash-comm-app.glitch.me/command`.
32
+
If you did "Remix" on Glitch, it auto-generate a new URL with two random words, so your Request URL should be like: `https://fancy-feast.glitch.me/command`.
36
33
37
34
38
35
#### Enable Interactive Components
39
36
1. Go back to the app settings and click on Interactive Components.
40
-
1. Set the Request URL to your server (*e.g.*`https://yourname.ngrok.com`) or Glitch URL + `/interactive`.
37
+
1. Set the Request URL to your server or Glitch URL + `/interactive`.
41
38
1. Save the change.
42
39
43
-
#### Run the app locally or [](https://glitch.com/edit/#!/remix/slack-slash-command-and-dialogs-blueprint)
40
+
41
+
### Set Your Credentials
42
+
43
+
1. Set the following environment variables to `.env` (see `.env.sample`):
44
+
*`SLACK_ACCESS_TOKEN`: Your bot token, `xoxb-` (available on the **OAuth & Permissions** once you install the app)
45
+
*`SLACK_SIGNING_SECRET`: Your app's Signing Secret (available on the **Basic Information** page)
46
+
2. If you're running the app locally, run the app (`npm start`). Or if you're using Glitch, it automatically starts the app.
47
+
48
+
#### Run the app
49
+
44
50
1. Get the code
45
-
* Either clone this repo and run `npm install`
46
-
* Or visit https://glitch.com/edit/#!/remix/slack-slash-command-and-dialogs-blueprint
51
+
* Clone this repo and run `npm install`
47
52
2. Set the following environment variables to `.env` (see `.env.sample`):
48
53
*`SLACK_ACCESS_TOKEN`: Your bot token, `xoxb-` (available on the **OAuth & Permissions** once you install the app)
49
54
*`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`). Or if you're using Glitch, it automatically starts the app.
55
+
3. If you're running the app locally, run the app (`npm start`).
56
+
57
+
If you want to run it locally, I recommend creating a localhost tunnel with [ngrok](https://ngrok.com)!
0 commit comments