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:Send a chart or other data visualisation to a Slack channel
Sending an image (file) to Slack is done in 3 steps:- Get an upload URL from Slack and provide the file size:
slack_api.get('uploadurl', { 'length': file_size, 'filename': "chart.png" }) - Upload the file to the received upload URL:
requests.post(upload_url, files = {'file': open('chart.png', 'rb')}) - 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 })
