Slack
Run maira commands and playbooks from slack and send notifications to slack from playbooks
Description
Slack integration lets you run individual maira commands, mpl statements and entire playbooks right from slack. The output can then be shared in with other peopl from within slack.
You can also send a notification from your playbooks to a specific user or channel in slack.
Installation
SaaS Deployment
To integrate with Slack, click on Add to Slack
Once added to your slack workspace, you can issue /mpl login
command to connect slack user with maira user. Once user connection is successful, you can use /mpl help
command to get help with maira.
On-Prem Deployment
If you are using on-prem deployment of Maira, the standard Maira app will not work. You need to create a new app in your workspace. Below are the instructions:
- Go to workspace dropdown(top left)>Settings and Administration> Manage Apps
- Click on 'Build' in top right Corner
- Click 'Create New App' > 'From an App Manifest'
-
Choose the Workspace and replace the manifest YAML file shown in next step and click on 'create'
display_information: name: Maira features: bot_user: display_name: Maira always_online: true shortcuts: - name: Run Maira Command type: global callback_id: maira_functionalities description: Choose from various Maira Functionalities - name: Execute Playbook type: global callback_id: execute_playbook description: Execute any playbook slash_commands: - command: /mpl description: Execute mpl command usage_hint: mpl command. should_escape: false oauth_config: scopes: bot: - app_mentions:read - channels:read - chat:write - chat:write.public - commands - incoming-webhook - users:read - channels:manage settings: event_subscriptions: bot_events: - app_mention interactivity: is_enabled: true org_deploy_enabled: false socket_mode_enabled: true token_rotation_enabled: false
-
Click 'Install to Workspace' > Select a channel > click 'Allow'
- Use the
Bot User OAuth Token
from OAuth and Permissions page of the app to fill theslack_bot_token
value inmaira.yml
- Select Basic Information link from the left sidebar and scroll down to section App-Level Token. Click on the Generate Token and Scopes button.
- Enter a Name, select
connections:write
scope, and click Generate. Use this token to fillslack_app_token
value inmaira.yml
in Maira gitops based deployment