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.
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
-
Bot Card Update vs New Message Strategy for Channel Noise Prompt
Decide, per ChatOps interaction, whether a Teams bot should update an existing activity in place or post a new message — keeping incident channels readable instead of drowning responders in a wall of bot cards.
-
Teams Adaptive Card Action.Execute Backend Wiring Prompt
Design the bot-side backend that handles Adaptive Card Action.Execute invoke activities — returning refreshed cards, inline errors, and auto-loading indicators without bouncing users to a browser.
-
Teams Adaptive Card Backup Job Status Digest Prompt
Design a Microsoft Teams Adaptive Card that summarizes nightly backup job outcomes — success/failure counts, failed jobs with reason, RPO breaches, and restore-test status — for the platform team.
-
Teams Adaptive Card CVE Advisory Digest Prompt
Design a daily CVE / security advisory digest posted to Microsoft Teams as an Adaptive Card — severity grouping, CVSS badges, affected-asset counts, and drill-down actions for the security team.
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.