ObjectStackObjectStack

Trigger Registry

Trigger Registry protocol schemas

Trigger Registry Protocol

Lightweight automation triggers for simple integrations.

Inspired by Zapier, n8n, and Workato connector architectures.

When to use Trigger Registry vs. Integration Connector?

Use automation/trigger-registry.zod.ts when:

  • Building simple automation triggers (e.g., "when Slack message received, create task")

  • No complex authentication needed (simple API keys, basic auth)

  • Lightweight, single-purpose integrations

  • Quick setup with minimal configuration

  • Webhook-based or polling triggers for automation workflows

Use integration/connector.zod.ts when:

  • Building enterprise-grade connectors (e.g., Salesforce, SAP, Oracle)

  • Complex OAuth2/SAML authentication required

  • Bidirectional sync with field mapping and transformations

  • Webhook management and rate limiting required

  • Full CRUD operations and data synchronization

Use Cases

  1. Simple Automation Triggers
  • Slack notifications on record updates

  • Twilio SMS on workflow events

  • SendGrid email templates

  1. Lightweight Operations
  • Single-action integrations (send, notify, log)

  • No bidirectional sync required

  • Webhook receivers for incoming events

  1. Quick Integrations
  • Payment webhooks (Stripe, PayPal)

  • Communication triggers (Twilio, SendGrid, Slack)

  • Simple API calls to third-party services

@see https://zapier.com/developer/documentation/v2/

@see https://docs.n8n.io/integrations/creating-nodes/

@see ../../integration/connector.zod.ts for enterprise connectors

@example


const slackNotifier: Connector = \{

id: 'slack_notify',

name: 'Slack Notification',

category: 'communication',

authentication: \{

type: 'apiKey',

fields: [\{ name: 'webhook_url', label: 'Webhook URL', type: 'url' \}]

\},

operations: [

\{ id: 'send_message', name: 'Send Message', type: 'action' \}

]

\}

Source: packages/spec/src/automation/trigger-registry.zod.ts

TypeScript Usage

import { AuthField, Authentication, AuthenticationType, ConnectorCategory, ConnectorInstance, ConnectorOperation, OAuth2Config, OperationParameter, OperationType } from '@objectstack/spec/automation';
import type { AuthField, Authentication, AuthenticationType, ConnectorCategory, ConnectorInstance, ConnectorOperation, OAuth2Config, OperationParameter, OperationType } from '@objectstack/spec/automation';

// Validate data
const result = AuthField.parse(data);

AuthField

Properties

PropertyTypeRequiredDescription
namestringField name (snake_case)
labelstringField label
typeEnum<'text' | 'password' | 'url' | 'select'>Field type
descriptionstringoptionalField description
requiredbooleanRequired field
defaultstringoptionalDefault value
optionsObject[]optionalSelect field options
placeholderstringoptionalPlaceholder text

Authentication

Properties

PropertyTypeRequiredDescription
typeEnum<'none' | 'apiKey' | 'basic' | 'bearer' | 'oauth1' | 'oauth2' | 'custom'>Authentication type
fieldsObject[]optionalAuthentication fields
oauth2ObjectoptionalOAuth 2.0 configuration
testObjectoptionalAuthentication test configuration

AuthenticationType

Allowed Values

  • none
  • apiKey
  • basic
  • bearer
  • oauth1
  • oauth2
  • custom

ConnectorCategory

Allowed Values

  • crm
  • payment
  • communication
  • storage
  • analytics
  • database
  • marketing
  • accounting
  • hr
  • productivity
  • ecommerce
  • support
  • devtools
  • social
  • other

ConnectorInstance

Properties

PropertyTypeRequiredDescription
idstringInstance ID
connectorIdstringConnector ID
namestringInstance name
descriptionstringoptionalInstance description
credentialsRecord<string, any>Encrypted credentials
configRecord<string, any>optionalAdditional config
activebooleanInstance active status
createdAtstringoptionalCreation time
lastTestedAtstringoptionalLast test time
testStatusEnum<'unknown' | 'success' | 'failed'>Connection test status

ConnectorOperation

Properties

PropertyTypeRequiredDescription
idstringOperation ID (snake_case)
namestringOperation name
descriptionstringoptionalOperation description
typeEnum<'read' | 'write' | 'delete' | 'search' | 'trigger' | 'action'>Operation type
inputSchemaObject[]optionalInput parameters
outputSchemaRecord<string, any>optionalOutput schema
sampleOutputanyoptionalSample output
supportsPaginationbooleanSupports pagination
supportsFilteringbooleanSupports filtering

OAuth2Config

Properties

PropertyTypeRequiredDescription
authorizationUrlstringAuthorization endpoint URL
tokenUrlstringToken endpoint URL
scopesstring[]optionalOAuth scopes
clientIdFieldstringClient ID field name
clientSecretFieldstringClient secret field name

OperationParameter

Properties

PropertyTypeRequiredDescription
namestringParameter name
labelstringParameter label
descriptionstringoptionalParameter description
typeEnum<'string' | 'number' | 'boolean' | 'array' | 'object' | 'date' | 'file'>Parameter type
requiredbooleanRequired parameter
defaultanyoptionalDefault value
validationRecord<string, any>optionalValidation rules
dynamicOptionsstringoptionalFunction to load dynamic options

OperationType

Allowed Values

  • read
  • write
  • delete
  • search
  • trigger
  • action

On this page