On this page
Sommatic Docs
Open portal

Vectry Event Subscription

Trigger workflow execution based on internal system events (Event Bus).

View as Markdown
Open in
Triggers Experimental event.trigger Version 1.0.0 Execution: async

Entry node for event-driven workflows. It reshapes the run's input into { event_id, source, type, payload }; in this version it does not subscribe to the event bus and its filters are not applied.

This trigger subscribes to the Vectry Causal Event Bus. It listens for specific business or system events (e.g., "Order Created", "User Signup") and initiates the workflow when a matching event occurs.

Features:

  • Filtering: Subscribe only to events matching specific criteria (domain, entity, tag).
  • Replay: Process historical events ("since") or only new ones.
  • Pattern Matching: Trigger on complex event sequences (if configured).

Use Cases:

  • Sending a Welcome Email when a 'UserCreated' event occurs.
  • Auditing high-value transactions.

How it works

  1. What starts it: no backend component subscribes to the event bus for this node in this version. The workflow runs when it is started explicitly (a manual run or an execution request) with an event-shaped input.
  2. Reads the incoming item as is; the node config is not read or resolved.
  3. Outputs event_id (default unknown), source (default vectry), type (default unknown) and payload: the input's payload field when present, otherwise the whole input.

In a workflow

The node as it appears in a workflow file (draft_nodes[]), and the envelope of a successful run.

{
  "node_id": "node-order-created",
  "label": "Order created",
  "operator_slug": "event.trigger",
  "operator_version": "1.0.0",
  "config": {
    "filters": [
      {
        "system_domain": "sales",
        "system_entity": "order",
        "operation": "created"
      }
    ],
    "since": "now"
  }
}

Configuration

filters array<object> Required

Match criteria for events.

since string Optional

Timestamp (ISO) or "now".

Default: now

Its configuration shows the shared execution settings, but this node does not apply retries (retryOnFail, maxTries) yet. continueOnFail is not applied by any node.

Behaviour in the code

What the implementation does with these keys beyond what the schema says.

filters
Declared and required by the schema but not read: no event filtering happens. since is not read either.

Output ports

out default

Always, unless an unexpected exception occurs.

Data
{
  "event_id": "evt_01JDX4Q8M2",
  "source": "vectry",
  "type": "order.created",
  "payload": {
    "order_id": "ord_123",
    "total": 129.99,
    "currency": "USD"
  }
}
error

Only on an unexpected exception while reading the input; the output is { error, response }. Not reachable in normal use.

Data
{
  "error": "<exception message>",
  "response": null
}

In expressions

What a later node can read from this node's output with $("Vectry Event Subscription").item.json.<path> (write your node's label instead of Vectry Event Subscription). Editor marks the paths the workflow editor suggests under Previous Nodes (the output contract); Worker marks the paths the worker really returns through out, from the output shown in Ports.

ExpressionEditorWorker
$("Vectry Event Subscription").item.json.event_idstring= "evt_01JDX4Q8M2"
$("Vectry Event Subscription").item.json.sourcestring= "vectry"
$("Vectry Event Subscription").item.json.typestring= "order.created"
$("Vectry Event Subscription").item.json.payloadobject= {…}
$("Vectry Event Subscription").item.json.payload.order_idstringNot suggested by the editor= "ord_123"—
$("Vectry Event Subscription").item.json.payload.totalnumberNot suggested by the editor= 129.99—
$("Vectry Event Subscription").item.json.payload.currencystringNot suggested by the editor= "USD"—

— Worker: The worker returns it but the editor does not suggest it: write it by hand. Keys inside objects can depend on your data or configuration (for example one key per label).

Output contract

event_id string Optional
source string Optional
type string Optional
payload object Optional

Contracts (JSON Schema)

The definition exactly as the orchestrator declares it. All is the whole *.definition.js; compare it with the sections above to spot differences between the documentation and the schema. Use it to validate a node before you publish.

