Webhook Payload Normalizer JSON

Anthropic Cookbook

Submit a prompt

Overview

Normalize an inbound webhook into canonical event JSON while preserving unmapped fields and timestamps.

Use cases

Prompt
Copied 0
Normalize the inbound webhook into the canonical event schema. Return ONLY valid JSON:

{
  "event_type": "string",
  "occurred_at": "ISO-8601 or null",
  "actor": {"id": null, "email": null, "name": null},
  "resource": {"type": null, "id": null},
  "data": {},
  "raw_keys_unmapped": ["string"]
}

Rules:
- Map known fields; put unknown keys under data or list them in raw_keys_unmapped.
- Do not drop information silently.
- occurred_at: prefer event timestamps in the payload.

CANONICAL EVENT TYPE HINTS: <<<optional>>>
WEBHOOK BODY:
<<<paste JSON/text>>>

Can AI?

Alternatives