Creating a Slack Bot

Follow these steps to create a bot for Slack:

  1. In Flow XO, click Bots in the top menu bar, then choose New Bot.
  2. Now choose Slack as the messaging platform.
  3. Type in a descriptive name for the bot.
  4. If you like, you can fill out the Welcome Text box. This is optional.
  5. Find the Slack App Redirect URI box and copy out the value. We'll paste this into Slack shortly.
  6. Now we'll head over to Slack at https://api.slack.com/apps/new.
  7. Give your new app a name and click Create App.
  8. Fill in any other basic information for the app, including setting an icon, name, description, etc.. When you're done (if you make any changes), click Save Changes.
  9. Click on OAuth & Permissions on the left menu. In the Redirect URL(s) box paste the URL you copied from Flow XO.
  10. Still in Slack, click the Bot Users link on the left. Click Add a Bot User, give the bot a username and finally click Add Bot User.
  11. Click on Interactive Messages on the left menu in Slack, click Enable Interactive Messages, and copy in the Slack App Interactive Messages Action URL from Flow XO. Click Enable Interactive Messages.
  12. Now click on Basic Information on the left, and you'll see your App Credentials. You'll then need to copy the Client ID and Client Secret into Flow XO.
  13. You can optionally fill in a Success URL. If you leave this blank, the user will be redirected to their Slack team after installing your bot. This is usually a good thing to do, but if you prefer, type a different URL to send the user to here.
  14. Now that's done, click Next to save those details and your bot is configured!
  15. The final step invites you to install your bot into your own team. Follow the steps on screen. You'll also see the information you need to tell other people how to install your bot.

Inviting to Channels

Slack bots have to be invited to channels that they can then participate in. Once you or any of your users have installed your bot, they'll need to use the command "/invite @username" (replace @username with your bot's username) to invite into channels.

Distributing Your Bot

You should use the Slack Button to allow people to install and use your bot with just a few steps.

Slack has a simple code generator on their site to get the code you need to display the button. Choose the app you just created from the list and tick only the Bot option. Then copy the code and paste wherever you want the button to be shown.

Publishing to the Slack App Directory

When you're happy that your bot is working as you expect, you can apply to have the bot listed in the Slack App Directory. Slack has details on their site about how to add an app.

Still need help? Contact Us Contact Us