Component Specification
Trigger
The trigger definition is used to specify the properties of a trigger. Below is an explanation of each method that can be used in the trigger definition:
trigger(String name)- Builds newModifiableTriggerDefinitionwith the specified name. The name defines the trigger key (backend ID).description(String description)- Provides a short description of the trigger.output- Defines the output of the trigger.properties(P... properties)- Lists the properties that the trigger needs to perform its task. Properties will be shown in the Properties tab. For more information, refer to the Property.title(String title)- Sets the name of the trigger that will be displayed in the UI. Use Chicago Style.type(TriggerType type)- Sets the type of the trigger. Possible types areCALLABLE,DYNAMIC_WEBHOOK,HYBRID,LISTENER,POLLING,STATIC_WEBHOOKandWEBSOCKET.poll(PollFunction poll)- Required forPOLLINGtriggers. This method is called at specified intervals to check for new data.webhookEnable(WebhookEnableFunction webhookEnable)- Required forDYNAMIC_WEBHOOKtriggers. This method is called when the trigger is enabled to register the webhook with the third-party service.webhookDisable(WebhookDisableConsumer webhookDisable)- Required forDYNAMIC_WEBHOOKtriggers. This method is called when the trigger is disabled to unregister the webhook from the third-party service.webhookRequest(WebhookRequestFunction webhookRequest)- Required forDYNAMIC_WEBHOOKandSTATIC_WEBHOOKtriggers. This method is called when a webhook request is received to process the incoming data.listenerEnable(ListenerEnableConsumer listenerEnable)- Required forLISTENERtriggers. This method is called when the trigger is enabled to start listening for events.listenerDisable(ListenerDisableConsumer listenerDisable)- Required forLISTENERtriggers. This method is called when the trigger is disabled to stop listening for events.webhookValidate(WebhookValidateFunction webhookValidate)- Optional for webhook triggers. Used to validate the incoming webhook request (e.g., checking signatures) before a job is created.webhookValidateOnEnable(WebhookValidateFunction webhookValidateOnEnable)- Optional. Validates the request during the provider's URL-verification handshake performed at enable time (e.g., echoing back a challenge token).webhookRawBody(boolean webhookRawBody)- Whentrue, the raw request body is passed towebhookRequestwithout being parsed (needed for signature verification over the exact bytes).workflowSyncExecution(boolean workflowSyncExecution)- Whentrue, the workflow runs synchronously and the HTTP caller receives the workflow's response (used by request-response webhook patterns).batch(boolean batch)- Whentrueand the trigger output is a list, a single job runs with the whole list; whenfalse, one job runs per list element.deduplicate(DeduplicateFunction deduplicate)- Optional for polling triggers. Provides a key used to drop records that were already seen on a previous poll.dynamicWebhookRefresh(DynamicWebhookRefreshFunction dynamicWebhookRefresh)- Optional forDYNAMIC_WEBHOOKtriggers whose registration expires. Called before expiration to renew the webhook and return a fresh output.
Trigger Type
- CALLABLE: A trigger that has no inbound endpoint of its own - the workflow is invoked directly, by another workflow or by a caller that holds a reference to it.
workflow/v1/newWorkflowCallis the built-in example, and it is also the trigger that makes a workflow exposable as an MCP or A2A tool. - DYNAMIC_WEBHOOK: A trigger that listens for incoming HTTP requests at a dynamically generated URL.
- HYBRID: Combines features of both polling and webhook triggers. It can listen for events via webhooks and also poll for updates, providing flexibility in handling different event sources.
- LISTENER: A trigger that continuously listens for specific events or messages from a source, such as a message queue or event stream, and activates when those events occur.
- POLLING: Regularly checks a data source at specified intervals to detect changes or new data. This type is suitable for systems that do not support webhooks or real-time notifications.
- STATIC_WEBHOOK: A trigger that listens for incoming HTTP requests at a fixed URL. This type is ideal for scenarios where the endpoint URL does not change and can be predefined.
- WEBSOCKET: A trigger fired by a WebSocket upgrade rather than an HTTP request; the platform registers no HTTP webhook controller for it.
browser/v1/voiceSessionis the built-in example.
How is this guide?
Last updated on