nautobot / nautobot-app-chatops

Extensible ChatOps Framework to enable other chatbots and the Nautobot chat command.
https://docs.nautobot.com/projects/chatops/en/latest/
Other
51 stars 34 forks source link

Allow interaction with Nautobot in threads #67

Closed nniehoff closed 1 year ago

nniehoff commented 3 years ago

Environment

Proposed Functionality

Slack provides threads for conversations, it would be cool to interact with nautobot in a slack thread

Use Case

When troubleshooting an issue, Alert manager fires an alert in a slack channel. The team then uses the thread from the channel to communicate about this issue and provide additional links, logs, etc for the issue. It would be nice to have some context from Nautobot in this thread. For now it would be cool if the team could interact with Nautobot in this thread, however I could also see some automation if an alert for a specific interface fires automatically respond in the thread with device/interface information from Nautobot.

smk4664 commented 2 years ago

This is going to be scoped for version 2.0.

sdoiron0330 commented 1 year ago

hey @smk4664, can you assign this to me please? thanks!

sdoiron0330 commented 1 year ago

So, the Slack documentation makes it pretty clear: slash commands are not available in threads.

We are, however, able to respond to an event by starting or replying within a thread. I had a couple of ideas for how this could potentially look (very rough screenshots).

Option 1) By mentioning the bot's name, we could parse the text after the mention to turn into a set of commands and display the results as normal. We should also be able to have the existing interactive blocks if a full command isn't sent (forgetting a device name when using get-device as an example).

image

Option 2) We could add a "Nautobot" button within the message shortcuts that present a modal/other interactive blocks for the user to then navigate, similar to some of the preexisting subcommands.

image

image

Both of these options add a new way of interacting with the bot and feel like a far step from the simple and clean slash command, so I wanted to pause and ask for opinions on if either of these options were a good direction to go in.

smk4664 commented 1 year ago

Are both an option? As long as we keep the processing and responses the same, I like the added functionality this would provide.