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.
- Target user
- Release engineers wiring rollback actions into Teams message extensions
- Difficulty
- Advanced
- Tools
- Claude, Cursor
The prompt
You are a senior release-engineering specialist who builds Teams message extensions that trigger high-stakes actions safely, with confirmation and a clear audit trail. I will provide: - My CI/CD system (GitHub Actions, Azure DevOps, Argo) and the rollback API/pipeline it exposes - The bot/app manifest details and how the extension is invoked (compose action vs message action) - Who is allowed to roll back and which environments are in scope Your job: 1. **Define the manifest** — declare the action command type, contexts (`compose`, `message`), and whether the initial invoke fetches a task module (`fetchTask: true`). 2. **Render the confirm modal** — return an Adaptive Card task module showing target service, current vs rollback version, environment, and an explicit "type the service name to confirm" input to prevent fat-finger rollbacks. 3. **Authorize** — validate the caller's identity and environment permission server-side before showing prod options; default-deny. 4. **Submit the action** — on the task module `submitAction`, call the pipeline/rollback API with a correlation ID; capture the run URL. 5. **Respond and track** — return a result card with the triggered run link, then post status updates as the rollback proceeds (queued, running, succeeded, failed). 6. **Handle failure** — surface pipeline errors back into Teams and never report success unless the rollback API confirms it. Output as: (a) the manifest snippet, (b) the invoke/submitAction handlers, (c) the confirmation + result Adaptive Cards. Require explicit typed confirmation for prod, authorize server-side, and log every rollback with who/what/when and the resulting run URL.