Sales Aid Slack Bot is a Slack bot designed to assist with sales tasks. It leverages the Slack API and other services to provide useful functionalities.
Create an app at: https://api.slack.com/apps
Create an API key: https://app.cinode.com/tretton37/account
Don't forget to install the app on slack and invite the bot to the channel you want it to listen to. Sales Aid Slack Bot is a Slack bot designed to assist with sales tasks. It leverages the Slack API and other services to provide useful functionalities.
Enable events under 'Event Subscriptions' in Slack app admin.
- Install the dependencies:
npm install
-
Copy the
.env.example
file to.env
:cp .env.example .env
-
Fill in the environment variables in the
.env
file:SLACK_APP_TOKEN: Under *Basic Information*, Create an App level token with the connections:write scope SLACK_BOT_TOKEN: Under *Install App*, Bot User OAuth Token SLACK_SIGNING_SECRET: Under *Basic Information*, Client Secret CINODE_ACCESS_ID: Create an Cinode API key under *My Account*, Access Id CINODE_ACCESS_SECRET: Create an API key under *My Account*, Access Secret
-
Start the application:
npm start
-
The bot will start running and listen for events on the specified port (default is 3000).
The bot is deployed to Google Cloud using the docker container.
-
Make sure you have Docker installed.
-
Install the Google Cloud CLI.
-
Create a Google Cloud project (either through portal or CLI)
-
Add some environmental variables
PROJECT_ID=$(gcloud config get-value core/project) REGION="europe-north1" // Or whatever region you want
-
Log in to your google cloud via the CLI and make sure you have the correct services
gcloud auth login gcloud config set project $PROJECT_ID gcloud services enable artifactregistry.googleapis.com gcloud services enable run.googleapis.com
-
Athenticate docker to use your google auth
gcloud auth configure-docker
-
Build the image.
docker build -t gcr.io/$PROJECT_ID/slack-bolt-app .
-
Push the image to Google Container Registry
docker push gcr.io/$PROJECT_ID/slack-bolt-app
-
Deploy the Google Run Function
gcloud run deploy slack-bolt-app \ --image gcr.io/$PROJECT_ID/slack-bolt-app \ --platform managed \ --region $REGION \ --allow-unauthenticated \ --set-env-vars PROJECT_ID=$PROJECT_ID
-
See output for your google run URL. Go to api.slack.com and go to your app and go down to Event Subscription and paste in your new link and add /slack/events to the end as that is the endpoint that Bolt uses.
- @slack/bolt - Slack app framework
- @slack/socket-mode - Slack Socket Mode client
- @slack/web-api - Slack Web API client
This project is licensed under the ISC License.