You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

The Slack Chat Bot is a serverless, event-driven bot designed using the OpenWhisk open source project.

This bot is designed to post slack messages to OpenWhisk dev list (dev@openwhisk.incubator.apache.org) on a daily basis so that OpenWhisk developers receives a daily digest of conversations, one digest per slack channel. A daily digest will bring one whole day worth of updates in a single email on dev list and are archived on dev list for reference purposes. A daily digest contains filtered and formatted slack messages in easy to read and searchable format. The messages like someone joining a channel or leaving the channel, status updates, etc are filtered to create a meaningful and concise digest.

Proposed Architecture

The Slack Chat Bot is designed with a sequence of three dependent actions (like microservices) which is invoked by an internal OpenWhisk alarm trigger (similar to a cron job). All three actions will be implemented in Python, using the Python runtime provided by OpenWhisk. Here is what action sequence does with its triggered flow.

Invoked once a day by an Alarm Trigger

 

The sequence of actions is invoked by Alarm trigger, which then starts a chain of microservices to retrieve slack history, filter and format the slack history, and compose email message which is sent to OpenWhisk dev list.


  • Retrieve Slack History - An action that is invoked every 24 hours with OpenWhisk slack domain and a particular channel, retrieves a bunch of messages and user map. It than replaces user ID with name in all the slack messages and sends them to next action in sequence. For example:

Unknown macro: { "type"}

,

Unknown macro: { "type"}

,

 

  • Format Slack History -  An action invoked by retrieve slack history action. It takes a list of slack messages and filters those messages to drop 

 

 

 

  • No labels