Slack

The Slack connector can be used to send messages to channels or individuals in Slack from your scripts in Peliqan. For example, you can implement data monitoring apps that send alerts to Slack in case of data problems such as missing data.

Connect Slack

In Peliqan, go to Connections, click “Add connection”, and select Slack from the list.

Complete the authorization flow by granting the Peliqan app access to your Slack account.

Send a message to Slack

Here’s an example on how to send a message to a Slack channel:

slack = pq.connect("Slack") # use your name of the connection
slack.add("message", channel = "QA", text = "Data quality alert")

Example with a custom bot name:

slack.add("message", 
    channel = "QA", 
    text = "Data quality alert",
    username = "my bot" 
    )

Example sending a message to an individual on Slack (not a channel):

slack.add("message", 
    channel = "@some_user_name",  # don't forget the "@" sign
    text = "Data quality alert",
    username = "my bot" 
    )