Slack is a team collaboration platform. Analysis of messages, shared files, and communication patterns in you can reveal team dynamics, identify prevalent topics, and assess employee engagement
Welcome to the Slack documentation for Dashbot! Integrating Dashbot into your Slack bot is quick and easy.
If you have any questions, comments, or suggestions, please feel free to contact us.
Slack Authentication & Token Generation
- Slack App with Bearer Token: You need to create a Slack app and install it to your workspace to get a
Bearer Token
for authentication. - There is also an option to utilize OAuth for authentication as opposed to creating a slack app.
To fetch messages from a Slack channel, you'll use the conversations.history
endpoint. Replace YOUR_SLACK_BEARER_TOKEN
with your Slack app's bearer token and CHANNEL_ID
with the ID of the channel you want to retrieve messages from.
GET https://slack.com/api/conversations.history
Authorization: Bearer xoxb-your-token
{
channel: "CONVERSATION_ID_HERE"
}
This request fetches the history of messages for the specified channel.
Post Messages to Dashbot
After retrieving the messages from Slack, the next step is to forward these messages to Dashbot. The following HTTP request template sends a message to Dashbot's Universal REST API. Replace YOUR_DASHBOT_API_KEY
with your Dashbot API key, and adjust the messageData
payload with the actual message data you've extracted from Slack in a format that Dashbot accepts.
POST https://tracker.dashbot.io/track?platform=universal&v=11.1.0-rest&type=incoming&apiKey=YOUR_DASHBOT_API_KEY
Content-Type: application/json
{
"text": "Extracted message text",
"userId": "Slack user ID or unique identifier"
}