Trigger Nodes

Trigger Nodes

Trigger nodes are special nodes that start flow execution. Every flow must have at least one trigger. A flow can have multiple triggers if you want to reuse the same integration logic in different scenarios.


API Trigger

Type: api-trigger

The API Trigger allows you to launch a Flow Instance with optional input using your application's API or SDK.

trigger:
  type: api-trigger
  name: Manual Sync Trigger
  config:
    inputSchema:
      type: object
      properties:
        recordId:
          type: string
        syncAll:
          type: boolean

Configuration options:

  • inputSchema – Optional schema that will be validated when the flow is triggered

Output:

The output contains the input provided when triggering the flow:

{
  recordId: '12345',
  syncAll: false
}

Schedule Trigger

Type: schedule-trigger

The Schedule Trigger runs a flow at regular intervals as long as the Flow Instance is enabled.

trigger:
  type: schedule-trigger
  name: Hourly Sync
  config:
    intervalMinutes: 60

Configuration options:

  • intervalMinutes – How often the flow should run (5 = every 5 minutes, 60 = hourly, 1440 = daily)

Output:

The output contains timing information:

{
  triggeredAt: '2024-01-15T10:30:00Z'
}

App Event Trigger

Type: app-event-trigger

The App Event Trigger runs a flow when a specific event occurs in your application. Before using this trigger, you need to create an App Event.

trigger:
  type: app-event-trigger
  name: Order Created Event
  config:
    appEventKey: order-created
    filter:
      $eval:
        $var: $.payload.amount
      $gt: 1000

Configuration options:

  • appEventKey – Key of the app event to listen to
  • filter – Optional filter to conditionally trigger the flow based on event data

Output:

The output contains the event payload:

{
  payload: {
    orderId: '12345',
    amount: 1500,
    customer: 'customer-id'
  }
}

Data Record Created Trigger

Type: data-record-created-trigger

This trigger launches a flow when a new data record is created in a selected Data Source.

trigger:
  type: data-record-created-trigger
  name: New Contact Created
  config:
    dataSource:
      collectionKey: contacts
    fieldMapping:
      key: contact-mapping
      defaultValue:
        firstName:
          $var: $.rawFields.first_name
        lastName:
          $var: $.rawFields.last_name
        email:
          $var: $.rawFields.email

Configuration options:

  • dataSource – Specifies which Data Source collection to monitor
  • fieldMapping – Optional Field Mapping to transform data from the external app to your app's format

Output:

The output contains information about the created record:

{
  id: 'contact-123',
  name: 'John Doe',
  url: 'https://app.com/contacts/123',
  fields: {
    firstName: 'John',
    lastName: 'Doe',
    email: '[email protected]'
  },
  rawFields: {
    first_name: 'John',
    last_name: 'Doe',
    email: '[email protected]'
  }
}

Data Record Updated Trigger

Type: data-record-updated-trigger

This trigger launches a flow when an existing data record is updated in a selected Data Source.

trigger:
  type: data-record-updated-trigger
  name: Contact Updated
  config:
    dataSource:
      collectionKey: contacts
    fieldMapping:
      key: contact-mapping

Configuration options:

  • dataSource – Specifies which Data Source collection to monitor
  • fieldMapping – Optional Field Mapping to transform updated data

Output:

The output contains the updated record data in the same format as Data Record Created Trigger.


Data Record Deleted Trigger

Type: data-record-deleted-trigger

This trigger launches a flow when a data record is deleted in a selected Data Source.

trigger:
  type: data-record-deleted-trigger
  name: Contact Deleted
  config:
    dataSource:
      collectionKey: contacts
    fieldMapping:
      key: contact-mapping

Configuration options:

  • dataSource – Specifies which Data Source collection to monitor
  • fieldMapping – Optional Field Mapping to transform data about the deleted record

Output:

The output contains information about the deleted record. Note that some external apps may only provide the record ID.

{
  id: 'contact-123',
  name: 'John Doe'
}

Connector Event Trigger

Type: connector-event-trigger

The Connector Event Trigger launches flows in response to connector-specific events.

trigger:
  type: connector-event-trigger
  name: Custom Webhook Event
  config:
    eventKey: custom-event
    filter:
      $eval:
        $var: $.payload.status
      $eq: completed

Configuration options:

  • eventKey – Key of the event to trigger on
  • filter – Optional filter to conditionally trigger the flow

Output:

The output structure depends on the specific connector and event type. Refer to the connector's documentation for details.