Skip to content

homanp/slack-bot

Repository files navigation

SuperBot for Slack

SuperBot for Slack is a powerful Slack bot that integrates with SuperAgent AI. It's developed using TypeScript and can be easily deployed using AWS Lambda functions or any other containerized environment using Docker.

SuperBot Example

Deployment Guide

Follow these step-by-step instructions to deploy SuperBot for Slack:

  1. Clone the Repository:

    git clone https://github.com/superagent-ai/slack-bot
  2. Set Up Environment Variables: Copy the .env.example file and rename it to .env. Fill in the following environment variables:

    • SUPERAGENT_AGENT_ID or SUPERAGENT_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.

    Superagent Environment Variables:

    Slack Environment Variables:

    • 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 as SLACK_SIGNING_SECRET to .env --> Click Install To Workspace button
    • Go to OAuth & Permissions --> Copy the Bot User OAuth Token and add it as SLACK_BOT_TOKEN in .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_ID in .env
  3. Deployment:

    One Click Deployments:

    Deploy with Vercel

    Deploy on Railway

    You will need to add the environment variables in the Vercel or Railway dashboard after deploying. (See Step 3)


    AWS Lambda Icon

    Want to deploy another platform? Build and deploy the Docker image using the following command:

    docker build -t superagent-slack-bot .
    docker run -p 8000:8000 superagent-slack-bot
  4. Setting Up Slack Events:

    • After successful deployment, copy the /events endpoint URL.
    • Enable events in Slack's Event Subscriptions.
    • Subscribe to app_mention events and set the Request URL to the Lambda URL.
    • Create a new slash command /help and set the Request URL to the Lambda URL ending with /commands.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published