How to use IBM App Connect with Slack
Slack is a web-based, real-time and archived messaging application for your team. You can communicate in open or private channels, send direct messages to colleagues, and share files.
Supported product and API versions
To find out which product and API versions this connector supports, see Detailed System Requirements on the IBM Support page.
Connecting to Slack
- If you are using the cloud-managed Slack connector that is hosted in App Connect Enterprise as a Service, see Connecting to Slack from App Connect Enterprise as a Service.
- If you are using the local Slack connector in an App Connect Designer instance in a containerized environment, see Connecting to Slack from an App Connect Designer instance in a containerized environment (local connector).
What to consider first
- (General consideration) You can see lists of the trigger events and
actions that are available on the Applications and APIs page of the App Connect Designer.
For some applications, the events and actions depend on the environment 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 that you have 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#/.
- To use the new message action in Slack as the event
trigger, configure the webhook callback URL that is displayed in the UI when you select the
New message event. To configure this webhook, create a custom slash command
in Slack by completing the following steps.
- Sign in to Slack.
- Click the arrow next to your team name and click Add apps as shown in the following example. . Alternatively, click
- In the Search App Directory field, type slash commands
- Click Add Configuration.
- Enter a Slash Command name then click Add Slash Command Integration.
- In the Integration Settings section, update the following fields with the
following details to create a Slack Slash Command.
- In the URL field, paste the webhook callback URL that is displayed in App Connect.The following example shows a webhook callback URL in App Connect.Note: A webhook URL is associated with an account. Therefore, all flows that use that account have the same webhook URL and are triggered when an event occurs.
- Set the Method to POST. (The data is sent to your URL as an HTTP POST with a content-type header set as application/x-www-form-urlencoded).
- Update the other fields as you need.
- In the URL field, paste the webhook callback URL that is displayed in App Connect.
- Click Save Integration.
To test your custom slash command, go to any Slack channel and type the slash command that you created. If the command is successful, you see a Message published message in Slack.
Events and actions
Slack events
These events are for changes in this application that trigger a flow to start completing the actions in the flow.
- New slash command message
Slack actions
Your flow completes these actions on this application.
- Channels
-
- Create channel
- Retrieve public channels
- Direct messages
-
- Retrieve direct messages
- Files
-
- Add file
- Delete file
- Retrieve files
- Private channels
-
- Retrieve private channels
- Messages
-
- Send message
- Retrieve messages
- Multi person direct messages
-
- Retrieve multi person direct messages
- User groups
-
- Update user group
- Retrieve user groups
- Users
-
- Retrieve users
Examples
Use templates to quickly create flows for Slack
Learn how to use App Connect templates to quickly create flows that complete actions on Slack. For example, open the Templates gallery, and then search for Slack.