Skip to content

Promote high-value extra_json fields to explicit columns #6

@dmwyatt

Description

@dmwyatt

Context

From the API data gaps investigation (see #177 for background).

The get-documents-v2 API returns 42 fields per document. Our Document struct explicitly models 20 of them. The remaining 22 are captured by #[serde(flatten)] pub extra: HashMap<String, Value> and serialized to the extra_json column. This means these fields are not independently queryable.

Fields worth promoting

Potentially useful for queries:

Field Type Notes
selected_template string/null Template ID used for AI generation; useful for filtering
valid_meeting bool/null Whether Granola considers this a real meeting
transcript_deleted_at datetime/null When transcript was deleted (retention policy)
was_trashed bool/null Whether document was previously trashed
is_primary_event_note bool Relationship to calendar event
attachments array/null Meeting attachments
audio_file_handle string/null Reference to audio recording
overview string/null Currently null for all docs; may be populated in future
chapters array/null Currently null for all docs; may be populated in future

Lower priority (integration/metadata):

Field Type Notes
hubspot_note_url string/null CRM integration
affinity_note_id string/null CRM integration
attio_shared_at datetime/null CRM integration
external_transcription_id string/null External transcription reference
cloned_from uuid/null Document lineage
meeting_end_count number Meeting lifecycle metadata

Proposal

Add explicit columns for the high-value fields via a migration. Start with valid_meeting, selected_template, and transcript_deleted_at as they're most likely to be useful for filtering and queries.

Metadata

Metadata

Assignees

No one assigned

    Labels

    prio: p3Low priority, backlogsize: mMedium, a few hours to a daystatus: readyReady to be worked ontype: featureNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions