# What are custom OAuth profiles?

Custom OAuth profiles allow your Slack apps to leverage the Workato Slack connector under the hood. You can fully customize your Slack app's identity, i.e.:

  • Branding (bot name, bot logos, background color)
  • Permissions

# When would I need custom OAuth profiles for Slack

  1. You want multiple apps that each perform workspace orchestration as part of their automations, for example, creating/archiving conversations. For example, an EscalationBot could create a private conversation, invite crisis management team members, and archive it once the issue is resolved. At the same time, BirthdayBot could perform the exact same actions – create a private conversation, invite the party planners, and archive it once the birthday is over – but for vastly different purposes.

  2. You want control over your app's branding & appearance.

  3. You want control over your bot's permissions. The minimum permissions for optimal use are listed in the table below.

    Token type Scope Reason
    Bot None No bot scopes required.
    User channels:read Retrieves list of public conversations.
    channels:write Create/update public conversations.
    groups:read Retrieves list of private conversations.
    groups:write Create/update private conversations.
    im:read Retrieves list of direct message conversations.
    im:write Create/update direct message conversations.
    mpim:write Create/update multi-party group conversations.
    mpim:read Retrieves list of multi-party group conversations.
    chat:write Post messages as user.
    users:read Get user info.
    users:read.email Get user info by email.

Custom permission scopes A custom set of permission scopes

# Creating a custom OAuth profile

To get started, head to Tools ➤ View all tools. Under Connect apps, select Custom OAuth profiles. Once there, select Create a new custom OAuth profile.

Custom OAuth profile If you don't see Custom OAuth profile, make sure your workspace has access to this feature

Next, choose Slack as your application. Slack custom OAuth profile

In Step 2, select Create new app.

Creating a new Slack app

This will open a new tab that brings you to https://api.slack.com/apps (opens new window). Keep both the Workato tab and this new tab open - you'll need both to complete Steps 3 and 4.

Sign in to your team (if you haven't already), then select Create New App.

Create new app in Slack 1

In the form that pops up, give your app a name - it typically describes its intended functionality, for example, HRBot, or SupportBot.

Choose which Slack team this app belongs to, then select Create App.

Create new app in Slack

Your app should now be created. You should be greeted with your new app's Basic Information page. If not - don't sweat it. Just select Basic Information from the left navigation menu.

New app created

Scroll down to App Credentials you'll need this information back in your Workato tab. With this info handy, we can now head back to the Workato tab to complete Step 3.

In Step 3, fill up:

  • Name: This should be the same name you used when creating the app for example, HRBot
  • Client ID
  • Client secret
  • Verification token

App credentials Configuring Workato to talk to your app

Hit Save once you're done. We can now configure your app to talk to Workato in Step 4.

# Enabling event subscriptions

To enable event subscriptions, go to your Slack app's page (it should look something like 'https://api.slack.com/apps/{your_app_id} (opens new window)' — your app ID is unique to your app). Under Event Subscriptions, turn on 'Enable Events', then paste the URL from your New event trigger into the Request URL field and click Save.

Event subscriptions Enabling event subscriptions

For a new event trigger to pick up events, your app needs to know where to send these events to. That's why it comes with a target URL. This Target URL is generated once you've entered an Event name. Once your app is sending events to your recipe's target URL, the recipe can take over and execute your recipe's actions.

# Subscribing to workspace events

Slack provides an entire list of workspace events that you can subscribe to — any of these events can kick-start your recipes.

In this example, customer success users are given the option to create a private channel between themselves & their customers whenever messages containing the word 'resolve' are posted in certain channels and direct messages (DMs). Hence, the events message.channels, message.groups and message.im were chosen as triggers.

Event subscription example Whenever a message is posted to a channel, a private channel, or a DM, an event is sent to the recipe

Subscribing to events will automatically add scopes that your app does not already have. This may give your app unintended permissions from the additional scopes. After subscribing to events, we strongly recommend going to OAuth & PermissionsScopes to confirm your app's permission scopes.

# Installing your app

Once you've subscribed to at least 1 workspace event, a permission scope is automatically added. This allows you to install the app to your workspace. From the left navigation menu, under Settings, head over to Install App.

  • Select Install App to Workspace

Install app

Choose your Slack team and authorize it to complete the installation.

Jumping back to your custom OAuth profile in Workato, under Step 4, select Done to finish configuring the custom OAuth profile. You can now use this custom OAuth profile in other Slack connections in Workato!

# Using your custom OAuth profile

Once you've created a custom OAuth profile, anyone in your Workato workspace can use it in their own Slack connections to the Slack workspace — without having to create and configure a new Slack app.

Using custom OAuth profiles Using custom OAuth profiles in a new Slack connection

Note that custom OAuth profiles, by definition, can only connect to a single Slack workspace, i.e. 1 custom OAuth profile cannot be used across multiple Slack workspaces.


Last updated: 10/4/2023, 6:53:59 PM