Table of Contents
- Introduction
- The Problem
- Solution Overview
- Technical Architecture
- Teams Capabilities & Commands
- AI Integration
- Graph & Proactive Messaging
- Core Features Deep Dive
- Security & Permissions
- Deployment & Operations
- Challenges & Optimisations
- Ideas From the Original Roadmap
- Conclusion
Introduction
Goosey was an AI-powered Microsoft Teams bot built to turn busy channels into concise summaries, send automated morning meeting digests, answer internal questions, and add a playful goose persona.
The Problem
- Teams channels get busy; catching up is hard.
- Managers need quick visibility of who’s off and what’s coming up.
- Repetitive questions (docs, bios, timesheets) slow everyone down.
Solution Overview
- Chat and thread summarisation on-demand.
- Proactive morning meeting digests in a chosen channel.
- Quick answers about people, docs, and timesheets.
- Friendly command help via Adaptive Cards; playful goose persona.
Technical Architecture
Stack
- Language/Runtime: Node.js (ESM), Restify server
- Bot framework: BotBuilder SDK with
CloudAdapter - OpenAI for LLM calls
- Microsoft Graph for chat history, users, teams/channels, and opted-in calendars
- Data: lightweight JSON files for state and caches (no database)
- Scheduling:
node-cronfor weekday 09:00 digests - Process: PM2-managed service with automated deployment via GitHub Actions
Server & Adapter
Restify exposed the Bot Framework messaging endpoint, while BotBuilder's CloudAdapter authenticated and processed incoming Teams activities.
Teams Capabilities & Commands
Capabilities
- Personal and team bot
- Adaptive Cards
- Proactive messages (DMs and channels)
Representative Commands
help,introductionsummarise [n]– concise summary of recent messagesgif [topic]– a quick celebratory GIFwho is off,who is [name],use bio infocheck timesheet [name|anyone],timesheet stats [query]enable my meetings,show meetings,show opted-in usersset notification channel– where to post daily digests
AI Integration
- Provider: OpenAI (chat completions; JSON responses for intent classification)
- Persona: Helpful, witty goose; prompted to avoid inventing facts
- Context: Limited conversation history; Graph-backed content when permitted
- Vision: An experimental image-analysis path for attachments
Graph & Proactive Messaging
Graph Access
- App credentials flow; token cached in-memory
- Used for chat/channel history, user lookups, and calendars shared by opted-in users
Proactive Messaging API
- Stored conversation references when users interacted with the bot
- The user-listing and proactive direct-message endpoints used a shared API key
Core Features Deep Dive
1. Chat & Thread Summaries
Goosey fetched recent messages (Graph when permitted; otherwise in-memory history) and produced a concise summary.
2. Daily Meeting Digests
The scheduler was configured to post that day’s meetings into a chosen channel at 09:00 on weekdays. Users could opt their calendars in or out individually.
3. Timesheet & People Intelligence
- Quick checks like “has Alex completed their timesheet?”
who is [name]returns a short profile from cached bios + user directory
4. GIFs, Docs, and Image Analysis
gif [topic]pulls a lightweight celebratory GIF via Tenor- “show documents” routes to common links
- The code included an experimental vision flow for describing image attachments
Security & Permissions
- Bot credentials:
MicrosoftAppId,MicrosoftAppPassword,MicrosoftAppTenantId - The bot used Microsoft Graph application permissions for chat/channel history, user lookups, and calendars; the exact grants were configured outside the repository
- The
/api/usersand/api/send-messageroutes used a sharedGOOSEY_API_KEY;/api/messagesused Bot Framework authentication, while/api/healthwas public - OpenAI requests could include the current message, limited conversation context, user metadata, selected recent message text for summaries, or a submitted image for vision analysis
- JSON files stored user metadata, calendar opt-ins, notification-channel configuration, and conversation references
Deployment & Operations
- PM2-managed Node process
- GitHub Actions deploy: pull latest,
npm install, PM2 restart - Environment-driven configuration for Teams IDs and API keys
Challenges & Optimisations
- Teams attachment auth: tried several attachment-download strategies
- Graph pagination and token caching
- Summaries: the summary prompt asked the model not to invent details and to keep the output concise
Ideas From the Original Roadmap
These were ideas recorded while Goosey was active, not a current roadmap.
- Retries/backoff and rate-limit handling for Graph
- Telemetry (App Insights/OpenTelemetry) with PII scrubbing
- Manifest packaging in-repo and per-environment config templates
- Optional RAG over internal docs with access control
Conclusion
Goosey combined Microsoft Teams bot capabilities, Microsoft Graph data, AI-assisted summarisation, and scheduled updates in one internal tool.