| title | Trigger Registry |
|---|---|
| description | Trigger Registry protocol schemas |
{/*
Trigger Registry Protocol
Lightweight automation triggers for simple integrations.
Inspired by Zapier, n8n, and Workato connector architectures.
Use [automation/trigger-registry.zod.ts](/docs/references/automation/trigger-registry) 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](/docs/references/integration/connector) 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
- Simple Automation Triggers
-
Slack notifications on record updates
-
Twilio SMS on workflow events
-
SendGrid email templates
- Lightweight Operations
-
Single-action integrations (send, notify, log)
-
No bidirectional sync required
-
Webhook receivers for incoming events
- Quick Integrations
-
Payment webhooks (Stripe, PayPal)
-
Communication triggers (Twilio, SendGrid, Slack)
-
Simple API calls to third-party services
See also: https://zapier.com/developer/documentation/v2/
See also: https://docs.n8n.io/integrations/creating-nodes/
See also: ../../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' \}
]
\}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);| Property | Type | Required | Description |
|---|---|---|---|
| name | string |
✅ | Field name (snake_case) |
| label | string |
✅ | Field label |
| type | Enum<'text' | 'password' | 'url' | 'select'> |
✅ | Field type |
| description | string |
optional | Field description |
| required | boolean |
✅ | Required field |
| default | string |
optional | Default value |
| options | { label: string; value: string }[] |
optional | Select field options |
| placeholder | string |
optional | Placeholder text |
| Property | Type | Required | Description |
|---|---|---|---|
| type | Enum<'none' | 'apiKey' | 'basic' | 'bearer' | 'oauth1' | 'oauth2' | 'custom'> |
✅ | Authentication type |
| fields | { name: string; label: string; type: Enum<'text' | 'password' | 'url' | 'select'>; description?: string; … }[] |
optional | Authentication fields |
| oauth2 | { authorizationUrl: string; tokenUrl: string; scopes?: string[]; clientIdField: string; … } |
optional | OAuth 2.0 configuration |
| test | { url?: string; method: Enum<'GET' | 'POST' | 'PUT' | 'DELETE'> } |
optional | Authentication test configuration |
noneapiKeybasicbeareroauth1oauth2custom
crmpaymentcommunicationstorageanalyticsdatabasemarketingaccountinghrproductivityecommercesupportdevtoolssocialother
| Property | Type | Required | Description |
|---|---|---|---|
| id | string |
✅ | Instance ID |
| connectorId | string |
✅ | Connector ID |
| name | string |
✅ | Instance name |
| description | string |
optional | Instance description |
| credentials | Record<string, any> |
✅ | Encrypted credentials |
| config | Record<string, any> |
optional | Additional config |
| active | boolean |
✅ | Instance active status |
| createdAt | string |
optional | Creation time |
| lastTestedAt | string |
optional | Last test time |
| testStatus | Enum<'unknown' | 'success' | 'failed'> |
✅ | Connection test status |
| Property | Type | Required | Description |
|---|---|---|---|
| id | string |
✅ | Operation ID (snake_case) |
| name | string |
✅ | Operation name |
| description | string |
optional | Operation description |
| type | Enum<'read' | 'write' | 'delete' | 'search' | 'trigger' | 'action'> |
✅ | Operation type |
| inputSchema | { name: string; label: string; description?: string; type: Enum<'string' | 'number' | 'boolean' | 'array' | 'object' | 'date' | 'file'>; … }[] |
optional | Input parameters |
| outputSchema | Record<string, any> |
optional | Output schema |
| sampleOutput | any |
optional | Sample output |
| supportsPagination | boolean |
✅ | Supports pagination |
| supportsFiltering | boolean |
✅ | Supports filtering |
| Property | Type | Required | Description |
|---|---|---|---|
| authorizationUrl | string |
✅ | Authorization endpoint URL |
| tokenUrl | string |
✅ | Token endpoint URL |
| scopes | string[] |
optional | OAuth scopes |
| clientIdField | string |
✅ | Client ID field name |
| clientSecretField | string |
✅ | Client secret field name |
| Property | Type | Required | Description |
|---|---|---|---|
| name | string |
✅ | Parameter name |
| label | string |
✅ | Parameter label |
| description | string |
optional | Parameter description |
| type | Enum<'string' | 'number' | 'boolean' | 'array' | 'object' | 'date' | 'file'> |
✅ | Parameter type |
| required | boolean |
✅ | Required parameter |
| default | any |
optional | Default value |
| validation | Record<string, any> |
optional | Validation rules |
| dynamicOptions | string |
optional | Function to load dynamic options |
readwritedeletesearchtriggeraction