Follow these step-by-step instructions to deploy SuperBot for Slack:
-
Clone the Repository:
git clone https://github.com/superagent-ai/super-slack
-
Set Up Environment Variables: Copy the
.env.examplefile and rename it to.env. Fill in the environment variables:SUPERAGENT_AGENT_IDorSUPERAGENT_WORKFLOW_ID: ID of your SuperAgent AI agent or workflow.SUPERAGENT_API_BASE_URL: Base URL for the SuperAgent API.SUPERAGENT_API_KEY: Superagent API Key.SLACK_SIGNING_SECRET: Signing secret of your Slack app.SLACK_BOT_TOKEN: Bot token of your Slack app.
- Create a workflow on the Superagent workflows page.
- Add your Workflow ID as
SUPERAGENT_WORKFLOW_IDin .env - Create a new API key on the Superagent API Keys page and
- Add the API Key as
SUPERAGENT_API_KEYin .env
- Create a Slack app on the Slack API page -->
From App Manifest--> Select your Workspace --> Copy the manifest.yaml and paste it to Slack's code editor - Go to
Basic Information-> Copy & Add the secret asSLACK_SIGNING_SECRETto.env--> ClickInstall To Workspacebutton - Go to
OAuth & Permissions--> Copy theBot User OAuth Tokenand add it asSLACK_BOT_TOKENin .env - OPTIONAL: Go Back to Slack --> Click on your Profile picture --> Profile --> Click on 3 dots (in the right panel) --> Copy member ID
& add it as
SLACK_ADMIN_MEMBER_IDin .env
-
Setting Up Slack Events:
- After successful deployment, copy the
https://<your_deployment>/eventsendpoint URL. - Go to
Event Subscriptionsand setRequest URLto your deployment URL. - Go to
Slash Commands, click edit button of/helpcommand and setRequest URLto yourhttps://<your_deployment>/commandsURL.
- After successful deployment, copy the
Build and deploy the Docker image using the following command:
docker build -t super-slack .
docker run -p 8000:8000 super-slack