Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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.

...

  • 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 then replaces user ID with user name in all the slack messages and sends them sends them to next action in sequence. For example, user ID "XYZ" is replaced with username "bob":

Code Block
languagejs
   {
        "type": "message",
        "user": "XYZ",
        "text": "Did my email about Slack made it to the dev list?",
        "ts": "1484957540.000002"
    },

...