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
Copy file name to clipboardExpand all lines: messaging/work-objects/README.md
+37-15Lines changed: 37 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,32 +6,54 @@ You can also [post](https://docs.slack.dev/messaging/work-objects/#implementatio
6
6
7
7
Read the [docs](https://docs.slack.dev/messaging/work-objects/) to learn more!
8
8
9
-
## Running locally
9
+
## Setup
10
10
11
-
### 0. Create an app
11
+
### Option 1: Create a new app with the Slack CLI
12
12
13
-
Create an app and add `myappdomain.com`as an [app unfurl domain](https://docs.slack.dev/messaging/unfurling-links-in-messages/#configuring_domains) (or update the unfurl URLs in `metadata.py` with your domain). Also enable [Work Object Previews](https://docs.slack.dev/messaging/work-objects/#implementation) for your app.
13
+
```bash
14
+
slack init && slack run
15
+
```
14
16
15
-
### 1. Setup environment variables
17
+
### Option 2: Create a Slack App in the UI and copy over your secrets
16
18
17
-
```zsh
18
-
# Replace with your tokens
19
-
export SLACK_BOT_TOKEN=<your-bot-token>
20
-
export SLACK_APP_TOKEN=<your-app-level-token>
21
-
```
19
+
#### Create the app
20
+
21
+
Create an app and add `myappdomain.com`as an [app unfurl domain](https://docs.slack.dev/messaging/unfurling-links-in-messages/#configuring_domains) (or update the unfurl URLs in `metadata.py` with your domain). Also enable [Work Object Previews](https://docs.slack.dev/messaging/work-objects/#implementation) for your app.
22
+
23
+
1. Go to [https://api.slack.com/apps](https://api.slack.com/apps)
24
+
2. Click **"Create New App"**
25
+
3. Choose **"From an app manifest"**
26
+
4. Select your workspace
27
+
5. Copy the contents of `manifest.json` and paste it into the manifest editor
28
+
6. Review the configuration and click **"Create"**
29
+
30
+
#### Configure environment variables
22
31
23
-
### 2. Setup your local project
32
+
1. Copy the environment variables template:
33
+
```bash
34
+
cp .env.sample .env
35
+
```
24
36
25
-
```zsh
37
+
2. Fill in your Slack credentials in `.env`:
38
+
```
39
+
SLACK_BOT_TOKEN=xoxb-your-bot-token
40
+
SLACK_APP_TOKEN=xapp-your-app-token
41
+
```
42
+
43
+
You can find these values in your app's settings:
44
+
-**Bot Token**: OAuth & Permissions → Bot User OAuth Token
45
+
-**App Token**: Basic Information → App-Level Tokens (create one with `connections:write` scope)
0 commit comments