ObjectStackObjectStack

Workflow

Workflow protocol schemas

Trigger events for workflow automation

Source: packages/spec/src/automation/workflow.zod.ts

TypeScript Usage

import { ConnectorActionRef, CustomScriptAction, EmailAlertAction, FieldUpdateAction, HttpCallAction, PushNotificationAction, WorkflowTriggerType } from '@objectstack/spec/automation';
import type { ConnectorActionRef, CustomScriptAction, EmailAlertAction, FieldUpdateAction, HttpCallAction, PushNotificationAction, WorkflowTriggerType } from '@objectstack/spec/automation';

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

ConnectorActionRef

Properties

PropertyTypeRequiredDescription
namestringAction name
typestring
connectorIdstringTarget Connector ID (e.g. slack, twilio)
actionIdstringTarget Action ID (e.g. send_message)
inputRecord<string, any>Input parameters matching the action schema

CustomScriptAction

Properties

PropertyTypeRequiredDescription
namestringAction name
typestring
languageEnum<'javascript' | 'typescript' | 'python'>Script language
codestringScript code to execute
timeoutnumberExecution timeout in milliseconds
contextRecord<string, any>optionalAdditional context variables

EmailAlertAction

Properties

PropertyTypeRequiredDescription
namestringAction name
typestring
templatestringEmail template ID/DevName
recipientsstring[]List of recipient emails or user IDs

FieldUpdateAction

Properties

PropertyTypeRequiredDescription
namestringAction name
typestring
fieldstringField to update
valueanyValue or Formula to set

HttpCallAction

Properties

PropertyTypeRequiredDescription
namestringAction name
typestring
urlstringTarget URL
methodEnum<'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH'>HTTP Method
headersRecord<string, string>optionalHTTP Headers
bodystringoptionalRequest body (JSON or text)

PushNotificationAction

Properties

PropertyTypeRequiredDescription
namestringAction name
typestring
titlestringNotification title
bodystringNotification body text
recipientsstring[]User IDs or device tokens
dataRecord<string, any>optionalAdditional data payload
badgenumberoptionalBadge count (iOS)
soundstringoptionalNotification sound
clickActionstringoptionalAction/URL when notification is clicked

WorkflowTriggerType

Allowed Values

  • on_create
  • on_update
  • on_create_or_update
  • on_delete
  • schedule

On this page