- Go 50.7%
- TypeScript 34.4%
- CSS 11.3%
- Makefile 2.4%
- JavaScript 1.2%
|
All checks were successful
Build Slash Dispatch Plugin / build (push) Successful in 6m1s
|
||
|---|---|---|
| .forgejo/workflows | ||
| public | ||
| server | ||
| webapp | ||
| .gitignore | ||
| BRANDING_CHANGES.md | ||
| CHANGELOG.md | ||
| Makefile | ||
| plugin.json | ||
| README.md | ||
slash-dispatch-plugin
Native dispatch board plugin for Slash / Mattermost. Replaces Focalboard for field dispatch operations.
What It Does
- Kanban board grouped by technician — only shows techs with active appointments in the current 7-day window
- Real-time updates via webhook from n8n/billing system — appointments appear within seconds of a change
- Role-aware view — office staff see all tech columns; field techs see only their own column
- Mobile-optimized — single-column view on small screens
- Work Order button on each card links directly to the pre-filled work order form
Architecture
Billing system appointment hook
→ n8n automation
→ POST /plugins/com.ncwcom.slash-dispatch/api/v1/webhook
→ Plugin KV store
→ WebSocket broadcast → React frontend
Installation
- Download the latest
.tar.gzfrom Releases - System Console → Plugins → Plugin Management → Upload Plugin
- Enable the plugin
- Click Settings and configure:
Plugin Settings
| Setting | Description |
|---|---|
| Webhook Secret | Shared secret for the automation → plugin webhook. Set the same value in your automation platform. |
| #techs Channel ID | Channel ID for dispatch notifications. Find it in the channel URL or via the API. |
| Tech Name Map (JSON) | Maps billing system tech names to Mattermost user IDs — see below |
Tech Name Map
The Tech Name Map connects your billing system's tech identifier strings to Mattermost user IDs. Mattermost user IDs can be found in System Console → User Management.
{
"TECH_BILLING_NAME_1": "mattermost_user_id_1",
"TECH_BILLING_NAME_2": "mattermost_user_id_2",
"TECH_BILLING_NAME_3": "mattermost_user_id_3"
}
Keys are billing system tech names (case-insensitive). Values are Mattermost user IDs. Users not in this map (office staff, admins) see all tech columns.
API Endpoints
| Method | Path | Auth | Description |
|---|---|---|---|
GET |
/api/v1/appointments |
MM session token | Returns active appointments for the next 7 days |
POST |
/api/v1/webhook |
X-Dispatch-Signature header |
Receives appointment events from automation |
GET |
/api/v1/me |
MM session token | Returns calling user's resolved tech name and admin status |
Webhook Payload (POST /api/v1/webhook)
{
"appt_id": 12345,
"_action": "CREATE",
"tech": "TECH_NAME",
"first_name": "Customer",
"last_name": "Name",
"appt_type": "New Install",
"start_dt": "2026-06-03 11:00:00",
"end_dt": "2026-06-03 13:00:00",
"phone": "555-000-0000",
"address": "123 Main St, City, State",
"bm_user": 10000,
"notes": "Install notes here",
"internet_package": "Service Package Name",
"service_status": "Prospective",
"_jotform_url": "https://form.jotform.com/...",
"row_hash": "abc123"
}
Notes:
appt_idandbm_usermay be string or integer — both are acceptedstart_dt/end_dtaccept2026-06-03T11:00:00(T separator) and2026-06-03 11:00:00(space separator)_action:CREATE|UPDATE|CANCEL
Building from Source
# Requires: Go 1.21+, Node.js 20+, npm
cd server && go build -o dist/plugin-linux-amd64 .
cd ../webapp && npm install && npm run build
tar -czf dist/com.ncwcom.slash-dispatch-0.1.0.tar.gz \
plugin.json server/dist/plugin-linux-amd64 webapp/dist/main.js
Or use the Makefile:
make bundle # build + package
make install MM_HOST=http://your-mm-host:8065 MM_TOKEN=yourtoken
n8n Integration
In your n8n Slash-Workorders workflow, update the HTTP Request nodes
(Create Board Card, Update Board Card, Mark Card Cancelled) to POST to:
http://<mattermost-host>:8065/plugins/com.ncwcom.slash-dispatch/api/v1/webhook
With header X-Dispatch-Signature: <your-webhook-secret>.
Note: n8n HTTP Request node v4.2 has a known routing issue with
specifyBody: jsonand expression bodies. If appointments are not appearing, replace the HTTP Request nodes with Code nodes that use Node.jshttp.request()directly.
Configuration Separation
This plugin ships with working defaults and no operator-specific values. All site-specific configuration (tech names, channel IDs, webhook secrets) is set through the Mattermost plugin settings UI and stored in the server config — never in the plugin source.
License
AGPL-3.0 — see LICENSE