Use a slash command to search confluences spaces for results based on keyword search. Once results are found, the first is returned with information to see more.
- Create an app at https://api.slack.com/apps
- Add a Slash command (See Add a Slash Command section below)
- Navigate to Bot Users and click "Add a Bot User" to create one.
- Navigate to the OAuth & Permissions page and add the following scopes:
commands
bot
users:read
users:read.email
chat:write:bot
- Click 'Save Changes' and install the app (You should get an OAuth access token after the installation)
- Go back to the app settings and click on Slash Commands.
- Click the 'Create New Command' button and fill in the following:
- Command:
/f1help
- Request URL: This apps base URL +
/command
- Short description:
Provides helpful Confluence information
- Usage hint:
[question] (or documentation) [word or phrase]
- Command:
- Get the code
- Clone this repo and run
npm install
- Clone this repo and run
- Clone file named
.env.sample
to.env
and set the following environment variables in it:SLACK_ACCESS_TOKEN
: Your bot token,xoxb-
(available on the OAuth & Permissions once you install the app)SLACK_SIGNING_SECRET
: Your app's Signing Secret (available on the Basic Information page)CONFLUENCE_API_KEY
: Your confluence app's key (available on the Manage Your account -> Security page)CONFLUENCE_USER
: Confluence user name of account that will perform confluence searches (must have access to desired confluence spaces)CONFLUENCE_API_URL
: Your confluence base url
- If you're running the app locally, run the app (
npm start
).