Skip to main content
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:
Example with a custom bot name:
Example sending a message to an individual on Slack (not a channel):

Send a chart or other data visualisation to a Slack channel

Sending an image (file) to Slack is done in 3 steps:
  1. Get an upload URL from Slack and provide the file size: slack_api.get('uploadurl', { 'length': file_size, 'filename': "chart.png" })
  2. Upload the file to the received upload URL: requests.post(upload_url, files = {'file': open('chart.png', 'rb')})
  3. Tell Slack that the upload completed and post in a channel: slack_api.add('uploadcomplete', { 'file_id': file_id, 'title': 'My chart', 'channel_id': channel_id })

Share a report in Slack

Similar to the above example, where we build an image of a report which was prepared in HTML.