Building for Slack Enterprise Grid

Beep Boop and Slapp: all you need to build amazing Slack Apps

Mike Brevoort
Beep Boop HQ
Published in
5 min readFeb 1, 2017

--

We’re proud to announce today that Beep Boop is ready for Slack Enterprise Grid. Beep Boop is a ridiculously simple developer platform for Slack integrations. Slack is where work happens, and Enterprise Grid brings the power and utility of Slack to organizations of any size or shape. We are excited to work with Slack to help deliver this transformation.

Our team at Robots & Pencils created Beep Boop and Slapp as the best tools to build custom Slack Apps for your team, or any Slack team. We use it every single day and have built custom integrations for many Slack customers. We’re here to help you get the most out of Slack 🙌 .

Everything has changed, everything has stayed the same

Grid connects multiple Slack teams across large companies through shared channels and identity within the same enterprise organization. Teams can connect and collaborate through shared channels, a new feature that connects teams across workspaces and brings interesting opportunities to developers. Slack Apps may be installed in just one, some, or all teams within an organization. It’s a great way for Slack teams to try out apps before introducing them to the rest of the organization.

With Beep Boop you can easily extend Slack, integrate Slack with other systems, and create custom workflows specific to how your organization works. Developers and partners across your organization can collaborate to create custom Slack integrations that can be shared across workspaces with other teams. Beep Boop provides all of the tools you need to develop, deploy, host, and monitor your Slack integrations.

Beep Boop provides all of the tools you need to develop, deploy, host, and monitor your Slack integrations.

Building for Grid

When building for Enterprise Grid you’re going to want to use the Events API rather than the RTM API. The Events API will handle the deduping of messages across teams and make your life a lot simpler. Slapp launched on day one with the Events API; we have you covered 😉.

As you’ll see below, there are some tricky bits to be aware of with respect to managing and mapping OAuth tokens, but good news, if you are using Beep Boop and Slapp we handle all of it transparently for you!

Let’s consider some interesting scenarios. There are two teams in the same Enterprise organization: Team A and Team B. They collaborate in a shared channel called #shared. A Slack App with a bot user @bot is added to A but not B. Betsy is a member of Team B.

Scenario #1 — @bot is not a member of #shared:

Team B has no visibility to @bot. There is no @bot. You hear me? There is no @bot!

Scenario #2 — @bot is a member of #shared, but Betsy is not:

Betsy has no visibility to @bot

Scenario #3 — @@bot and Betsy are members of #shared:

This is where things get interesting!

  • Betsy can see @bot in #shared as a member of the channel. She can mention @bot in the channel, and @bot will receive events (message.channels, reaction_added, etc.) from Betsy or anyone else from Team B in #shared.
  • Betsy can interact with Buttons in @bot message.
  • Betsy will see @bot in Team B user directory! But anyone from Team B who is not a member of #shared will not see @bot.
  • Betsy is now able to direct message @bot from Team B!

So what can’t Betsy do? Betsy cannot invite @bot to any other Team B channel. And if @bot’s Slack App has registered a slash command, Betsy will not have access to it, even within #shared.

A new way to trial Slack Apps

This new feature introduces an interesting new use case. An Enterprise Grid user could install a Slack App in Team A and introduce it to Team B in a shared channel. Anyone from Team B in a shared channel can try the app via a DM or the shared channel. This is new way of trialling a Slack App in a team without actually installing it.

You might even create a team just for trying out new apps and allow anyone in the Enterprise organization to install them. And then you can trial them in other teams by introducing them in shared channels with limited memberships. These apps are basically firewalled within those channels.

Mind your tokens, mind your teams

If Betsy sends @bot a direct message from Team B, your app will receive these messages. However, the team_id of the event will not be a team your bot recognizes, and you have no OAuth tokens for Team B. So how do you respond to an im.message from Team B if you don’t have a token? Well, you can use your token from Team A, and there’s a new authed_teams property in message events. Look in this array, grab the first team ID and look up the corresponding OAuth tokens for this team. You can use these tokens to respond to the im.message event.

Beep Boop handles all of this logic for you. When your Slack App receives events from Beep Boop we “enrich” the requests with HTTP headers that contain the corresponding tokens, configuration and team information. In addition, Slapp has a new method msg.isAuthedTeam() to help you more easily distinguish if a message is from a team that hasn’t actually installed your app.

In our opinion, the Slack platform and Enterprise Grid combine to create the most impressive foundation for enterprise collaboration between people, data and systems ever developed. Beep Boop enables enterprise developers to rapidly create best in class, next-generation collaborative enterprise applications on top of Grid.

Our mission at Beep Boop is to provide the best tools for creating great Slack Apps. Beep Boop is a product by Robots & Pencils. Need help creating a great Slack integration? Let us know how we can be your hero. 🙋

And of course, please show the love 👉❤️ if you enjoyed this post.

--

--

Mike Brevoort
Beep Boop HQ

Just like you but different. Runner, cyclist, parent. Engineering @Slack