[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M793K7F3PGE1R7J3SWQ3EH3W":3,"skill-same:01M793K7F3PGE1R7J3SWQ3EH3W":56},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":33,"commitSha":34,"skillDirectory":35,"forksCount":36,"repositoryHtmlUrl":37,"repositoryHomepageUrl":6,"ownerHtmlUrl":38,"ownerBlogUrl":39,"ownerDescription":40,"updatedAt":41,"install":42,"resources":55},"01M793K7F3PGE1R7J3SWQ3EH3W","notion-incident-runbook",null,"Execute Notion incident response procedures with triage, mitigation, and postmortem.\nUse when responding to Notion API outages, investigating errors,\nor running post-incident reviews for Notion integration failures.\nTrigger with phrases like \"notion incident\", \"notion outage\",\n\"notion down\", \"notion on-call\", \"notion emergency\", \"notion broken\".","jukeyman\u002Fjukeyman-skills","jukeyman","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F142960420?v=4","01M78FR4Y3DHMMCBCC0GXXNB3F","RICK JEFFERSON","01M78FR4Z8RVQRAD31Y5J7V6EB",1,"MIT","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsaas-packs--notion-pack--notion-incident-runbook\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: notion-incident-runbook\ndescription: |\n  Execute Notion incident response procedures with triage, mitigation, and postmortem.\n  Use when responding to Notion API outages, investigating errors,\n  or running post-incident reviews for Notion integration failures.\n  Trigger with phrases like \"notion incident\", \"notion outage\",\n  \"notion down\", \"notion on-call\", \"notion emergency\", \"notion broken\".\nallowed-tools: Read, Grep, Bash(kubectl:*), Bash(curl:*)\nversion: 1.0.0\nlicense: MIT\nauthor: Jeremy Longshore \u003Cjeremy@intentsolutions.io>\ntags: [saas, productivity, notion]\ncompatible-with: claude-code\n---\n\n# Notion Incident Runbook\n\n## Overview\n\nRapid incident response procedures for Notion API failures. This runbook covers a structured triage flow (under 5 minutes), automated health checks against both status.notion.so and your own integration, a decision tree for classifying failures (Notion-side vs. integration-side), per-error-type mitigation with real `Client` code, cached fallback patterns, communication templates, and postmortem structure.\n\n## Prerequisites\n\n- Access to application monitoring dashboards and log aggregator\n- `NOTION_TOKEN` environment variable set for diagnostic API calls\n- `curl` and `jq` installed for quick CLI triage\n- Python alternative: `notion-client` (`pip install notion-client`)\n- Communication channels configured (Slack webhook, PagerDuty, etc.)\n\n## Instructions\n\n### Step 1: Quick Triage (Under 5 Minutes)\n\nRun this diagnostic script to determine if the issue is Notion-side or integration-side:\n\n```bash\n#!\u002Fbin\u002Fbash\n# notion-triage.sh — run at first alert\nset -euo pipefail\necho \"=== Notion Incident Triage ===\"\necho \"Time: $(date -u +%Y-%m-%dT%H:%M:%SZ)\"\n\n# 1. Check Notion's public status page\necho -e \"\\n--- Notion Platform Status ---\"\nSTATUS=$(curl -sf https:\u002F\u002Fstatus.notion.so\u002Fapi\u002Fv2\u002Fstatus.json \\\n  | jq -r '.status.description' 2>\u002Fdev\u002Fnull || echo \"UNREACHABLE\")\necho \"Notion Status: $STATUS\"\n\nINCIDENTS=$(curl -sf https:\u002F\u002Fstatus.notion.so\u002Fapi\u002Fv2\u002Fincidents\u002Funresolved.json \\\n  | jq '.incidents | length' 2>\u002Fdev\u002Fnull || echo \"UNKNOWN\")\necho \"Active Incidents: $INCIDENTS\"\n\nif [ \"$INCIDENTS\" != \"0\" ] && [ \"$INCIDENTS\" != \"UNKNOWN\" ]; then\n  echo \"INCIDENT DETAILS:\"\n  curl -sf https:\u002F\u002Fstatus.notion.so\u002Fapi\u002Fv2\u002Fincidents\u002Funresolved.json \\\n    | jq -r '.incidents[] | \"  - \\(.name) (\\(.status)): \\(.incident_updates[0].body)\"'\nfi\n\n# 2. Test our integration authentication\necho -e \"\\n--- Integration Auth Check ---\"\nAUTH_HTTP=$(curl -sf -o \u002Fdev\u002Fnull -w \"%{http_code}\" \\\n  https:\u002F\u002Fapi.notion.com\u002Fv1\u002Fusers\u002Fme \\\n  -H \"Authorization: Bearer ${NOTION_TOKEN}\" \\\n  -H \"Notion-Version: 2022-06-28\" 2>\u002Fdev\u002Fnull || echo \"000\")\necho \"Auth HTTP Status: $AUTH_HTTP\"\n\nif [ \"$AUTH_HTTP\" = \"200\" ]; then\n  BOT_NAME=$(curl -sf https:\u002F\u002Fapi.notion.com\u002Fv1\u002Fusers\u002Fme \\\n    -H \"Authorization: Bearer ${NOTION_TOKEN}\" \\\n    -H \"Notion-Version: 2022-06-28\" | jq -r '.name')\n  echo \"Bot Name: $BOT_NAME\"\nfi\n\n# 3. Test database query (if test DB configured)\necho -e \"\\n--- API Responsiveness ---\"\nif [ -n \"${NOTION_TEST_DATABASE_ID:-}\" ]; then\n  QUERY_RESULT=$(curl -sf -o \u002Fdev\u002Fnull -w \"%{http_code} %{time_total}s\" \\\n    -X POST \"https:\u002F\u002Fapi.notion.com\u002Fv1\u002Fdatabases\u002F${NOTION_TEST_DATABASE_ID}\u002Fquery\" \\\n    -H \"Authorization: Bearer ${NOTION_TOKEN}\" \\\n    -H \"Notion-Version: 2022-06-28\" \\\n    -H \"Content-Type: application\u002Fjson\" \\\n    -d '{\"page_size\": 1}' 2>\u002Fdev\u002Fnull || echo \"000 0.000s\")\n  echo \"Database Query: $QUERY_RESULT\"\nelse\n  echo \"NOTION_TEST_DATABASE_ID not set — skipping query test\"\nfi\n\n# 4. Classification\necho -e \"\\n--- Triage Result ---\"\nif [ \"$STATUS\" != \"All Systems Operational\" ] && [ \"$STATUS\" != \"UNREACHABLE\" ]; then\n  echo \"CLASSIFICATION: Notion-side issue. Enable fallback mode.\"\nelif [ \"$AUTH_HTTP\" = \"401\" ]; then\n  echo \"CLASSIFICATION: Token expired or revoked. Rotate immediately.\"\nelif [ \"$AUTH_HTTP\" = \"429\" ]; then\n  echo \"CLASSIFICATION: Rate limited. Reduce concurrency.\"\nelif [ \"$AUTH_HTTP\" = \"000\" ]; then\n  echo \"CLASSIFICATION: Network\u002FDNS issue. Check firewall and DNS.\"\nelse\n  echo \"CLASSIFICATION: Integration-side issue. Check application logs.\"\nfi\n```\n\n**TypeScript — programmatic triage:**\n\n```typescript\nimport { Client, isNotionClientError, APIErrorCode } from '@notionhq\u002Fclient';\n\nasync function triageNotionHealth(token: string): Promise\u003C{\n  classification: string;\n  notionStatus: string;\n  authStatus: string;\n  latencyMs: number;\n}> {\n  \u002F\u002F Check Notion status page\n  let notionStatus = 'unknown';\n  try {\n    const res = await fetch('https:\u002F\u002Fstatus.notion.so\u002Fapi\u002Fv2\u002Fstatus.json');\n    const data = await res.json();\n    notionStatus = data.status.description;\n  } catch { notionStatus = 'unreachable'; }\n\n  \u002F\u002F Test our authentication\n  const client = new Client({ auth: token, timeoutMs: 10_000 });\n  const start = Date.now();\n  let authStatus = 'unknown';\n  let classification = 'unknown';\n\n  try {\n    await client.users.me({});\n    authStatus = 'authenticated';\n    classification = 'integration-side';\n  } catch (error) {\n    if (isNotionClientError(error)) {\n      authStatus = `${error.code} (HTTP ${error.status})`;\n      switch (error.code) {\n        case APIErrorCode.Unauthorized:\n          classification = 'token-expired';\n          break;\n        case APIErrorCode.RateLimited:\n          classification = 'rate-limited';\n          break;\n        case APIErrorCode.ServiceUnavailable:\n          classification = 'notion-down';\n          break;\n        default:\n          classification = 'api-error';\n      }\n    } else {\n      authStatus = 'network-error';\n      classification = 'network-issue';\n    }\n  }\n\n  if (notionStatus !== 'All Systems Operational') {\n    classification = 'notion-side';\n  }\n\n  return {\n    classification,\n    notionStatus,\n    authStatus,\n    latencyMs: Date.now() - start,\n  };\n}\n```\n\n### Step 2: Decision Tree and Mitigation\n\n```\nIs status.notion.so showing an incident?\n|\n+-- YES --> Notion-side outage\n|   +-- Enable cached\u002Ffallback mode\n|   +-- Notify users of degraded service\n|   +-- Monitor status page for resolution\n|   +-- DO NOT restart or rotate tokens\n|\n+-- NO --> Our integration issue\n    |\n    +-- Auth returning 401?\n    |   +-- YES --> Token expired or revoked\n    |   |   +-- Regenerate at notion.so\u002Fmy-integrations\n    |   |   +-- Update secret manager (see below)\n    |   |   +-- Restart application\n    |   +-- NO --> Continue\n    |\n    +-- Getting 429 rate limits?\n    |   +-- YES --> Exceeding 3 req\u002Fs average\n    |   |   +-- Check for runaway loops or webhook storms\n    |   |   +-- Reduce concurrency to 1\n    |   |   +-- Add exponential backoff\n    |   +-- NO --> Continue\n    |\n    +-- Getting 404 on specific resources?\n    |   +-- YES --> Pages unshared or deleted\n    |   |   +-- Re-share pages with integration via Connections menu\n    |   |   +-- Check if pages were moved to trash\n    |   +-- NO --> Continue\n    |\n    +-- Getting 400 validation errors?\n    |   +-- YES --> Database schema changed in Notion UI\n    |   |   +-- Re-fetch schema (databases.retrieve)\n    |   |   +-- Compare with expected properties\n    |   |   +-- Update property mappings in code\n    |   +-- NO --> Investigate application logs\n```\n\n**Token rotation:**\n\n```bash\n# AWS Secrets Manager\naws secretsmanager update-secret \\\n  --secret-id notion\u002Fproduction \\\n  --secret-string '{\"token\":\"ntn_NEW_TOKEN_HERE\"}'\n\n# GCP Secret Manager\necho -n \"ntn_NEW_TOKEN_HERE\" | \\\n  gcloud secrets versions add notion-token-prod --data-file=-\n\n# Restart to pick up new token\nkubectl rollout restart deployment\u002Fmy-app  # Kubernetes\n# or: gcloud run services update my-service --no-traffic  # Cloud Run\n```\n\n**Cached fallback for Notion outages:**\n\n```typescript\nimport { Client, isNotionClientError } from '@notionhq\u002Fclient';\n\nconst notion = new Client({ auth: process.env.NOTION_TOKEN! });\nconst cache = new Map\u003Cstring, { data: any; timestamp: number }>();\nconst CACHE_TTL_MS = 5 * 60 * 1000; \u002F\u002F 5 minutes\n\nasync function queryWithFallback(dbId: string, filter?: any) {\n  const cacheKey = `query:${dbId}:${JSON.stringify(filter)}`;\n\n  try {\n    const result = await notion.databases.query({\n      database_id: dbId,\n      filter,\n      page_size: 100,\n    });\n\n    \u002F\u002F Update cache on success\n    cache.set(cacheKey, { data: result, timestamp: Date.now() });\n    return { data: result, source: 'live' as const };\n  } catch (error) {\n    \u002F\u002F Fall back to cache on any API error\n    const cached = cache.get(cacheKey);\n    if (cached && Date.now() - cached.timestamp \u003C CACHE_TTL_MS) {\n      console.warn(`Notion unavailable, serving cached data (age: ${\n        Math.round((Date.now() - cached.timestamp) \u002F 1000)\n      }s)`);\n      return { data: cached.data, source: 'cache' as const };\n    }\n\n    \u002F\u002F No cache available — re-throw\n    throw error;\n  }\n}\n\n\u002F\u002F Schema change detection\nasync function detectSchemaChanges(dbId: string, expectedProps: string[]) {\n  const db = await notion.databases.retrieve({ database_id: dbId });\n  const actualProps = Object.keys(db.properties);\n\n  const missing = expectedProps.filter(p => !actualProps.includes(p));\n  const unexpected = actualProps.filter(p => !expectedProps.includes(p));\n\n  if (missing.length > 0 || unexpected.length > 0) {\n    console.error(JSON.stringify({\n      event: 'schema_change_detected',\n      database_id: dbId,\n      missing_properties: missing,\n      new_properties: unexpected,\n    }));\n  }\n\n  return { missing, unexpected, current: actualProps };\n}\n```\n\n### Step 3: Communication and Postmortem\n\n**Internal Slack notification template:**\n\n```\n:rotating_light: P[1-4] INCIDENT: Notion Integration\nStatus: [INVESTIGATING | MITIGATING | RESOLVED]\nImpact: [specific user-facing impact]\nRoot Cause: [Notion outage | Token expired | Rate limited | Schema change]\nAction: [current remediation step]\nETA: [estimated resolution or \"monitoring\"]\nDashboard: [link to monitoring dashboard]\nThread: [link to incident channel thread]\n```\n\n**External status page update:**\n\n```\nNotion Integration Service Disruption\n\nWe are experiencing [brief description of impact]. [Specific feature]\nmay be unavailable or show stale data.\n\nWorkaround: [if available, e.g., \"Cached data is being served\"]\nNext update: [time, e.g., \"in 30 minutes or sooner if resolved\"]\n\n[ISO 8601 timestamp]\n```\n\n**Postmortem template:**\n\n```markdown\n## Incident: Notion [Error Type] — [Date]\n**Duration:** X hours Y minutes\n**Severity:** P[1-4]\n**Detection:** [Alert name] \u002F [User report]\n\n### Summary\n[1-2 sentence description of what happened and the user impact]\n\n### Timeline (all times UTC)\n- HH:MM — First alert fired ([alert name])\n- HH:MM — On-call acknowledged, began triage\n- HH:MM — Root cause identified: [description]\n- HH:MM — Mitigation applied: [action taken]\n- HH:MM — Service fully restored\n\n### Root Cause\n[Technical explanation — e.g., \"Integration token was rotated in Notion\ndashboard by a team member without updating the secret manager, causing\nall API calls to return 401 Unauthorized.\"]\n\n### Impact\n- Users affected: N\n- Duration of degraded service: X minutes\n- Data loss: [none | description]\n\n### Action Items\n| Priority | Action | Owner | Due |\n|----------|--------|-------|-----|\n| P1 | [Preventive measure] | @name | YYYY-MM-DD |\n| P2 | [Detection improvement] | @name | YYYY-MM-DD |\n| P3 | [Process improvement] | @name | YYYY-MM-DD |\n```\n\n## Output\n\n- Automated triage script classifying incidents in under 5 minutes\n- Decision tree mapping HTTP status codes to root causes\n- Per-error-type mitigation procedures with real code\n- Cached fallback mode for Notion outages\n- Schema change detection for 400 validation errors\n- Communication templates for internal and external stakeholders\n- Postmortem template with timeline and action items\n\n## Error Handling\n\n| Scenario | Triage Signal | Immediate Action |\n|----------|--------------|------------------|\n| Notion platform outage | status.notion.so incident | Enable fallback mode, notify users |\n| Token expired\u002Frevoked | All requests return 401 | Rotate token in secret manager, restart |\n| Rate limited | 429 errors spiking | Reduce concurrency to 1, check for loops |\n| Schema changed | 400 on specific operations | Run `databases.retrieve`, update mappings |\n| Network\u002FDNS issue | Timeouts, no HTTP response | Check firewall, DNS resolution, proxy config |\n| Pages unshared | 404 on previously working pages | Re-share via Connections menu in Notion |\n\n## Examples\n\n### One-Line Health Check\n\n```bash\ncurl -sf https:\u002F\u002Fapi.notion.com\u002Fv1\u002Fusers\u002Fme \\\n  -H \"Authorization: Bearer ${NOTION_TOKEN}\" \\\n  -H \"Notion-Version: 2022-06-28\" \\\n  | jq '{name: .name, type: .type}' \\\n  || echo \"UNHEALTHY: Notion API unreachable or auth failed\"\n```\n\n### Python Quick Triage\n\n```python\nfrom notion_client import Client, APIResponseError\nimport os\n\ndef quick_triage():\n    try:\n        client = Client(auth=os.environ[\"NOTION_TOKEN\"], timeout_ms=10_000)\n        me = client.users.me()\n        print(f\"OK: Connected as {me['name']}\")\n    except APIResponseError as e:\n        print(f\"ERROR: {e.code} (HTTP {e.status}): {e.message}\")\n    except Exception as e:\n        print(f\"NETWORK ERROR: {e}\")\n\nquick_triage()\n```\n\n## Resources\n\n- [Notion Status Page](https:\u002F\u002Fstatus.notion.so) — real-time platform status\n- [Notion API Error Codes](https:\u002F\u002Fdevelopers.notion.com\u002Freference\u002Ferrors) — full error reference\n- [Notion Request Limits](https:\u002F\u002Fdevelopers.notion.com\u002Freference\u002Frequest-limits) — 3 req\u002Fs average\n- [Statuspage API](https:\u002F\u002Fwww.atlassianstatuspage.io\u002Fapi) — programmatic status checks\n\n## Next Steps\n\nFor data handling and privacy compliance, see `notion-data-handling`.\n","# Notion Incident Runbook\n\n## Overview\n\nRapid incident response procedures for Notion API failures. This runbook covers a structured triage flow (under 5 minutes), automated health checks against both status.notion.so and your own integration, a decision tree for classifying failures (Notion-side vs. integration-side), per-error-type mitigation with real `Client` code, cached fallback patterns, communication templates, and postmortem structure.\n\n## Prerequisites\n\n- Access to application monitoring dashboards and log aggregator\n- `NOTION_TOKEN` environment variable set for diagnostic API calls\n- `curl` and `jq` installed for quick CLI triage\n- Python alternative: `notion-client` (`pip install notion-client`)\n- Communication channels configured (Slack webhook, PagerDuty, etc.)\n\n## Instructions\n\n### Step 1: Quick Triage (Under 5 Minutes)\n\nRun this diagnostic script to determine if the issue is Notion-side or integration-side:\n\n```bash\n#!\u002Fbin\u002Fbash\n# notion-triage.sh — run at first alert\nset -euo pipefail\necho \"=== Notion Incident Triage ===\"\necho \"Time: $(date -u +%Y-%m-%dT%H:%M:%SZ)\"\n\n# 1. Check Notion's public status page\necho -e \"\\n--- Notion Platform Status ---\"\nSTATUS=$(curl -sf https:\u002F\u002Fstatus.notion.so\u002Fapi\u002Fv2\u002Fstatus.json \\\n  | jq -r '.status.description' 2>\u002Fdev\u002Fnull || echo \"UNREACHABLE\")\necho \"Notion Status: $STATUS\"\n\nINCIDENTS=$(curl -sf https:\u002F\u002Fstatus.notion.so\u002Fapi\u002Fv2\u002Fincidents\u002Funresolved.json \\\n  | jq '.incidents | length' 2>\u002Fdev\u002Fnull || echo \"UNKNOWN\")\necho \"Active Incidents: $INCIDENTS\"\n\nif [ \"$INCIDENTS\" != \"0\" ] && [ \"$INCIDENTS\" != \"UNKNOWN\" ]; then\n  echo \"INCIDENT DETAILS:\"\n  curl -sf https:\u002F\u002Fstatus.notion.so\u002Fapi\u002Fv2\u002Fincidents\u002Funresolved.json \\\n    | jq -r '.incidents[] | \"  - \\(.name) (\\(.status)): \\(.incident_updates[0].body)\"'\nfi\n\n# 2. Test our integration authentication\necho -e \"\\n--- Integration Auth Check ---\"\nAUTH_HTTP=$(curl -sf -o \u002Fdev\u002Fnull -w \"%{http_code}\" \\\n  https:\u002F\u002Fapi.notion.com\u002Fv1\u002Fusers\u002Fme \\\n  -H \"Authorization: Bearer ${NOTION_TOKEN}\" \\\n  -H \"Notion-Version: 2022-06-28\" 2>\u002Fdev\u002Fnull || echo \"000\")\necho \"Auth HTTP Status: $AUTH_HTTP\"\n\nif [ \"$AUTH_HTTP\" = \"200\" ]; then\n  BOT_NAME=$(curl -sf https:\u002F\u002Fapi.notion.com\u002Fv1\u002Fusers\u002Fme \\\n    -H \"Authorization: Bearer ${NOTION_TOKEN}\" \\\n    -H \"Notion-Version: 2022-06-28\" | jq -r '.name')\n  echo \"Bot Name: $BOT_NAME\"\nfi\n\n# 3. Test database query (if test DB configured)\necho -e \"\\n--- API Responsiveness ---\"\nif [ -n \"${NOTION_TEST_DATABASE_ID:-}\" ]; then\n  QUERY_RESULT=$(curl -sf -o \u002Fdev\u002Fnull -w \"%{http_code} %{time_total}s\" \\\n    -X POST \"https:\u002F\u002Fapi.notion.com\u002Fv1\u002Fdatabases\u002F${NOTION_TEST_DATABASE_ID}\u002Fquery\" \\\n    -H \"Authorization: Bearer ${NOTION_TOKEN}\" \\\n    -H \"Notion-Version: 2022-06-28\" \\\n    -H \"Content-Type: application\u002Fjson\" \\\n    -d '{\"page_size\": 1}' 2>\u002Fdev\u002Fnull || echo \"000 0.000s\")\n  echo \"Database Query: $QUERY_RESULT\"\nelse\n  echo \"NOTION_TEST_DATABASE_ID not set — skipping query test\"\nfi\n\n# 4. Classification\necho -e \"\\n--- Triage Result ---\"\nif [ \"$STATUS\" != \"All Systems Operational\" ] && [ \"$STATUS\" != \"UNREACHABLE\" ]; then\n  echo \"CLASSIFICATION: Notion-side issue. Enable fallback mode.\"\nelif [ \"$AUTH_HTTP\" = \"401\" ]; then\n  echo \"CLASSIFICATION: Token expired or revoked. Rotate immediately.\"\nelif [ \"$AUTH_HTTP\" = \"429\" ]; then\n  echo \"CLASSIFICATION: Rate limited. Reduce concurrency.\"\nelif [ \"$AUTH_HTTP\" = \"000\" ]; then\n  echo \"CLASSIFICATION: Network\u002FDNS issue. Check firewall and DNS.\"\nelse\n  echo \"CLASSIFICATION: Integration-side issue. Check application logs.\"\nfi\n```\n\n**TypeScript — programmatic triage:**\n\n```typescript\nimport { Client, isNotionClientError, APIErrorCode } from '@notionhq\u002Fclient';\n\nasync function triageNotionHealth(token: string): Promise\u003C{\n  classification: string;\n  notionStatus: string;\n  authStatus: string;\n  latencyMs: number;\n}> {\n  \u002F\u002F Check Notion status page\n  let notionStatus = 'unknown';\n  try {\n    const res = await fetch('https:\u002F\u002Fstatus.notion.so\u002Fapi\u002Fv2\u002Fstatus.json');\n    const data = await res.json();\n    notionStatus = data.status.description;\n  } catch { notionStatus = 'unreachable'; }\n\n  \u002F\u002F Test our authentication\n  const client = new Client({ auth: token, timeoutMs: 10_000 });\n  const start = Date.now();\n  let authStatus = 'unknown';\n  let classification = 'unknown';\n\n  try {\n    await client.users.me({});\n    authStatus = 'authenticated';\n    classification = 'integration-side';\n  } catch (error) {\n    if (isNotionClientError(error)) {\n      authStatus = `${error.code} (HTTP ${error.status})`;\n      switch (error.code) {\n        case APIErrorCode.Unauthorized:\n          classification = 'token-expired';\n          break;\n        case APIErrorCode.RateLimited:\n          classification = 'rate-limited';\n          break;\n        case APIErrorCode.ServiceUnavailable:\n          classification = 'notion-down';\n          break;\n        default:\n          classification = 'api-error';\n      }\n    } else {\n      authStatus = 'network-error';\n      classification = 'network-issue';\n    }\n  }\n\n  if (notionStatus !== 'All Systems Operational') {\n    classification = 'notion-side';\n  }\n\n  return {\n    classification,\n    notionStatus,\n    authStatus,\n    latencyMs: Date.now() - start,\n  };\n}\n```\n\n### Step 2: Decision Tree and Mitigation\n\n```\nIs status.notion.so showing an incident?\n|\n+-- YES --> Notion-side outage\n|   +-- Enable cached\u002Ffallback mode\n|   +-- Notify users of degraded service\n|   +-- Monitor status page for resolution\n|   +-- DO NOT restart or rotate tokens\n|\n+-- NO --> Our integration issue\n    |\n    +-- Auth returning 401?\n    |   +-- YES --> Token expired or revoked\n    |   |   +-- Regenerate at notion.so\u002Fmy-integrations\n    |   |   +-- Update secret manager (see below)\n    |   |   +-- Restart application\n    |   +-- NO --> Continue\n    |\n    +-- Getting 429 rate limits?\n    |   +-- YES --> Exceeding 3 req\u002Fs average\n    |   |   +-- Check for runaway loops or webhook storms\n    |   |   +-- Reduce concurrency to 1\n    |   |   +-- Add exponential backoff\n    |   +-- NO --> Continue\n    |\n    +-- Getting 404 on specific resources?\n    |   +-- YES --> Pages unshared or deleted\n    |   |   +-- Re-share pages with integration via Connections menu\n    |   |   +-- Check if pages were moved to trash\n    |   +-- NO --> Continue\n    |\n    +-- Getting 400 validation errors?\n    |   +-- YES --> Database schema changed in Notion UI\n    |   |   +-- Re-fetch schema (databases.retrieve)\n    |   |   +-- Compare with expected properties\n    |   |   +-- Update property mappings in code\n    |   +-- NO --> Investigate application logs\n```\n\n**Token rotation:**\n\n```bash\n# AWS Secrets Manager\naws secretsmanager update-secret \\\n  --secret-id notion\u002Fproduction \\\n  --secret-string '{\"token\":\"ntn_NEW_TOKEN_HERE\"}'\n\n# GCP Secret Manager\necho -n \"ntn_NEW_TOKEN_HERE\" | \\\n  gcloud secrets versions add notion-token-prod --data-file=-\n\n# Restart to pick up new token\nkubectl rollout restart deployment\u002Fmy-app  # Kubernetes\n# or: gcloud run services update my-service --no-traffic  # Cloud Run\n```\n\n**Cached fallback for Notion outages:**\n\n```typescript\nimport { Client, isNotionClientError } from '@notionhq\u002Fclient';\n\nconst notion = new Client({ auth: process.env.NOTION_TOKEN! });\nconst cache = new Map\u003Cstring, { data: any; timestamp: number }>();\nconst CACHE_TTL_MS = 5 * 60 * 1000; \u002F\u002F 5 minutes\n\nasync function queryWithFallback(dbId: string, filter?: any) {\n  const cacheKey = `query:${dbId}:${JSON.stringify(filter)}`;\n\n  try {\n    const result = await notion.databases.query({\n      database_id: dbId,\n      filter,\n      page_size: 100,\n    });\n\n    \u002F\u002F Update cache on success\n    cache.set(cacheKey, { data: result, timestamp: Date.now() });\n    return { data: result, source: 'live' as const };\n  } catch (error) {\n    \u002F\u002F Fall back to cache on any API error\n    const cached = cache.get(cacheKey);\n    if (cached && Date.now() - cached.timestamp \u003C CACHE_TTL_MS) {\n      console.warn(`Notion unavailable, serving cached data (age: ${\n        Math.round((Date.now() - cached.timestamp) \u002F 1000)\n      }s)`);\n      return { data: cached.data, source: 'cache' as const };\n    }\n\n    \u002F\u002F No cache available — re-throw\n    throw error;\n  }\n}\n\n\u002F\u002F Schema change detection\nasync function detectSchemaChanges(dbId: string, expectedProps: string[]) {\n  const db = await notion.databases.retrieve({ database_id: dbId });\n  const actualProps = Object.keys(db.properties);\n\n  const missing = expectedProps.filter(p => !actualProps.includes(p));\n  const unexpected = actualProps.filter(p => !expectedProps.includes(p));\n\n  if (missing.length > 0 || unexpected.length > 0) {\n    console.error(JSON.stringify({\n      event: 'schema_change_detected',\n      database_id: dbId,\n      missing_properties: missing,\n      new_properties: unexpected,\n    }));\n  }\n\n  return { missing, unexpected, current: actualProps };\n}\n```\n\n### Step 3: Communication and Postmortem\n\n**Internal Slack notification template:**\n\n```\n:rotating_light: P[1-4] INCIDENT: Notion Integration\nStatus: [INVESTIGATING | MITIGATING | RESOLVED]\nImpact: [specific user-facing impact]\nRoot Cause: [Notion outage | Token expired | Rate limited | Schema change]\nAction: [current remediation step]\nETA: [estimated resolution or \"monitoring\"]\nDashboard: [link to monitoring dashboard]\nThread: [link to incident channel thread]\n```\n\n**External status page update:**\n\n```\nNotion Integration Service Disruption\n\nWe are experiencing [brief description of impact]. [Specific feature]\nmay be unavailable or show stale data.\n\nWorkaround: [if available, e.g., \"Cached data is being served\"]\nNext update: [time, e.g., \"in 30 minutes or sooner if resolved\"]\n\n[ISO 8601 timestamp]\n```\n\n**Postmortem template:**\n\n```markdown\n## Incident: Notion [Error Type] — [Date]\n**Duration:** X hours Y minutes\n**Severity:** P[1-4]\n**Detection:** [Alert name] \u002F [User report]\n\n### Summary\n[1-2 sentence description of what happened and the user impact]\n\n### Timeline (all times UTC)\n- HH:MM — First alert fired ([alert name])\n- HH:MM — On-call acknowledged, began triage\n- HH:MM — Root cause identified: [description]\n- HH:MM — Mitigation applied: [action taken]\n- HH:MM — Service fully restored\n\n### Root Cause\n[Technical explanation — e.g., \"Integration token was rotated in Notion\ndashboard by a team member without updating the secret manager, causing\nall API calls to return 401 Unauthorized.\"]\n\n### Impact\n- Users affected: N\n- Duration of degraded service: X minutes\n- Data loss: [none | description]\n\n### Action Items\n| Priority | Action | Owner | Due |\n|----------|--------|-------|-----|\n| P1 | [Preventive measure] | @name | YYYY-MM-DD |\n| P2 | [Detection improvement] | @name | YYYY-MM-DD |\n| P3 | [Process improvement] | @name | YYYY-MM-DD |\n```\n\n## Output\n\n- Automated triage script classifying incidents in under 5 minutes\n- Decision tree mapping HTTP status codes to root causes\n- Per-error-type mitigation procedures with real code\n- Cached fallback mode for Notion outages\n- Schema change detection for 400 validation errors\n- Communication templates for internal and external stakeholders\n- Postmortem template with timeline and action items\n\n## Error Handling\n\n| Scenario | Triage Signal | Immediate Action |\n|----------|--------------|------------------|\n| Notion platform outage | status.notion.so incident | Enable fallback mode, notify users |\n| Token expired\u002Frevoked | All requests return 401 | Rotate token in secret manager, restart |\n| Rate limited | 429 errors spiking | Reduce concurrency to 1, check for loops |\n| Schema changed | 400 on specific operations | Run `databases.retrieve`, update mappings |\n| Network\u002FDNS issue | Timeouts, no HTTP response | Check firewall, DNS resolution, proxy config |\n| Pages unshared | 404 on previously working pages | Re-share via Connections menu in Notion |\n\n## Examples\n\n### One-Line Health Check\n\n```bash\ncurl -sf https:\u002F\u002Fapi.notion.com\u002Fv1\u002Fusers\u002Fme \\\n  -H \"Authorization: Bearer ${NOTION_TOKEN}\" \\\n  -H \"Notion-Version: 2022-06-28\" \\\n  | jq '{name: .name, type: .type}' \\\n  || echo \"UNHEALTHY: Notion API unreachable or auth failed\"\n```\n\n### Python Quick Triage\n\n```python\nfrom notion_client import Client, APIResponseError\nimport os\n\ndef quick_triage():\n    try:\n        client = Client(auth=os.environ[\"NOTION_TOKEN\"], timeout_ms=10_000)\n        me = client.users.me()\n        print(f\"OK: Connected as {me['name']}\")\n    except APIResponseError as e:\n        print(f\"ERROR: {e.code} (HTTP {e.status}): {e.message}\")\n    except Exception as e:\n        print(f\"NETWORK ERROR: {e}\")\n\nquick_triage()\n```\n\n## Resources\n\n- [Notion Status Page](https:\u002F\u002Fstatus.notion.so) — real-time platform status\n- [Notion API Error Codes](https:\u002F\u002Fdevelopers.notion.com\u002Freference\u002Ferrors) — full error reference\n- [Notion Request Limits](https:\u002F\u002Fdevelopers.notion.com\u002Freference\u002Frequest-limits) — 3 req\u002Fs average\n- [Statuspage API](https:\u002F\u002Fwww.atlassianstatuspage.io\u002Fapi) — programmatic status checks\n\n## Next Steps\n\nFor data handling and privacy compliance, see `notion-data-handling`.\n",{"name":5,"tags":24,"author":28,"license":15,"version":29,"description":30,"allowed-tools":31,"compatible-with":32},[25,26,27],"saas","productivity","notion","Jeremy Longshore \u003Cjeremy@intentsolutions.io>","1.0.0","Execute Notion incident response procedures with triage, mitigation, and postmortem.\nUse when responding to Notion API outages, investigating errors,\nor running post-incident reviews for Notion integration failures.\nTrigger with phrases like \"notion incident\", \"notion outage\",\n\"notion down\", \"notion on-call\", \"notion emergency\", \"notion broken\".\n","Read, Grep, Bash(kubectl:*), Bash(curl:*)","claude-code","main","99825ad3f3bcc6597ddcc7294a14e6e922f2b67b","skills\u002Fsaas-packs--notion-pack--notion-incident-runbook",0,"https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills","https:\u002F\u002Fgithub.com\u002Fjukeyman","https:\u002F\u002FRJBUSINESSSOLUTIONS.ORG","Credit and Finance Expert | Developer\r\n\r\nI'm Rick Jefferson, a seasoned credit and finance expert with over a decade of experience in financial literacy,","2026-07-13 07:03:29",{"source":8,"skillName":5,"commands":43,"prompt":53,"zipAvailable":54},[44,47,50],{"tool":45,"command":46},"npx","npx skills add jukeyman\u002Fjukeyman-skills --skill notion-incident-runbook",{"tool":48,"command":49},"bunx","bunx skills add jukeyman\u002Fjukeyman-skills --skill notion-incident-runbook",{"tool":51,"command":52},"pnpm","pnpm dlx skills add jukeyman\u002Fjukeyman-skills --skill notion-incident-runbook","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsaas-packs--notion-pack--notion-incident-runbook\u002FSKILL.md",true,[],[57,64,71,78,85,93],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":19},"01M79ANS2SM329NEP5ZCX106RR","zustand-store-creator","Create zustand store creator operations. Auto-activating skill for Frontend Development.\nTriggers on: zustand store creator, zustand store creator\nPart of the Frontend Development skill category. Use when working with zustand store creator functionality. Trigger with phrases like \"zustand store creator\", \"zustand creator\", \"zustand\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzustand-store-creator\u002FSKILL.md",[],[],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":19},"01M79AMZKP4YDEZ7EHG1Y7PP74","zero-trust-config-helper","Configure with zero trust config helper operations. Auto-activating skill for Security Advanced.\nTriggers on: zero trust config helper, zero trust config helper\nPart of the Security Advanced skill category. Use when configuring systems or services. Trigger with phrases like \"zero trust config helper\", \"zero helper\", \"zero\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzero-trust-config-helper\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":19},"01M79AMJSBCEJQNBTYNAHYN5HM","zapier-integration-helper","Assist with zapier integration helper operations. Auto-activating skill for Business Automation.\nTriggers on: zapier integration helper, zapier integration helper\nPart of the Business Automation skill category. Use when working with APIs or building integrations. Trigger with phrases like \"zapier integration helper\", \"zapier helper\", \"zapier\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzapier-integration-helper\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":19},"01M79AHJZGVMARS13VFQYRR1MP","yaml-config-validator","Validate yaml config validator operations. Auto-activating skill for DevOps Basics.\nTriggers on: yaml config validator, yaml config validator\nPart of the DevOps Basics skill category. Use when configuring systems or services. Trigger with phrases like \"yaml config validator\", \"yaml validator\", \"yaml\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fyaml-config-validator\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":89,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M79AHGDZRN0020RDQSQDPAM8","xvary-stock-research","Thesis-driven equity analysis from public SEC EDGAR and market data; \u002Fanalyze, \u002Fscore, \u002Fcompare workflows with bundled Python tools (Claude Code, Cursor, Codex).","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxvary-stock-research\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxvary-stock-research\u002FSKILL.md",[],[],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":19},"01M79AHCYJ9FV9RMHQ24HDRN33","xss-vulnerability-scanner","Scan xss vulnerability scanner operations. Auto-activating skill for Security Fundamentals.\nTriggers on: xss vulnerability scanner, xss vulnerability scanner\nPart of the Security Fundamentals skill category. Use when working with xss vulnerability scanner functionality. Trigger with phrases like \"xss vulnerability scanner\", \"xss scanner\", \"xss\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxss-vulnerability-scanner\u002FSKILL.md",[],[]]