Translating Slack Bots and Applications

Overview

Bots and applications built for Slack can work on a variety of chat platforms using the Message.io translation service. The following guide covers the steps required to translate your Slack bots and applications to other platforms using Message.io.

Requirements to follow this guide:

Once you've registered Slack as your Message.io app platform, you'll need to:

  1. Choose which feature(s) your Slack app uses and fill out any required details
  2. Update your app with Message.io specific credentials and API endpoint
  3. Configure platform(s) to distribute your Slack app to

ℹ️ Create a new Instance - For maintaining your existing app’s performance and stability, we recommend leaving your existing deployments as is and setting up a new app that connects with the Message.io API endpoint. For example, Slack apps should directly communicate with Slack users and a new instance of the app would be for Message.io translation to other platforms.

Notice: All API traffic is subject to the Platform's terms of service. To read Slack's terms of service in detail, go to slack.com/terms-of-service/api.

Sections:


Slack App Features

Many apps leverage multiple features within Slack. To support this use case, select all the Slack features your app supports. Each feature will ask for separate details in subsequent screens. Make sure to save all the information provided by Message.io for updating your app.

Select App Features

Incoming Webhooks

Details required to set up Incoming Webhooks:

Setup Incoming Webhooks

Interactive Messages

Details required to set up Interactive Messages:

Setup Interactive Messages

Slash Commands

Applications built on Slash Commands enables 3rd party apps to send commands at a POST endpoint via HTTPS. In addition, the app receives notifications in response.

When a command is triggered, the request (message) is sent to a specified URL via HTTP POST. Bot developers take that inbound request and choose if/how to respond back to the user.

Translating Slash Commands to other platforms

Slash Commands have a specific syntax when interacting through the UI. For example, a slash command bot that accepts the following command:

/weather 78751

Note this requires a variation of the command to work on platforms without slash command functionality by default. An example of this would be the same command as a @mention:

@weather 78751

Which would trigger the same response:

:sunny: It's 103 degrees right now

Details required to set up Slash Commands:

Setup Slash Command

Event Subscriptions

Applications built on the Events API allow developers to program functionality based on response interactions with a user. When translating to other platforms, the same REST functionality is passed as requests/responses.

At the core, Events API apps have a Request URL that is the recipient of all event notifications, which then responds to the services with a 200 OK message.

On Message.io, we handle the inbound requests and translate them into the equivalent functions for each platform.

Details required to set up Event Subscriptions:

Setup Event Subscriptions

Bots

Real Time Messaging (RTM) Bots connect directly via Web Sockets to the Slack API service. Two main routes are through standard OAuth and Internal integrations. Message.io can handle either use case and the following details will be required for registering a RTM bot.

Details required to set up Bots:

Setup Bot

OAuth and Permissions

If your Slack app requires OAuth functionality, enter the redirect URL.

Setup OAuth and Permissions

Message.io Credentials and Endpoint

Replace credentials and API Endpoint

Once you've selected the features your app uses and filled in the required details, Message.io will generate new credentials for your app instance. The API endpoint in your app instance will also need to be updated to https://slack-api.message.io before it can communicate with Message.io's translation service.

If your bot is built with Botkit version 0.50 or greater, you can override the API endpoint by specifying api_root in the configuration.

Example:

 var controller = Botkit.slackbot({
     debug: false,
     api_root: 'https://slack-api.message.io'
 });

Add Deployment Platforms

Once you've registered a Message.io app, there are multiple platforms available to deploy to. Simply select a platform and follow the steps to configure messaging endpoints, tokens, and any additional app details.

deployment-platforms

More detailed guides such as Deploying to Microsoft Teams are available under Bot Translation.

results matching ""

    No results matching ""