Pular para o conteúdo

Slack

Neste guia, veremos como integrar seu Assistente de IA ao Slack. Resumo:

  1. Criar um app dedicado no Slack
  2. Configurar o app do Slack
  3. Integrar seu bot do Slack ao Quickchat AI

Acesse api.slack.com/apps e clique em create a new app.

create_slack_app_1

Selecione Create an app from scratch, defina o nome do Assistente e o Workspace e clique em Create App.

create_slack_app_2

create_slack_app_3

O Slack permite configurar via manifesto (YAML). Nos App Settings, vá em Features → App Manifest.

create_slack_app_5

Cole o manifesto YAML e ajuste conforme necessário:

display_information:
name: Talk to AI
description: Talk to me about Quickchat!
features:
app_home:
home_tab_enabled: false
messages_tab_enabled: true
messages_tab_read_only_enabled: false
bot_user:
display_name: Talk to AI
always_online: true
oauth_config:
scopes:
bot:
- im:history
- im:write
- chat:write
settings:
event_subscriptions:
request_url: https://slack.quickchat.ai/chat/
bot_events:
- message.im
- app_home_opened
org_deploy_enabled: false
socket_mode_enabled: false
token_rotation_enabled: false
display_information:
name: Talk to AI
description: Talk to me about Quickchat!
features:
app_home:
home_tab_enabled: false
messages_tab_enabled: true
messages_tab_read_only_enabled: false
bot_user:
display_name: Talk to AI
always_online: true
oauth_config:
scopes:
bot:
- im:history
- im:write
- chat:write
- app_mentions:read
- channels:history
- groups:history
settings:
event_subscriptions:
request_url: https://slack.quickchat.ai/chat/
bot_events:
- message.im
- app_home_opened
- app_mention
- message.groups
- message.channels
org_deploy_enabled: false
socket_mode_enabled: false
token_rotation_enabled: false

Salve o manifesto. Antes de aplicar, o Slack pode pedir para verificar a URL:

create_slack_app_6

Seu app está configurado. Para ajustar visual, vá em Settings → Basic information → Display Information:

create_slack_app_7

Você precisará de:

  • App ID: Settings → Basic Information → App Credentials
  • Signing Secret: Settings → Basic Information → App Credentials
  • Bot User OAuth Token: Features → OAuth & Permissions → OAuth Tokens for Your Workspace (instale o bot e copie o token)

create_slack_app_8

Deixe a aba aberta.

Em uma nova aba, abra o painel do Quickchat AI, vá em Integrations, selecione Slack e informe App ID, Signing Secret e OAuth Token.

slack_integration

Pronto! 🎉 Seu bot está pronto para testes no Slack!