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

SharePoint Postmortem Page Auto-Generation Prompt

Auto-generate a SharePoint page for every resolved incident — pulling the Teams meeting transcript, channel events, action items, and root-cause discussion into a templated, reviewable postmortem.

Target user
Engineering leads standardizing postmortem creation in M365 environments
Difficulty
Intermediate
Tools
Claude, ChatGPT

The prompt

You are a senior engineering lead who has standardized postmortem generation in Microsoft 365 using a SharePoint Communication Site as the durable post-incident record, generated semi-automatically from Teams + ServiceNow data.

I will provide:
- Incident management tool (ServiceNow / PagerDuty / Opsgenie / FireHydrant)
- Where incident comms live (Teams channel per incident)
- Whether transcripts are available (Teams Premium meeting recording → transcript)
- SharePoint site structure for postmortems
- Approval workflow (review by whom, before publication)
- Compliance requirements

Your job:

1. **Postmortem page template** — a SharePoint Communication Site page with these web parts:
   - **Header** — incident id, severity, status, dates, IC
   - **Summary** — 3-5 sentence overview
   - **Customer Impact** — services / regions / customer cohorts / SLO impact
   - **Timeline** — table from Teams + alert system
   - **Detection / Diagnosis / Mitigation / Resolution** — narrative sections
   - **Root cause(s)** — multiple causes acceptable
   - **Contributing factors** — what made detection / response slower
   - **What went well**
   - **Action items** — table with owners + due + status (live via Planner integration)
   - **Related** — prior similar incidents, related runbooks, related tickets
   - **Approvals + audit footer** — reviewers + dates

2. **Generation pipeline** — Power Automate / Logic App / custom Function App:
   - **Trigger** — incident moves to Resolved in the IM tool
   - **Step 1** — pull incident metadata (ServiceNow / PagerDuty API)
   - **Step 2** — fetch Teams channel messages via Graph (`/teams/{tid}/channels/{cid}/messages`)
   - **Step 3** — fetch meeting transcript if a review meeting was held (Graph `callRecords` or Teams transcript API)
   - **Step 4** — run an LLM summarizer to:
     - Build the timeline from messages + alerts
     - Draft narrative sections from the transcript
     - Extract action items (parse "we'll…", "we should…", "I'll…")
   - **Step 5** — create the SharePoint page from template via Graph (`/sites/{sid}/pages`)
   - **Step 6** — assign Planner tasks for action items linked to the page
   - **Step 7** — post a link in the incident channel: "Draft postmortem ready for IC review"

3. **LLM prompt for summarization** — use a structured prompt with sections (see the [Teams Meeting Transcript to Postmortem prompt](../teams-meeting-transcript-postmortem/) for reference). Emphasize blameless framing, traceability (cite event timestamps), no speculation past the data.

4. **Review workflow** — page is created as Draft; IC reviews and edits; submits for approval; approver(s) publish; published page is read-only with a "Suggest edit" link.

5. **Action items as Planner tasks** — each AI becomes a task in a Planner plan; task includes the postmortem URL; closure of the task posts a comment back to the page.

6. **Retention + sensitivity** — apply retention policy to the postmortems site; sensitivity label for postmortems containing customer-impact details; restrict to internal-only by default.

7. **Trend reporting** — the postmortems library becomes a SharePoint list with metadata (severity, root cause category, services); Power BI report aggregates: top root causes by quarter, services with highest incident rate, action-item completion rate.

8. **What NOT to automate** — root cause determination (require human review), severity adjustment (IC decides), customer-comms wording (Comms lead writes).

9. **Anti-patterns to avoid** — auto-publishing without human review, copy-pasting raw Teams chat with PII, action items without owners, postmortems for incidents that don't warrant one (use thresholds: SEV1 always, SEV2 by request, SEV3 rarely).

10. **Compliance overlay** — audit who edited, retention windows aligned to regime, eDiscovery readiness, sensitivity label.

Output as: (a) page template spec, (b) generation pipeline as a Power Automate flow outline, (c) LLM summarization prompt, (d) review approval workflow, (e) Planner integration spec, (f) trend report schema, (g) compliance checklist.

Bias toward: humans review before publish, action items tracked to closure, traceable to source events.
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