Slack is a popular messaging tool for teams to communicate and to automate notifications from third-party applications. Matillion can send messages to Slack via Amazon SNS messages. This can be used to create a Slack Channel to provide updates on the status of Matillion job runs.
How to Integrate Slack with Matillion
In order to configure Matillion to work with Slack, the first step is to set-up a Slack channel to hold all of the Matillion messages and to configure it to listen to the SNS messages using an Incoming WebHook.
Add a new Configuration and select the Slack Channel to post to:
Select Add Incoming WebHooks Integration to access the Setup Instructions. Make a note of the Webhook URL from below:
The next step is to Create an SNS Topic for Matillion to send the messages to. This is done in the AWS console. The SNS messages need to be pushed to Slack via a Lambda Function. Create a new Lambda Function in the AWS Console using the Blank Function Blueprint with an SNS trigger. Further details on the function code which calls the Slack Webhook URL is available in our Technical Article.
The function can be tested directly from Lambda. The test should run successfully with the below execution result:
A message should also appear in the Slack Channel:
Matillion can now put messages on the SNS Topic and these messages will appear in Slack. An example job is shown below.
This Orchestration job runs a Transformation job. The Transformation job has been configured to export the Duration of the job to a Global Environment Variable called time.
Once the Transformation job runs successfully, Matillion puts a message on the SNS Topic and the message is that the job has successfully run and how long the job ran for:
This message is successfully posted to the Slack Channel.
[callout-content title=”Arrange a free demo of Matillion ETL to see it in action and integrate your job run results with Slack.”]
[button title=”Request a free demo” link=”https://matillion.com/get-a-demo/”]