Teams Bot Task Module Structured Incident Form Prompt
Design a Teams bot Task Module (dialog) that pops a focused modal for structured incident intake — Adaptive Card or embedded web form, fetch/submit invoke flow, and validation before anything is created.
- Target user
- Bot developers building modal intake experiences in Teams
- Difficulty
- Advanced
- Tools
- Claude, ChatGPT
The prompt
You are a Teams bot engineer who builds Task Module dialogs that feel native and never submit half-valid data. I will provide: - The fields an incident record needs (severity, service, summary, impact, on-call, links) - Whether the dialog should be an Adaptive Card task module or an embedded web (iframe) task module - The downstream create target (ticketing API, Graph, internal service) - SSO / auth requirements for the modal Your job: 1. **Invoke flow** — diagram the full Task Module lifecycle: the trigger (button `Action.Submit` with `msteams.type=task/fetch`, or a message-extension `fetchTask`), the `task/fetch` handler returning the dialog, and the `task/submit` handler. Show the exact invoke `value` payloads at each step. 2. **Dialog choice** — recommend Adaptive Card vs embedded web for this form and justify (validation richness, SSO, file inputs, maintenance). Give the `TaskModuleTaskInfo` (title, width/height or `size`, url vs card). 3. **Card / form definition** — produce the intake fields with the right input types (`Input.ChoiceSet` for severity/service, `Input.Text` multiline for summary, `Input.Toggle` for "page on-call now"), sensible defaults, and required flags. 4. **Validation** — server-side validation in the `task/submit` handler. On invalid input, return another `task/continue` re-rendering the SAME dialog with inline error text rather than closing it. Show the continue-vs-message branching. 5. **Submission + ack** — on valid submit, create the record, then return a `task/submit` message and post a confirmation Adaptive Card back to the channel with the new incident link. 6. **Auth** — if the web task module needs SSO, show the `getAuthToken` / OBO flow and how to handle the consent fallback inside the modal. 7. **Resilience** — handle downstream-create failures without losing the user's input (return to the dialog with values preserved), and guard against duplicate submits. Output as: (a) lifecycle sequence, (b) `task/fetch` and `task/submit` handler skeletons (TypeScript), (c) the Adaptive Card or web form definition, (d) validation + error-redisplay code, (e) confirmation card JSON. Bias toward: never close the modal on error, server-trusts-nothing validation, input preserved across retries.
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 Action Message Extension for Incident Creation Prompt
Design an action-type message extension that opens a task module form from the compose box or a message, collects incident fields, and creates the incident in your tracker — distinct from search/lookup extensions.
-
Teams Bot Waterfall Dialog for Incident Intake Prompt
Design a stateful, multi-step conversational dialog that walks a reporter through structured incident intake — severity, affected service, impact, and reproduction — then files the ticket.
-
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.
-
In-Meeting Dialog Meeting App with RSC Meeting Scope Prompt
Design a Teams meeting app that opens an in-meeting dialog (TaskModule) during a live incident bridge to capture structured timeline entries, scoped with resource-specific consent so it reads meeting context without broad tenant permissions.
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.