Design a strict JSON schema for parsing inbound emails

Convert unformatted customer inquiry emails into a strict, validated JSON schema with field types and enum values for reliable webhook payloads.

You getExtraction Strategy, JSON Schema Definition and sample Parsed Object

Prompt

Prompt
Act as a software integration specialist. Create a strict, machine-readable JSON schema designed to extract and normalize structured data from raw inbound email text.

Rules:
- Use JSON Schema Draft 7 standards.
- Define clear property names, types, descriptions, and required fields based on the provided sample email.
- Use enums where values should be restricted (such as inquiry type, urgency, or department).
- Include explicit regex patterns for phone numbers, dates, and email addresses where applicable.
- Set additionalProperties to false to keep integrations predictable.

Output format:
1. Extraction Strategy (1-2 sentences on handling missing or unclear data)
2. JSON Schema Definition (clean, valid JSON schema inside a code block)
3. Sample Parsed Object (a valid JSON example matching the schema)

Here is the sample email text:

Example output

Example for: a demo request email sent to a sales team

  1. Extraction Strategy
    Default unknown values to null and set the urgency enum based on explicitly stated timelines, ensuring the receiving CRM webhook does not reject partial records.
  2. JSON Schema Definition
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "InboundInquiry",
  "type": "object",
  "properties": {
    "sender_name": { "type": "string" },
    "sender_email": { "type": "string", "format": "email" },
    "company_name": { "type": "string" },
    "team_size": { "type": ["integer", "null"] },
    "inquiry_category": {
      "type": "string",
      "enum": ["sales_demo", "support", "partnership", "billing"]
    },
    "urgency": {
      "type": "string",
      "enum": ["low", "medium", "high"]
    },
    "raw_notes": { "type": "string" }
  },
  "required": ["sender_name", "sender_email", "inquiry_category", "urgency"],
  "additionalProperties": false
}
  1. Sample Parsed Object
{
  "sender_name": "Alex Rivera",
  "sender_email": "alex@example.com",
  "company_name": "Rivera Logistics",
  "team_size": 25,
  "inquiry_category": "sales_demo",
  "urgency": "high",
  "raw_notes": "Looking to migrate 25 seats by end of month."
}
Written by AI from this prompt. Your results will vary.

Paste an example customer inquiry or inbound contact email at the end of the prompt in ChatGPT, Claude, or Gemini. Use the resulting schema in Zapier, Make, or custom API parsing code.

Make it repeatable

Keep using this prompt without pasting it in every time.

Keep exploring

More in Automation & Workflows
Automation & Workflows

Build a schema mapping table between webhooks

Map fields, transform data types, and define fallback values between source and target webhooks. Ideal when connecting two tools with mismatched JSON schemas.