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.

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 Slack

Send an email

You can sign up for a free account on Postmark, and use the Postmark connector in Peliqan to both receive and send out emails.

Example:

email = {
    "from": "[email protected]",
    "to": "[email protected]",
    "subject": "Here is your weekly report",
    "text": "We are happy to provide you with this report !",
    "html": "We are <b>happy</b> to provide you with this report !"
}
conn = pq.connect('Postmark')
result = conn.add('email', email)
st.json(result) # for debugging only, see result of sending email to Postmark