Skip to content
Chatbot Management

Chatbot Management

Chatbot Management sends direct messages to users of a chat system through a bot account, currently Mattermost. Recipients are addressed by their user ID or mail address. Messages are not queued: if sending fails, the error is returned.

Send a test message

Enable

import cfgchatbot "go.wdy.de/nago/application/chatbot/cfg"

chat := std.Must(cfgchatbot.Enable(cfg)) // cfgchatbot.Management

Chatbot Management enables Secret Management. cfgchatbot.Management has the fields UseCases chatbot.UseCases and Pages uichatbot.Pages with the path Send.

Configure a provider

Create a secret of the type Mattermost Chatbot with the server URL and the bot token in the vault and share it with the group System.

Use cases

Use caseDescription
SendSends a direct message (message.SendRequested) to a user, found by ID or mail.
ReloadProviderRebuilds the providers from the vault, also done automatically.

Publishing a message.SendRequested on the event bus sends it as the system user.

Permissions

PermissionAllows to
nago.chatbot.provider.sendsend messages
nago.chatbot.provider.reloadreload the providers

UI

admin/chatbot/send sends a test message. The admin center shows it as Send message in the group Chatbot.

Related