How it works
- You define a JSON schema on your inbox describing what to extract
- When an email arrives, Commune uses an LLM to extract data matching your schema
- The extracted data appears in
message.metadata.extracted_dataandwebhook.extractedData - Your agent uses the structured data directly — no parsing or regex needed
Configure extraction schema
Set a schema on your inbox to define what data to extract:Schema parameters
Schema definition tips
- Use
descriptionon every property — the LLM uses these to understand what to look for - Use
enumfor categorical fields — constrains output to valid values - Keep schemas focused — extract 3–8 fields per schema for best accuracy
- Use
type: "string"for dates — the LLM returns ISO strings; parse in your code
Example: extracted data in webhook
When a customer sends:“Hi, my order #ORD-5678 hasn’t arrived yet. I ordered it 3 days ago and the tracking still shows ‘processing’. This is really frustrating. Can you please look into this urgently?”Your webhook receives:
Use case examples
E-commerce support
SaaS onboarding
Invoice processing
Disable extraction
Configure structured extraction on an inbox via MCP
Extraction object on inbox
When an extraction schema is configured, the inbox object includes:Structured extraction is a paid feature available on Pro plans and above.
What’s next?
Webhooks
Access extracted data in the webhook payload on every inbound email.
Inboxes
Configure extraction schemas on individual inboxes.
Prompt Injection Detection
Protect your agent from adversarial content in inbound emails.
Search
Search threads by semantic meaning using extracted data.

