---
# System prepended metadata

title: ORCA Triggertypes

---

# ORCA Triggertypes

This document describes the trigger types and syntax for ORCA workflows.

## API call

You can post to an URL with your payload or use hardcoded values.

**Example usage:**

```yaml=
name: Send basic message

trigger: API

inputs:
  type: 'object'
  properties:
    invitationUrl:
      type: string


actions:
  - id: receive-invitation
    uses: connections/receive-invitation
    with:
      invitationUrl: $['invitationUrl']
  - id: send-welcome-message
    uses: message/send-basic-message
    with:
      connectionId: $['receive-invitation']['connectionId']
      message: "Welcome!"
```

## Agent webhook event

You specify the event you want your workflow to be triggered by. The payload is hardcoded in the workflow or retrieved from the agent event.

**Example usage:**

### Option 1

```yaml=
name: Send basic message

trigger:
    name: Agent Webhook Event
    type: ConnectionStateChanged
    state: Completed
    
# this object is unneccesary nested, because trigger supplies all the input values. Inputs wil always be empty.
inputs:
  type: 'object'
  properties:
    trigger:
      type: 'object'
      properties: 
        connectionId:
          type: string

actions:
  - id: send-welcome-message
    uses: message/send-basic-message
    with:
      connectionId: $['trigger']['connectionId']
      message: 'Welcome!'
```

### Option 2

```yaml=
name: Send basic message

trigger:
  name: Agent Event
  type: ConnectionStateChanged
  state: Completed

# in this case the inputs object is replaced the results of trigger
inputs:
  type: 'object'
  properties:
    id:
      type: 'string'

actions:
  - id: send-welcome-message
    uses: message/send-basic-message
    with:
      connectionId: $['id']
      message: 'Welcome!'
```


## Cron job

You specify a cron schedule for when you want the workflow to run. The payload is hardcoded in the workflow.

**Example usage:**

```yaml=
name: Send basic message

trigger:
    name: Cron
    schedule: * * * 1 *
    
actions:
  - id: send-welcome-message
    uses: message/send-basic-message
    with:
      connectionId: "719af30e-b8cd-4dcd-ac66-6ec203d1bb1a"
      message: "Welcome!"
```

## Trigger X

## Trigger X