Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suitable for interactive dialogs with users? #184

Open
problem-child opened this issue Apr 3, 2018 · 2 comments
Open

Suitable for interactive dialogs with users? #184

problem-child opened this issue Apr 3, 2018 · 2 comments
Labels

Comments

@problem-child
Copy link

Hi,

First up... thanks for such a great library! I've only been using it for a short time, but I've already managed to get a load of benefit from it - thanks!

I've have a query about a very specific kind of workflow, and I'd appreciate any advice on whether I'm going about things correctly, or whether I've set off in the wrong direction.

I'm trying to setup a slack integration (bot?) which users can instruct to setup watchers that monitor changes to items in an external system. My intended setup was:

  1. User asks bot to watch something.
  2. Bot takes user request and tries to identify item to watch in external system via API
  3. If there was any confussion about the item to watch, bot will respond to user with a menu of candidate items, and ask user to clarify which item should be monitored.
  4. User selects single item in menu, and bot is informed of the selection
  5. Bot writes the watcher conditions to a DB
  6. In the background, a daemon performs the monitoring, and notifies user of changes via slack web API.

As well as the above, I'd like to allow the user list the current watchers they have in place, and edit / delete them via slack.

My question is this... Is writing the above as a slack bot (and using the slack-ruby-bot) a sensible / plausible approach? Specifically, I'm not sure if step 4 fits into this setup as the menu response seems to need to be provided with a response URL. I can see that items #180 and #177 are related to attachments, but I don't think they are necessarily to do with the user interactions.

Looking through the Slack docs, my understanding is that I may need to set this up as a Slack App rather than a SlackBot. Does this seem correct?

Many thanks!

@dblock
Copy link
Collaborator

dblock commented Apr 3, 2018

I think this is a reasonable approach. Selection via attachments works just fine, you can see an example here that is handled here. There's also easy all-in-one daemon support, checkout this.

@dblock dblock added the question label Apr 3, 2018
@problem-child
Copy link
Author

Amazing - thanks!

Looks like I need a combination of 1) bot for initial triggering of the action, and then 2) api for handling the the interactive element callbacks

Those two projects look like they cover all main features I was looking for. I'll see if I can get them setup locally by following the DEV.md instructions and see if I can figure out how it all hangs together, and then have a crack myself.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants