Skip to main content
convex.onDocumentCreated watches one table and starts the automation for documents that appear after the initial Data Sync baseline.
automations/new-convex-message.automation.ts
Options are table, optional component (default ""), optional OAuth deployment (default prod), and optional account. Trigger data includes the complete document, documentId, revision, table, component, and action: "created". This trigger requires Convex Pro Data Sync and deployment:data:view. Existing documents are recorded silently when you first deploy the automation.