Skip to content
CloudOps
Newsletter
All prompts
AI for Microsoft Teams Difficulty: Intermediate ClaudeChatGPT

Teams Tab (Power Apps) for Guided Runbook Execution Prompt

Build a Power Apps canvas app embedded as a Teams tab that walks the on-call through a runbook step-by-step — typed inputs, conditional branches, backend execution, and durable audit.

Target user
Platform engineers + low-code makers building self-service runbook UIs
Difficulty
Intermediate
Tools
Claude, ChatGPT

The prompt

You are a senior platform engineer who has built Power Apps canvas apps embedded as Teams tabs to turn high-traffic runbooks into guided UIs that anyone on-call can execute.

I will provide:
- The source runbook (markdown / Confluence / Word)
- Backend systems the runbook touches (Azure / AWS / Kubernetes / DB / ServiceNow)
- Power Platform licensing (Power Apps Premium needed for premium connectors)
- Identity model (Entra ID, AAD groups)
- Compliance + audit requirements

Your job:

1. **Why Power Apps for runbooks** — embeddable in Teams, low maintenance, no Visual Studio, fast iteration, native AAD identity, governance via Dataverse. Trade-offs: connector limits, performance for complex flows, premium licensing.

2. **Decompose the runbook**:
   - **Inputs** — what varies per run (service, env, severity, params)
   - **Decision points** — branches based on inputs or backend state
   - **Actions** — calls to backends (Azure CLI, Graph, ServiceNow REST, internal API)
   - **Outputs** — what the user sees / saves / forwards
   - **Recovery** — what happens if a step fails

3. **App structure**:
   - **Wizard screen flow** — one screen per logical step
   - **Sidebar** — progress indicator + step navigation
   - **Confirmation modal** before destructive actions
   - **Audit log panel** showing what's been done so far
   - **Outcome screen** with summary + next-step links

4. **Backend integration** — use Power Automate flows triggered from Power Apps:
   - One flow per action (single responsibility)
   - Pass parameters via the Power Apps trigger
   - Return structured results (success/failure + data)
   - Flows handle: throttling, retries, auth to backend
   - Flows write to Dataverse for audit

5. **Identity passthrough** — when the runbook calls an Azure / Graph API, use the executing user's identity (delegated) where possible; app-only only when delegated isn't feasible. Document the choice.

6. **Adaptive Card for the audit record** — at completion, post an Adaptive Card to the team's Teams channel with: who ran, what runbook, parameters, outcome, duration, link to full audit log.

7. **Safety controls**:
   - **Dry-run mode** — exposes a toggle; runs in preview without mutating
   - **Confirmation** — require typing the resource name before destructive actions
   - **Per-environment gates** — prod requires N approvers
   - **Cancel** — allow abort mid-runbook with cleanup steps

8. **Audit log schema** (Dataverse table):
   - Run id (GUID)
   - Runbook name + version
   - Executor (UPN + AAD oid)
   - Start / end time
   - Inputs (JSON)
   - Steps executed (JSON array with timestamps + outcomes)
   - Final outcome
   - Output artifacts (links)
   - Approval chain if applicable

9. **Versioning** — version the runbook UI; new runs use latest version; old runs preserve the version they ran. Important for "what runbook was used 3 months ago" questions.

10. **Anti-patterns to avoid**:
   - Hard-coding secrets in flows (use Azure Key Vault connector)
   - Long-running flows in Power Apps (offload to durable Functions)
   - Forms without input validation
   - No undo step for destructive actions
   - Single-author makers (bus-factor risk)

11. **Compliance overlay** — Dataverse retention, sensitivity labels, environment isolation (Dev / Test / Prod Power Platform environments), data residency.

Output as: (a) app screen-flow diagram, (b) per-step backend flow outline, (c) Dataverse audit schema, (d) safety control patterns, (e) Adaptive Card JSON for completion post, (f) versioning strategy, (g) compliance + governance checklist.

Bias toward: typed inputs over free text, dry-run before mutate, audit every action, low-friction for the on-call.
Newsletter

Free: the DevOps AI Incident-Triage Cheat Sheet

Subscribe and we’ll send you the one-page cheat sheet — plus weekly AI prompts, automation ideas, and tool reviews for infrastructure engineers. One email a week. No spam, unsubscribe anytime.

  • AI Incident-Triage Cheat Sheet (PDF)
  • Access to 1,603 DevOps AI prompts
  • One practical workflow email per week