How to Connect Enji.ai Bot to Slack

This guide covers registering and setting up the Enji.ai bot in your Slack environment. To follow these steps, administrator rights for your Slack space, specifically Space Admin or Space Owner, are required.

This article is intended for Enji.ai clients.

Bot Registration:

1. Go to the page https://api.slack.com/apps.

2. Click on Create an App

How to Connect Enji.ai Bot to Slack

3. Choose the option From an app manifest
4. Select your workspace.
5. In the YAML tab, enter the manifest (see below). Replace URLs as indicated in bold:

  • <slack-bot-url...> – Insert the URL where the bot is deployed, provided by the Enji.ai DevOps team.
  • <frontend-domain.com...> – – Insert the URL to the site through which you access Enji, e.g., yourcompany.enji.ai.
display_information:
  name: Enji.ai
  description: Teamlead that never sleeps
  background_color: "#303036"
features:
  bot_user:
    display_name: Enji.ai
    always_online: true
  slash_commands:
    - command: /report
      url: https://slack-bot-url-where.deployed.com/slack/commands
      description: Request report on the team’s activity
      should_escape: false
oauth_config:
  redirect_urls:
    - https://frontend-domain.com/api/v1/project/set_workspace_token
    - https://slack-bot-url-where.deployed.com/slack/set_user_token
    - https://slack-bot-url-where.deployed.com/slack/check_reaction_and_notify
  scopes:
    bot:
      - app_mentions:read
      - channels:history
      - channels:read
      - chat:write
      - chat:write.customize
      - chat:write.public
      - commands
      - groups:history
      - groups:read
      - im:history
      - im:read
      - im:write
      - reactions:read
      - reactions:write
      - users.profile:read
      - users:read
      - users:read.email
      - files:read
      - files:write
      - remote_files:write
      - remote_files:read
      - remote_files:share
settings:
  event_subscriptions:
    request_url: https://slack-bot-url-where.deployed.com/slack/event
    bot_events:
      - app_home_opened
      - app_mention
      - app_uninstalled
      - message.channels
      - message.groups
      - message.im
      - reaction_added
      - reaction_removed
  interactivity:
    is_enabled: true
    request_url: https://slack-bot-url-where.deployed.com/slack/action
  org_deploy_enabled: false
  socket_mode_enabled: false
  token_rotation_enabled: false


6. 📌📌 Provide the following secrets to the DevOps team:

  • App ID
  • Client ID
  • Client Secret
  • Signing Secret
How to Connect Enji.ai Bot to Slack
Your Enji.ai Bot APP secrets

7. In Display Information specify the avatar: https://enji.ai/wp-content/uploads/2023/08/enji-ai-logo.jpg.

8. In the OAuth Tokens for Your Workspace (OAuth & Permissions menu), click on Install to Workspace.

  • Bot User OAuth Token – 📌📌Provide this to the DevOps team.
How to Connect Enji.ai Bot to Slack

9. Backend and slack-bot environment variables need to be filled out (handled by the deploying DevOps):

Backend:

SLACK_BOT_CLIENT_ID=
SLACK_BOT_CLIENT_SECRET=

# Slack bot base url
SLACK_BASE_URL=

COLLECTOR_URL= `<frontend-domain.com...>`

Slack-Bot:

# slack
SELF_URL=<slack_bot_base_url>
SLACK_URL=https://slack.com/api
SLACK_OAUTH=oauth.access
SLACK_SIGNING_SECRET=
SLACK_COLLECTOR_BOT_ID=<app_id>
SLACK_COLLECTOR_BOT_TOKEN=<bot_user_oauth_token>
SLACK_COLLECTOR_BOT_CLIENT_ID=
SLACK_COLLECTOR_BOT_CLIENT_SECRET=
SLACK_COLLECTOR_BOT_SCOPE=channels:history,channels:read,chat:write:bot,commands,groups:history,groups:read,im:history,im:read,mpim:history,mpim:read,reactions:write,users.profile:read,chat:write:user

# Enji backend API's
SLACK_COLLECTOR_GET_TRIGGERS_URL=<backend_base_url>/api/v1/triggers/
SLACK_COLLECTOR_GET_SLACK_USER=<backend_base_url>/api/v1/get_slack_user/
SLACK_COLLECTOR_GET_ACTIVITY=<backend_base_url>/api/v1/me/activity/collector
SLACK_COLLECTOR_SEND_STANDUP_URL=<backend_base_url>/api/v1/register_standup
SLACK_COLLECTOR_UPDATE_SLACK_USER=<backend_base_url>/api/v1/update_slack_user/
SLACK_COLLECTOR_UPDATE_STATUS=<backend_base_url>/api/v1/update_employee_status/
SLACK_COLLECTOR_GET_EMPLOYEE_STATUS=<backend_base_url>/api/v1/get_employee_status/
SLACK_COLLECTOR_GET_CREDENTIALS_URL=<backend_base_url>/api/v1/get_slack_credentials/
SLACK_COLLECTOR_EVENT_REGISTER_URL=<backend_base_url>/api/v1/triggering/register_event/
SLACK_COLLECTOR_TRIGGER_FORCE_REPORT_URL=<backend_base_url>/api/v1/get_projects_for_standup/
SLACK_COLLECTOR_GET_MOTIVATIONAL_MESSAGE=<backend_base_url>/api/v1/get_motivational_message/
SLACK_COLLECTOR_GET_PROJECTS_FOR_STANDUP_URL=<backend_base_url>/api/v1/get_projects_for_standup/
SLACK_COLLECTOR_DELETE_STANDUP_MESSAGE_URL=<backend_base_url>/api/v1/delete_standup/
SLACK_COLLECTOR_UPLOAD_URL=<backend_base_url>/api/v1/upload/
SLACK_COLLECTOR_UPDATE_BOT_CONNECTION_STATUS_TO_FALSE=<backend_base_url>/api/v1/update_bot_connection_status_to_false/

