Triggers

Status: Current | Last reviewed: 2026-07-07

A workflow runs because something invoked it: a direct API call, an external event, a schedule, or an agent/tool call. This page covers the common invocation paths and what each one expects.

Trigger types

Type Fires when Use it for
Schedule A cron expression matches Daily reports, periodic syncs, scheduled outbound
Webhook An HTTP POST hits a generated URL Inbound integration with anything that can POST JSON
Broker A message lands on a configured queue (RabbitMQ / SQS / Pub/Sub) High-volume async ingest, durable retries
Salesforce Pub/Sub A configured Salesforce CDC or platform event channel publishes Real-time CRM-driven workflows

Open Start in the workflow editor, then use Enabled Triggers to add or configure trigger sources. The Input Parameters section below it defines the JSON keys callers provide and the schema shown to agents and MCP clients.

Schedule

Pick a cron expression. The TrueServe scheduler picks a leader across replicas, so each scheduled run fires once even if the platform is scaled wide.

TrueServe evaluates times in your tenant's configured time zone. If you do not see your zone, ask your tenant administrator. Administrators control the list.

Webhook

For webhook-triggered workflows, send events to the workflows-api event endpoint:

POST https://events.<your-host>/api/v1/events

Send a valid bearer token (see secrets and tokens) and a JSON body with event_type, source, and payload. The workflow runs when its trigger rules match the event type and payload criteria.

The generic event endpoint creates a new event for each accepted request. Retry only when no 202 Accepted response was received. If your source needs stronger retry and dedupe behavior, use a broker or provider trigger instead.

Note: The webhook returns 202 Accepted; the workflow runs asynchronously. Don't expect the response to carry the result.

Direct API invocation

Every active workflow can also be called directly:

POST https://events.<your-host>/api/v1/workflows/<workflow_id>/execute

Send a JSON body with inputs matching the workflow's Input Parameters and execution_mode set to sync or async. Use a TrueServe API token with workflow access:

Authorization: Bearer tsf_...

sync returns the End node's mapped outputs when the workflow finishes quickly. async returns an execution id that you can monitor in run history or through the workflows-api execution endpoints.

Broker

For high-volume ingest, point a queue at TrueServe and have the workflow consume from it. You configure an integration with the Events capability first, then pick it as the trigger source.

Broker triggers give you durable retries: if a node fails and exhausts its retries, the message goes to the configured DLQ instead of being silently dropped. This is the right trigger when "we cannot afford to drop one of these" matters more than latency.

Salesforce Pub/Sub

Connect Salesforce as an integration first (see Adding an integration), then pick the channel from the trigger inspector. Common channels:

Channel Fires on
CaseChangeEvent Any field change on Case
OpportunityChangeEvent Any field change on Opportunity
Custom platform events Whatever your Salesforce admin defined

The payload is the full Salesforce event. See your org's documentation for the shape.

Exposing a workflow to external agents (MCP)

Beyond triggers, a published workflow can be served as a named MCP tool to agents outside TrueServe (Claude Desktop, a partner's agent platform, Google GECX). In the workflow editor, open the Start node and turn on External MCP Exposure. The tool appears on the platform's external MCP endpoint as workflow_<name> (or the custom tool name you set), with parameters taken from the workflow's Inputs list.

Add only the Inputs the caller should provide. When External MCP Exposure is enabled, every Input needs its own Description because those descriptions are included in the generated tool schema.

Exposing a workflow to TrueServe agents

In the workflow editor, open the Start node, add the Agent Tool trigger, then fill in Tool name and Tool description. The tool description is the workflow-level description an agent sees when deciding whether to call the workflow.

Agent Tool does not create a description input parameter. Add only the parameters the caller should provide. When Agent Tool or External MCP Exposure is enabled, every Input Parameter must have its own Description because those descriptions are included in the generated tool schema.

Picking the right trigger

If you need... Use
Time-based recurrence Schedule
A partner system pushing changes Webhook
Bulk events with at-least-once semantics Broker
Real-time CRM reactivity Salesforce Pub/Sub

If two would work, prefer broker for production scale and webhook for prototyping.

See also