---
title: Trigger Registry
description: Trigger Registry protocol schemas
---

{/* ⚠️  AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs go in content/docs/guides/. */}

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

2. **Lightweight Operations**

- Single-action integrations (send, notify, log)

- No bidirectional sync required

- Webhook receivers for incoming events

3. **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

```typescript

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' \}

]

\}

```

<Callout type="info">
**Source:** `packages/spec/src/automation/trigger-registry.zod.ts`
</Callout>

## TypeScript Usage

```typescript
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

| 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** | `Object[]` | optional | Select field options |
| **placeholder** | `string` | optional | Placeholder text |


---

## Authentication

### Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **type** | `Enum<'none' \| 'apiKey' \| 'basic' \| 'bearer' \| 'oauth1' \| 'oauth2' \| 'custom'>` | ✅ | Authentication type |
| **fields** | `Object[]` | optional | Authentication fields |
| **oauth2** | `Object` | optional | OAuth 2.0 configuration |
| **test** | `Object` | optional | Authentication 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

| 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 |


---

## ConnectorOperation

### Properties

| 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** | `Object[]` | optional | Input parameters |
| **outputSchema** | `Record<string, any>` | optional | Output schema |
| **sampleOutput** | `any` | optional | Sample output |
| **supportsPagination** | `boolean` | ✅ | Supports pagination |
| **supportsFiltering** | `boolean` | ✅ | Supports filtering |


---

## OAuth2Config

### Properties

| 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 |


---

## OperationParameter

### Properties

| 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 |


---

## OperationType

### Allowed Values

* `read`
* `write`
* `delete`
* `search`
* `trigger`
* `action`


---

