Skip to main content
Skip table of contents

Slack

Cyclr Partner Setup

Slack uses OAuth 2.0 for authentication so you need to register your Cyclr Partner with Slack to obtain your Client ID and Client Secret values.

From https://api.slack.com/apps, select the Create an App button:

Slack - Create an App

Select From scratch then enter the:

  • App Name - a name for your App. This will be shown on-screen when users install the Slack Connector, and also appear as the username when you post to Slack.

  • Development Slack Workspace - which Slack Workspace your App belongs to. This just gives it a “home” and doesn’t prevent it from being installed in other people’s workspaces.

Redirect URL

You must add a Redirect URL to allow a Slack Connector to be installed successfully within Cyclr.

After you’ve created your App, set its Redirect URLs by going to Add features and functionality > Permissions:

Slack - Permissions

Then Redirect URLs.:

Slack - Redirect URLs

Add a new Redirect URL for your Cyclr Console’s Service Domain which is in this format:

https://{Cyclr Service Domain}/connector/callback

You can find your Cyclr Console’s Service Domain in your Cyclr Console under Settings > General Settings.

Request Scopes

In Slack, scroll down to the Scopes section and click to Add an OAuth Scope.

Scopes can be modified at a later stage by navigating to the OAuth & Permissions sidebar.

For example, if you add the chat:write scope to your Bot Token, it allows your app to post messages. If you add the channels:read, your app can access data about public Slack channels.

Add scopes to your Bot Token, not your User Token.

You only require a User Token if you need to act as a specific user - for example, posting messages on behalf of a user, or setting a user’s status.

Get Your App Credentials

To retrieve your Client ID and Client Secret values, go to Basic Information on the left then scroll down to App Credentials.:

Slack - App Credentials

Distribution (Optional)

If you want workspaces other than your own to use the app, Slack now requires you to activate public distribution:

  1. Navigate to your Basic Information page, select the dropdown for Manage Distribution and select Distribute App.

    Slack - Manage Distribution
  2. This screen shows any redirect URLs and features you have setup.

  3. Follow the steps in Remove Hard Coded Information and make sure you select Use HTTPS For Your Features.

    Slack - Remove Hardcoding
  4. Select Activate Public Distribution to make the app available to others, outside of your workspace.

Cyclr Setup

To set up the Slack connector in Cyclr, go to your Cyclr console:

  1. Go to Connectors > Application Connector Library.

  2. Use the search box to find the Slack connector.

  3. Select the Setup Required icon.

  4. Enter the below values:

Value

Description

Client ID

The client ID of the Slack account.

Client Secret

The client secret of the Slack account.

Scope

Optional: You can specify scopes instead of using the default ones.

  1. Select Save Changes.

If you leave any values blank, Cyclr asks for their values when you install the connector into an account. This means you can use different settings for different accounts

Slack Events/Cyclr Webhook Setup

The Cyclr Slack Connector supports webhooks so you can subscribe to Slack events such as File Created and File Shared events. These events use Cyclr's Partner-level single URL webhook.

Retrieve the partner level webhook URL

In your Cyclr console:

  1. Go to Connectors > Application Connector Library.

  2. Locate the Slack entry and edit it.

  3. Select the Settings tab.

  4. Make a note of the Webhook URL. This is your Partner-level webhook URL used when working with any Slack Connectors in that Cyclr Console and its Accounts.

Setup events in Slack

On the Slack API App page for your Slack App. You can find Slack's documentation on this here.

  1. Select Event Subscriptions in the left-hand menu.

  2. Set Enable Events to On.

  3. Enter the webhook URL found in the previous section in the Request URL field. You will see a green Verified if the URL is valid.

    image-20240503-103014.png

  4. Select Subscribe to bot events to expand the section.

  5. Select Add Bot User Event.

  6. Enter the event name corresponding to the Slack Connector’s Webhook Method you wish to use:

Slack Connector Method

Slack Event

File Created

file_created

File Shared

file_shared

App Mentioned

app_mention

Channel Message Posted

message.channel

Direct Message Posted

message.im

Message Posted

message

Multiparty Direct Message Posted

message.mpim

Private Message Posted

message.group

  1. Select Save Changes at the bottom of the page.
    Any scopes missing from your Slack App are automatically added based on the events you entered.

Setup the webhook in a cycle

In the cycle where you want to add the webhook, drag the appropriate Webhook Method into the Builder and connect to other Steps as normal.

You do not need to use the webhook URL from the webhook step as all requests will arrive there via the Cyclr Partner-level webhook URL you entered into your Slack App. They will then be routed by Cyclr to the correct Slack Connector and Cycle.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.