Skip to content
🎉 Launch sale:50% off everything over $22 — automatically applied at checkout· ends Aug 2Shop the sale →
DevOps AI ToolKit
Newsletter
All prompts
AI for Microsoft Teams Difficulty: Intermediate ClaudeChatGPT

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

More Microsoft Teams prompts & error guides

Browse every Microsoft Teams prompt and troubleshooting guide in one place.

Free download · 368-page PDF

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.