GithubHelp home page GithubHelp logo

isabella232 / openwhisk-sample-slackbot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from apache/openwhisk-sample-slackbot

0.0 0.0 0.0 15 KB

[DEPRECATED] - A proof-of-concept Slackbot to invoke OpenWhisk actions.

License: Apache License 2.0

Scala 100.00%

openwhisk-sample-slackbot's Introduction

Slackbot for OpenWhisk

This repository contains proof-of-concept-quality code to deploy a Slackbot with the capability to run OpenWhisk actions.

Setup

  1. Copy src/main/resources/application.conf.template to src/main/resources/application.conf and fill in the credentials as indicated in the comments.

  2. Run slack.whisk.Main.

You can run either from sbt directly, or use sbt eclipse to generate an Eclipse project and create a run configuration from there.

Usage

(Assuming your bot is called @whiskbot.)

Send a run command either as a direct message, or using a mention in a channel where the bot was invited:

@whiskbot: please run this for me:
```function main(args) {
    return { "greeting": "Hello " + args.name + "!" };
}```
```{ "name" : "visitor" }```

The message needs to contain the keywords "run", "please", and two triple-quoted blocks; one for the JavaScript code, and one for the action payload.

Caveat emptor

  • The bot currently only supports JavaScript actions.
  • The bot will stop if the websocket connection is lost.
  • You must assume users of the bot will be able to gain access to the OpenWhisk credentials.

openwhisk-sample-slackbot's People

Contributors

mrutkows avatar psuter avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.