{
  "slug": "event.trigger",
  "name": "Vectry Event Subscription",
  "category": "triggers",
  "version": "1.0.0",
  "description": "Trigger workflow execution based on internal system events (Event Bus).\n\n  This trigger subscribes to the Vectry Causal Event Bus. It listens for specific business or system events (e.g., \"Order Created\", \"User Signup\") and initiates the workflow when a matching event occurs.\n\n  **Features:**\n  - **Filtering:** Subscribe only to events matching specific criteria (domain, entity, tag).\n  - **Replay:** Process historical events (\"since\") or only new ones.\n  - **Pattern Matching:** Trigger on complex event sequences (if configured).\n\n  **Use Cases:**\n  - Sending a Welcome Email when a 'UserCreated' event occurs.\n  - Auditing high-value transactions.",
  "capabilities": [
    "event-subscription",
    "internal-bus",
    "pubsub",
    "vectry"
  ],
  "config_schema": {
    "type": "object",
    "required": [
      "filters"
    ],
    "properties": {
      "filters": {
        "type": "array",
        "title": "Event Filters",
        "description": "Match criteria for events.",
        "items": {
          "type": "object",
          "properties": {
            "system_domain": {
              "type": "string",
              "title": "Domain"
            },
            "system_entity": {
              "type": "string",
              "title": "Entity"
            },
            "operation": {
              "type": "string",
              "title": "Operation"
            },
            "tags": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        }
      },
      "since": {
        "type": "string",
        "title": "Start From",
        "default": "now",
        "description": "Timestamp (ISO) or \"now\"."
      },
      "execution": {
        "type": "object",
        "title": "Execution Settings",
        "properties": {
          "alwaysOutputData": {
            "type": "boolean",
            "title": "Always Output Data",
            "description": "Always output data, even on error (if configured).",
            "default": false
          },
          "retryOnFail": {
            "type": "boolean",
            "title": "Retry On Fail",
            "description": "Retry the execution if it fails.",
            "default": false
          },
          "maxTries": {
            "type": "integer",
            "title": "Max Retries",
            "description": "Number of retries.",
            "default": 3,
            "displayOptions": {
              "show": {
                "retryOnFail": [
                  true
                ]
              }
            }
          },
          "waitBetweenTries": {
            "type": "integer",
            "title": "Wait Between Retries (ms)",
            "default": 1000,
            "displayOptions": {
              "show": {
                "retryOnFail": [
                  true
                ]
              }
            }
          },
          "continueOnFail": {
            "type": "boolean",
            "title": "Continue On Fail",
            "description": "Do not crash workflow on error.",
            "default": false
          },
          "timeout_ms": {
            "type": "integer",
            "title": "Timeout (ms)",
            "description": "Max execution time for this node before it is killed, in milliseconds. Honored by long-running operators (e.g. OCR/extraction, inline code). Default 300000 (5 min).",
            "default": 300000
          }
        }
      }
    }
  },
  "input_contract_schema": null,
  "output_contract_schema": {
    "type": "object",
    "description": "The event payload.",
    "properties": {
      "event_id": {
        "type": "string"
      },
      "source": {
        "type": "string"
      },
      "type": {
        "type": "string"
      },
      "payload": {
        "type": "object"
      }
    }
  },
  "ports": [
    {
      "port_id": "out",
      "label": "Event Received",
      "is_default": true
    },
    {
      "port_id": "error",
      "label": "Error"
    }
  ],
  "execution_mode": "async",
  "tags": [
    "vectry",
    "events",
    "bus",
    "reactive"
  ],
  "is_stateful": false,
  "publisher": {
    "identity": "org_sommatic_ai",
    "profile": {
      "name": "Sommatic AI",
      "verified": true,
      "url": "https://me.veripass.com/sommatic",
      "logo_url": null
    }
  }
}

Execution

Execution
async
Stateful
No
Retries (retryOnFail)
No
Capabilities
event-subscriptioninternal-buspubsubvectry
Tags
vectryeventsbusreactive

Notes and limits

  • Treat this node as a typed entry point: start the workflow with { event_id, source, type, payload } and read the event data downstream at $json.payload.
  • With sample data the engine skips the node and passes the sample input on out unchanged.

Reviewed against the orchestrator code · 31e874b · 2026-11-26

Install agent tools

Give your coding agent the official Sommatic AI docs: skills, the docs MCP server and Markdown pages, so it never has to scrape the site.

Skills only. They do not update by themselves; run it again to refresh.

npx skills add https://docs.sommatic.ai
How agents read these docs