Skip to content

docs: setting environment variables of an app happens before cloning template code #86

@zimeg

Description

@zimeg

📚 The current README sections suggest updating the ".env" file with app credentials then cloning this template, but we might want to prefer the opposite order?

### Using Terminal
1. Open [https://api.slack.com/apps/new](https://api.slack.com/apps/new) and choose "From an app manifest"
2. Choose the workspace you want to install the application to
3. Copy the contents of [manifest.json](./manifest.json) into the text box that says `*Paste your manifest code here*` (within the JSON tab) and click _Next_
4. Review the configuration and click _Create_
5. Click _Install to Workspace_ and _Allow_ on the screen that follows. You'll then be redirected to the App Configuration dashboard.
#### Environment Variables
Before you can run the app, you'll need to store some environment variables.
1. Rename `.env.sample` to `.env`.
2. Open your apps setting page from [this list](https://api.slack.com/apps), click _OAuth & Permissions_ in the left hand menu, then copy the _Bot User OAuth Token_ into your `.env` file under `SLACK_BOT_TOKEN`.
```sh
SLACK_BOT_TOKEN=YOUR_SLACK_BOT_TOKEN
```
3. Click _Basic Information_ from the left hand menu and follow the steps in the _App-Level Tokens_ section to create an app-level token with the `connections:write` scope. Copy that token into your `.env` as `SLACK_APP_TOKEN`.
```sh
SLACK_APP_TOKEN=YOUR_SLACK_APP_TOKEN
```
#### Initializing the project
```sh
git clone https://github.com/slack-samples/bolt-js-assistant-template.git my-bolt-js-assistant
cd my-bolt-js-assistant
```
#### Install dependencies
```sh
npm install
```

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocumentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions