This connector enables you to post message to Slack channels and Slack users.
You need a authentication token provided by Slack. For development and testing you can find login token in the Slack documentation: OAuth Tokens for Testing and Development.
Bot Users describes how to register a new bot user and receive a token for authentication of your app.
Example of a microflow that will post a message to a Slack channel:
Here's how you configure the action:
Example of a microflow that will send a direct message to a Slack user:
Here's how you configure the action:
Register a listener:
Microflow to handle new message received:
The sourcecode for this the Mendix Slack Connector can be found on Github: Mendix SlackConnector
All java jar dependencies are managed using an ivy file. You can download all dependencies by running runivy.cmd. This will save all jars in the userlib folder. There are two different scripts to run ivy:
- runivy.cmd - downloads all dependencies required for running and testing the project
- runivy-export.cmd - downloads only the dependencies required for distributing the connector mpk.
Before you start to develop the connector you need to run runivy.cmd. After you validate everything works, run runivy-export.cmd. This will delete all jars in the userlib folder and only download the jars required for creating the connector mpk.
This connector uses the Simple Slack api library.
For the unit tests you need to provide an authentication information configuration file $HOME/.slackconnector.cfg:
[UnitTesting]
authToken=XXXX
This connector is licensed under the Apache v2 license.
2016-jun-16 - revision 1.0
- Send message to channel
- Send direct message to user
2016-dec-16 - revision 1.1
- Registener message listener microflow
- Upgrade to Mendix 6.10.0
2017-feb-22 - revision 1.2
- Upgrade to Mendix 7.0
- Get username for user id
- Get channelname for channel id
2017-may-09 - revision 1.3
- Refactored slack connector to improve concurrency
2019-may-01 - Revision 1.4
- Upgrade to Mendix 7.23.3
- Upgrade Simple Slack API to version 1.2.0
- Updated to new Slack logo
- Only create slack listeners on instance 0