Teams Proactive Bot Messaging at Scale Prompt
Design reliable proactive (bot-initiated) Teams messaging at scale — capturing conversation references, app installation via Graph, throttling, retries, and per-user/per-channel delivery without spam.
- Target user
- Bot developers sending notifications to thousands of users or channels
- Difficulty
- Advanced
- Tools
- Claude, ChatGPT
The prompt
You are a senior Bot Framework engineer who has run proactive notification systems that fan out to thousands of Teams users and channels without getting throttled into oblivion or spamming people. I want a reliable proactive-messaging design. I will provide: - The notification use case (incident broadcast, deploy notices, personal nudges) - Audience scale and shape (1:1 users, channels, group chats, counts) - My bot stack, hosting, and AAD/Graph permissions - Delivery guarantees I need (at-least-once, ordering, dedup) Your job: 1. **Conversation references** — explain that proactive messages require a stored `ConversationReference` captured from a prior `conversationUpdate`/message activity. Show how to capture, store (keyed by AAD id / channel id), and `continueConversation` against it. 2. **Bootstrapping new targets** — for users who never messaged the bot, use Graph to install the app for the user/team (`userScopeTeamsAppInstallation` / proactive install), then resolve the chat to get a conversation reference. Call out the required Graph permissions and admin consent. 3. **Fan-out architecture** — don't loop synchronously. Use a queue + workers, batch by tenant, and design for idempotent sends (dedup key per recipient per notification). 4. **Throttling & retries** — respect 429s and `Retry-After`, implement exponential backoff with jitter, a per-tenant concurrency cap, and a circuit breaker. Explain Teams/Bot service rate limits and how to stay under them. 5. **Targeting & consent** — honor quiet hours / notification preferences, suppress opt-outs, and never broadcast to a channel where the bot isn't installed (handle gracefully). 6. **Observability** — per-send status, delivery rate, throttle rate, dead-letter queue, and a reconciliation job for failed sends. Output as: (a) conversation-reference capture + store schema, (b) the proactive-install flow with Graph calls + permissions, (c) the queue/worker fan-out design, (d) throttling/retry policy with numbers, (e) an observability + dead-letter plan. Bias toward: at-least-once with idempotency, respecting 429/Retry-After religiously, and opt-outs over reach.
Run this prompt with AI
Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.
Related prompts
-
Teams Proactive App Install for Users via Graph Prompt
Programmatically install a Teams app for a list of users via Graph so a bot can proactively message them — fetching the conversation reference without waiting for the user to find the app.
-
Teams Graph API Batch Requests for Bulk Operations Prompt
Use Microsoft Graph JSON batching to perform bulk Teams operations (membership, channel, tab changes) efficiently while respecting dependency ordering, throttling, and partial failure.
-
Teams Bot File Attachment Handling for Log Bundles Prompt
Design a Teams bot that accepts dropped log bundles / diagnostics, validates and stores them, and returns analysis — handling both personal-chat file consent and channel file references via Graph.
-
Teams Bot Throttling & Retry Resilience Prompt
Design a Teams bot that survives Bot Framework and Graph 429 throttling — honoring Retry-After, batching proactive sends, and applying jittered backoff so incident-storm notification bursts never get dropped.
More Microsoft Teams prompts & error guides
Browse every Microsoft Teams prompt and troubleshooting guide in one place.
Reading prompts? Get all 500 in one free PDF
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.