Slack Library

This module (incode-module-slack-dom) provides the ability to post to a Slack channel (with Slack running on the Cloud).

API & Implementation

The SlackService defines the following API:

public class SlackService {
    public boolean isConfigured() { ... }                       (1)
    public boolean channelExists(String channelName) { ... }    (2)

    public void sendMessage(                                    (3)
            String channelName,
            String message) { ... }
    public SlackMessageHandle<SlackMessageReply> sendMessage(   (4)
            String channelName,
            SlackPreparedMessage preparedMessage) { ... }
1 whether the service is available for use. If not configured, then the sendMessage(…​) methods will silently no-op.
2 allows consumers to check whether a channel exists (before attempting to use it in the sendMessage(…​). If the servicew is not configured, then returns false.
3 Sends a message to the specified channel. If no such channel exists, then an IllegalArgumentException will be thrown.
4 Allows more sophisticated messages to be sent (using the API of the underlying implementation library, Simple Slack API.

These actions are all programmatic and do not appear in the UI.

How to configure/use


Update your classpath by adding this dependency in your dom project’s pom.xml:


Check for later releases by searching Maven Central Repo.

Configuration Properties

There is one mandatory configuration property.


The authToken can be obtained by logging into your account, on the settings page for bots. This token represents the credentials of the bot posting to the channel, so obviously should be kept private and not be shared around.

System Properties

Optionally, an http/s proxy can be set, by setting two system properties:


Note that the system properties for SSL (https.proxyHost and https.proxyPort) are NOT checked.


In the AppManifest, update its getDependencies() method, eg:

public Set<Module> getDependencies() {
    return Sets.newHashSet(
            new org.incode.module.slack.SlackModule(),

Known issues

None known at this time.


Maven can report modules dependencies using:

mvn dependency:list -o -pl modules/lib/slack/impl -D excludeTransitive=true

which, excluding Apache Isis itself, returns these compile/runtime dependencies: