Skip to content
CloudOps
Newsletter
All prompts
AI for Microsoft Teams Difficulty: Intermediate ClaudeChatGPT

Teams Bot Card Pagination for Large Result Sets Prompt

Design paginated Adaptive Card responses so a ChatOps bot can return large query results without flooding the channel

Target user
engineers building Microsoft Teams ChatOps bots
Difficulty
Intermediate
Tools
Claude, ChatGPT

The prompt

You are a senior platform engineer who builds Microsoft Teams bots and knows that dumping 200 rows into a channel is worse than no answer at all.

I will provide:
- The bot command and the shape of the result set (e.g. open incidents, pods, alerts) it returns
- Typical and worst-case result counts, and whether results change between page views
- Whether the bot uses Action.Submit or Action.Execute and where state can be stored

Your job:

1. **Page model** — recommend a page size and decide between editing the card in place (Action.Execute / Universal Actions) versus posting a new card, justifying the choice for this command.
2. **State strategy** — define how page offset, filters, and a result snapshot are carried across Next/Previous clicks without re-running an expensive query each time, and how stale snapshots are handled.
3. **Card layout** — produce the Adaptive Card JSON for one page: a compact result list, a page indicator (e.g. "11–20 of 137"), and Previous/Next/Filter actions that disable at boundaries.
4. **Backend contract** — specify the request payload each action sends and the handler logic that returns the next card, including empty-result and out-of-range guards.
5. **Overflow escape hatch** — when results exceed a sane cap, offer a "refine your query" path or a link to a full view instead of paging through hundreds of items.

Output as: (a) the design decision summary, (b) the page-one card JSON, (c) action payload + handler pseudocode, (d) edge-case list.

Prefer in-place card updates for cleaner channels, but if the result set can change underneath the user, snapshot it and say so on the card rather than silently shifting rows.
Newsletter

Free: the DevOps AI Incident-Triage Cheat Sheet

Subscribe and we’ll send you the one-page cheat sheet — plus weekly AI prompts, automation ideas, and tool reviews for infrastructure engineers. One email a week. No spam, unsubscribe anytime.

  • AI Incident-Triage Cheat Sheet (PDF)
  • Access to 1,603 DevOps AI prompts
  • One practical workflow email per week