# Redis conection envs
REDIS_HOST=
REDIS_PORT=

Frontend:

VUE_APP_ADD_TO_SLACK_URL=https://slack.com/oauth/authorize?client_id={Client_id}\&granular_bot_scope=1\&scope=app_mentions:read,channels:history,channels:read,chat:write,chat:write.customize,chat:write.public,files:read,files:write,groups:history,groups:read,im:history,im:read,im:write,reactions:read,reactions:write,remote_files:read,remote_files:share,remote_files:write,users.profile:read,users:read,users:read.email,commands\&redirect_uri={<frontend-domain.com...>}/api/v1/project/set_workspace_token

10. Make the application (bot) public:

https://api.slack.com/apps/ → Your app name → Manage distribution -> activate public distribution

Organizing Standup Submission Process:

1. Add your Slack workspace to Enji:

  • Open project settings.
  • Go to the desired project in the Projects tab.
  • Click on CONNECT SLACK.
How to Connect Enji.ai Bot to Slack
Add your Slack workspace to Enji

2. Add the bot to the Slack channel:

  • Open your project’s Slack.
  • Click on +ADD APPS and add Enji.ai.
  • Add the bot to the necessary channels by mentioning @Enji.ai in a regular message.
How to Connect Enji.ai Bot to Slack

Channel selection for standup submission is not immediate. Enji checks for new workspaces every hour. Wait for the bot to process all open channels in your Slack. Private channels are not parsed automatically; you need to invite the bot for a Private channel to appear in the list.

3. Specify the channel for standup submission:

  • Return to Enji.ai project settings.
  • Choose the required channel from the list in the project admin.
How to Connect Enji.ai Bot to Slack
Slack workspace selection

4. Start submitting standups in the configured channel from Step 2.

Standup Submission Process:

  1. Tag the bot in the standup channel.
  2. Write about what you did yesterday, what you plan to do today, and report any problems/good things.
  3. The standup is considered accepted when the bot checks the standup.
How to Connect Enji.ai Bot to Slack
Standup example

Standup Submission Features:

  • Standupers: Anyone can submit a standup, whether they are from your project or not.
  • Reminders: The bot reminds about the standup submission deadline three times – usually 10 minutes before, at the deadline, and 10 minutes after. To receive reminders, check the is_standuper box in the SOW block. Reminders do not work for those not checked in the SOW list.
How to Connect Enji.ai Bot to Slack
Reminders №1-2
How to Connect Enji.ai Bot to Slack
Reminder №3
  • Keywords: Mandatory keywords for standups are “yesterday,” “today,” “problems,” and “good things.” Problem and good thing blocks are optional. If the bot doesn’t recognize keywords, it will notify in the thread.
  • Languages: The bot supports two languages in keywords: RU | ENG.
  • Standuper Status: When a standuper is on sick leave/vacation/day-off, switch to the “resting” mode in the employee profile in the top right corner Enji.ai.
How to Connect Enji.ai Bot to Slack

Setting Up Reminders:

  1. Go to project settings.
  2. In the General tab, select the workspace and channel where standups will be read from and reminders will be sent to.
  3. Open the Project Alerts tab.
  4. Enable team’s working days in Business Days and set the working hours in From and To.
  5. In the Standup reminder setting, specify the days and times to tag those who need to submit standups.
How to Connect Enji.ai Bot to Slack
#2 Setting up reminders
How to Connect Enji.ai Bot to Slack
#4 Working days
How to Connect Enji.ai Bot to Slack
#5 Set days and times

Standup Analysis:

Check the dynamics of standup submission in daily reports.

Analyze teammates’ focus on a daily basis, about their problems and joys, in Enji.ai → Project Report → Standups. This report collects standups from all team members and even shows who was late and who submitted standups on time.

How to Connect Enji.ai Bot to Slack
Daily report in Slack
How to Connect Enji.ai Bot to Slack
Report in Enji

Glossary:

NameExplanation
StandupA brief asynchronous communication process with the format: “What did you do yesterday?” “What do you plan to do today?” “What hinders your work?” “What helps your work?”
KeywordsMandatory sections in a standup for it to be successfully accepted by the bot.
StanduperA person submitting standups regularly.
SlackA messaging app for businesses.
Slack WorkspaceA working space for team communication, consisting of channels and direct messages
Slack ChannelSpecial “rooms” within a Slack workspace that brings together specific people and information.
Enji.ai BotAn application operating in Slack channels for message exchange, asking a set of standup questions at a specific time every working day.
Project SettingsEnji.ai admin interface for adding Slack workspaces and selecting the main channel for standups.
ENJI
Enji.ai