Custom Slack App

Create your own app

This feature is in beta. We'd love your feedback — please get in touch and let us know how it can be improved.

If you're curious what our team is working on, see our roadmap and follow us on Twitter!

Create and install your own app into your slack workspace

  • Create a Slack application and obtain an oauth key.
  • Send us your oauth key (encrypt it with our public PGP key).
  • Verify the slack channel in MagicBell is enabled

Create a slack application and obtain an oath key

Head over to https://api.slack.com/apps and click on the "Create New App" button

Name your slack app to something that makes sense to you, eg MagicBell, select the workspace you'd like to install it to and cleck on Create.Under the Basic Information section, click on the "Bots" section. Next we'll assign the required scopes to your bot token to ensure messages reach the correct recipients.Click on the "Review Scopes to Add" button.Under the "Bot Token Scopes" add the following scopes:The only thing remaining is to install the app to your workspace:Click "Allow"This takes you to the OAuth & Permissions page. From here copy the Bot User OAuth Token from the OAuth Tokens for Your Workspace section and send it over.

Verify the slack channel in MagicBell is enabled

Go to https://app.magicbell.com/projects/project_id/channels and ensure that the slack channel is enabled.

Send a notification to a slack user/channel

Once your account is set up, MagicBell will automatically deliver slack notifications through your Slack app, no additional work is needed. To send a message to a Slack Channel use the Channel's ID as the externalId. To send a DM in Slack you can use the user's email address.

{
  "notification": {
    "title": "Welcome to Example Inc",
    "recipients": [
      {
        "email": "dan@example.com",
        "externalId": "AB1234BCA"
      }
    ],
    "custom_attributes": {
      "name": "Dan",
      "company": {
        "name": "Example Inc"
      }
    }
  }
}

Distribute your app to your end users

One you've tested the integration between MagicBell and Slack, you can distribute your application to your end users. Currently you need to contact MagicBell when your app installed into a Slack workspace. We will set up the installed slack app in MagicBell's backend. We're working on providing an API for this in the near future.