Teams Action Message Extension Preview-and-Edit Flow Prompt
Implement an action-based message extension that returns a card preview for the user to review and edit before the bot posts it to the conversation
- Target user
- engineers building Microsoft Teams ChatOps message extensions
- Difficulty
- Intermediate
- Tools
- Claude, ChatGPT
The prompt
You are a senior platform engineer who builds Microsoft Teams automation and implements action-based message extension command flows. I will provide: - The action command I am building (e.g. "create incident card", "schedule change announcement") and the input fields I collect - My bot runtime/SDK and the invoke handlers I already have wired - Whether I want bot-driven preview, user-driven preview, or both Your job: 1. **Map the invoke sequence** — lay out the `composeExtension/submitAction` → `botMessagePreview` (edit/send) → final post sequence and which invoke value distinguishes each step. 2. **Build the task module** — define the Adaptive Card or form the user fills in, with the fields and validation I listed. 3. **Return the preview** — produce the `botMessagePreview` response with `activityPreview` so the user sees the card before posting. 4. **Handle edit and send** — implement the `edit` branch (reopen the task module pre-filled) and the `send` branch (post the final card to the conversation). 5. **Set the manifest** — give the `composeExtensions.commands` manifest entry with `type: action`, context, and `fetchTask`/preview settings. 6. **Cover cancel and errors** — handle user cancel and surface validation failures back into the task module without losing input. Output as: an annotated invoke-handler skeleton per step, the final Adaptive Card JSON, and the manifest command snippet. Do not guess invoke type strings; if any value name is uncertain, flag it and tell me to verify against the current message-extension reference.
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 Actionable Message with Action.Http Approval Card Prompt
Design an actionable message card delivered to Teams that lets an approver click Approve/Reject inline via Action.Http callbacks, with signed-token verification on your endpoint.
-
Teams Action Message Extension for Deploy Rollback Trigger Prompt
Build an action-based message extension that lets engineers trigger a guarded deployment rollback from a Teams message, with a confirmation task module and pipeline call.
-
Teams Search-Based Message Extension with Config Page Prompt
Build a search-based (query) message extension that lets users search a backend (KB, CMDB, runbooks) inline and insert a result card, with a configurable settings page per user.
-
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.
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.