A server-side Mattermost plugin that posts an announcement into a designated channel whenever a new channel is created. Useful for keeping a team aware of new spaces as they appear.
The plugin listens for the ChannelHasBeenCreated server hook. When a public (or, optionally,
private) channel is created, a bot posts a configurable message into the channel named in
Channel to Post, resolved within the same team as the new channel. Direct and group messages
are never announced.
- Build the plugin bundle with
make dist(or download a release.tar.gz). - Upload it via System Console → Plugins → Plugin Management.
- Enable the plugin.
- Configure the settings below under the plugin's entry in the System Console.
The bot user is created automatically on activation — you do not need to create it manually.
| Setting | Description |
|---|---|
| Bot Name | Username of the bot that posts messages (lowercase). Created automatically if it does not exist. Default newchannelbot. |
| Channel to Post | The channel name (URL handle) to post into. Resolved within the team the new channel belongs to, so each watched team needs a channel with this name. Default town-square. |
| Bot Message Template | The announcement text. Supports the placeholders below. Blank uses the default template. |
| Include private channels | When true, new private channels also trigger an announcement. Default false. |
| Mention | Prepended to the message: @channel, @here, or None. |
| Teams | Semicolon-separated list of team names to monitor. Empty means all teams. |
| Placeholder | Renders as |
|---|---|
{channel::name} |
The channel name (URL handle) |
{channel::displayName} |
The channel display name |
{channel::nameAsLink} |
The channel name as a link (~name) |
{channel::creator} |
The creator's name as a mention (@username) |
{channel::purpose} |
The channel purpose, bolded if present |
Default template:
Hello there :wave:. You might want to check out the new channel {channel::nameAsLink} created by {channel::creator}. {channel::displayName}'s purpose is '{channel::purpose}'
Built from the Mattermost plugin starter template, stripped down to a server-only plugin (no webapp, slash commands, HTTP API, KV store, or background jobs).
make check-style # gofmt + golangci-lint + go vet
make test # run unit tests
make dist # build the distributable bundle in dist/
Deploy to a local server (set the env vars first):
export MM_SERVICESETTINGS_SITEURL=http://localhost:8065
export MM_ADMIN_USERNAME=admin
export MM_ADMIN_PASSWORD=password
make deploy