Alerting & messaging can be used to inform the right person at the right time with the right data. For example you could send out alerts to Slack or MS Teams when stock levels drop below a threshold, or you could send out weekly emails with personalized PDF or Excel reports to each store manager in a large retail company.
Related info per connector:
Send a message to Slack
You can use the Slack connector to send messages and alerts to Slack users and Slack channels. Example:
message = {
"text": "Stock levels are below threshold !",
"channel": "logistics",
"username": "Peliqan bot"
}
conn = pq.connect('Slack')
result = conn.add('message', message)
st.json(result) # for debugging only, see result of sending message to SlackSend out emails
You can sign up for a free account on Postmark, and use the Postmark connector in Peliqan to both receive and send out emails.
Send an email
Send email with data
Example sending an email with the result of an SQL SELECT query, on a table in the Peliqan data warehouse:
Send email with text file as attachment
Send email with CSV file as attachment
Example where we store the result of SQL SELECT query in a CSV file and send this file as an email attachment:
Send email with PDF as attachment
See the Reporting section for a detailed example on how to generate a PDF file and send that PDF file as an attachment in an email:
Generate and distribute PDF reports