Commune icon

Commune

Send and receive emails, manage inboxes, and search conversations with Commune

Actions14

Inbox → Set Extraction Schema

AI-generated

Summary

Configures a JSON Schema on a Commune inbox to automatically extract structured data from incoming emails.

Inputs

  • domainId (required) — The ID of the domain the inbox belongs to.
  • inboxId (required) — The ID of the inbox to update with the extraction schema.
  • schemaJson (required) — A JSON Schema object defining the fields and data types to extract from inbound emails.
  • schemaName — A name for this extraction schema. Defaults to 'extraction'.

Output shape

a single record

Returns the configured schema response object from Commune. If the API response contains a nested 'data' field, it is automatically unwrapped.

Examples

Example 1: Set up intent and summary extraction for incoming customer support emails

Set Domain ID to 'd_abc123', Inbox ID to 'inbox_xyz', Schema Name to 'customer_intent', and Schema JSON to '{"type":"object","properties":{"intent":{"type":"string"},"summary":{"type":"string"}}}'.

Links

Discussion