How to use IBM App Connect with Slack

Slack is a web-based, real-time and archived messaging app for your team. You can communicate in open or private channels, send direct messages to colleagues, and share files.

Availability:
  • A connector in IBM App Connect Enterprise as a ServiceApp Connect Enterprise as a Service connector
  • A connector in IBM App Connect on IBM CloudCloud-managed connector
  • A local connector in a Designer instance of IBM App Connect in containers (Continuous Delivery release)Local connector in containers (Continuous Delivery release) 11.0.0.10-r1 or later
  • A local connector in a Designer instance of IBM App Connect in containers (Extended Update Support)Local connector in containers (Extended Update Support release)
  • A local connector in a Designer instance of IBM App Connect in containers (Long Term Support)Local connector in containers (Long Term Support release)

Connecting to Slack

For the considerations and steps you need to connect App Connect on IBM® Cloud to a Slack account, see Connecting to Slack from App Connect on IBM Cloud and App Connect Enterprise as a Service.

What should I consider first?

Before you use App Connect Designer with Slack, take note of the following considerations:

  • (General consideration) You can see lists of the trigger events and actions that are available on the Catalog page of the App Connect Designer.

    For some applications, the events and actions in the catalog depend on the environment (IBM Cloud Pak for Integration or App Connect on IBM Cloud) and whether the connector supports configurable events and dynamic discovery of actions. If the application supports configurable events, you see a Show more configurable events link under the events list. If the application supports dynamic discovery of actions, you see a Show more link under the actions list.

  • (General consideration) If you are using multiple accounts for an application, the set of fields that is displayed when you select an action for that application can vary for different accounts. In the flow editor, some applications always provide a curated set of static fields for an action. Other applications use dynamic discovery to retrieve the set of fields that are configured on the instance that you are connected to. For example, if you have two accounts for two instances of an application, the first account might use settings that are ready for immediate use. However, the second account might be configured with extra custom fields.
  • Before you add some of the Slack events or actions to your flow, make sure you have the following resources:
    • A Slack workspace. If your team isn't using Slack yet, you can get started with Slack (without charge) and create a Slack workspace at https://slack.com/intl/en-gb/get-started#/.
    • If you want to use the new message action in Slack as the event trigger, you'll need to configure the Webhook callback URL that is displayed in the UI when you select the New message trigger. To do this, you need to create a custom slash command in Slack. To create a custom slash command in Slack, complete the following steps.
    1. Sign in to Slack.
    2. Click the arrow next to your team name and then click Administration > Manage apps. Alternatively, click Add apps as shown in the following example.
      Slack menu option 'Add apps'
    3. In the Search App Directory field, type slash commands
    4. Click Add Configuration.
    5. Enter a Slash Command name then click Add Slash Command Integration.
    6. In the Integration Settings section, update the following fields with the following details to create a Slack Slash Command:
      • URL: Paste the Webhook callback URL displayed in the App Connect UI.
        • Webhook callback URL example
        • Webhook callback URL example
      • Method: POST (The data is sent to your URL as a HTTP POST with a content-type header set as application/x-www-form-urlencoded).
      • Update the other fields as desired.
    7. Click Save Integration.

    To test your custom slash command, complete the following steps.

    1. Go to any channel in Slack.
    2. Type the slash command you just created.
    3. A Message published message is displayed in Slack

Events and actions

Slack events

These events are for changes in this application that trigger a flow to start performing the actions in the flow.

New slash command message

Slack actions

These are actions on this application that you want a flow to complete.

Channels
Retrieve channels
Files
Add file
Delete file
Retrieve files
Groups
Retrieve groups
Messages
Send message
Retrieve messages
User groups
Update user group
Retrieve user groups
Users
Retrieve users

Examples

You can find examples of using Slack in App Connect in the Templates gallery of App Connect on IBM Cloud and in the tutorials provide in this documentation. Links to some examples are given below; for other examples in templates and tutorials, see:
Screenshot of the dashboard tile for a template that uses Asana

Use templates to quickly create flows for Slack

Learn how to use App Connect templates to quickly create flows that perform actions on Slack; for example, open the Templates gallery, then search for slack.

Screenshot of the dashboard tile for a flow that connects Slack and MailChimp

Adding a MailChimp subscriber when a new message is added to Slack

Learn how easy it is to create an event-driven flow that is triggered by a new message in Slack so that you can perform an action in another app.