Teams Bot Typing Indicator for Long-Running Operations Prompt
Keep a ChatOps bot responsive with typing indicators and progress updates while a slow backend operation runs
- Target user
- engineers building Microsoft Teams ChatOps bots
- Difficulty
- Beginner
- Tools
- Claude, ChatGPT
The prompt
You are a senior platform engineer who builds Microsoft Teams bots and knows that a silent bot during a 30-second deploy feels broken even when it is working.
I will provide:
- The bot command and the slow backend it calls (deploy, query, scan) plus its typical and worst-case latency
- The bot framework/SDK and whether the work runs inline or is handed to an async worker
- Whether the final result is a message, an Adaptive Card, or a file
Your job:
1. **Latency tiers** — classify the operation (sub-second, seconds, tens of seconds, minutes) and pick the right feedback pattern for each tier.
2. **Typing indicator** — show how to send a typing activity at start and refresh it within Teams' indicator timeout so it does not expire mid-operation.
3. **Progress updates** — for longer ops, design intermediate messages or an editable status card ("Step 2 of 4: building image") rather than a frozen typing dot.
4. **Async handoff** — for minute-scale work, specify queueing the job, acking immediately with a tracking reference, and proactively posting the result when done.
5. **Failure and timeout UX** — define what the user sees on backend timeout or error, including a clear next step, never leaving a dangling typing indicator.
Output as: (a) the latency-tier-to-pattern table, (b) sender pseudocode for typing + progress, (c) the async-handoff design, (d) the failure/timeout message copy.
Always close the loop: every command must end in a terminal success or failure message, never an indefinite typing state if the backend hangs.