Class WebhookTriggerExecutor
java.lang.Object
ai.nervemind.app.executor.WebhookTriggerExecutor
- All Implemented Interfaces:
NodeExecutor
Executor for the "webhookTrigger" node type - starts workflow execution via
HTTP requests.
Enables external systems to trigger workflow execution by calling an HTTP
endpoint.
The actual HTTP endpoint registration is managed by WebhookService;
this executor
is invoked when an HTTP request arrives at the configured path.
Node Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| path | String | "/webhook" | URL path for the webhook endpoint |
| method | String | "POST" | HTTP method (GET, POST, PUT, etc.) |
| authentication | String | "none" | Auth type: "none", "apiKey", "basic" |
Output Data
| Key | Type | Description |
|---|---|---|
| triggeredAt | String | ISO timestamp when request was received |
| triggerType | String | Always "webhook" for this trigger |
| body | Map | Parsed JSON request body |
| headers | Map | HTTP request headers |
| queryParams | Map | URL query parameters |
| requestMethod | String | HTTP method used in request |
| requestPath | String | Requested URL path |
| remoteAddress | String | IP address of the caller |
Webhook URL Format
POST http://localhost:8080/api/webhook/{workflowId}/{path}
/**
Executor for webhook-based workflow triggers.
Handles HTTP webhook requests and converts them into workflow execution
events.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecute(ai.nervemind.common.domain.Node node, Map<String, Object> input, ExecutionService.ExecutionContext context) Executes the business logic for this node type.Unique identifier for the node type this executor handles.
-
Constructor Details
-
WebhookTriggerExecutor
public WebhookTriggerExecutor()Default constructor for Spring.
-
-
Method Details
-
execute
public Map<String,Object> execute(ai.nervemind.common.domain.Node node, Map<String, Object> input, ExecutionService.ExecutionContext context) Description copied from interface:NodeExecutorExecutes the business logic for this node type.- Specified by:
executein interfaceNodeExecutor- Parameters:
node- The node definition containing parameters and configuration. UseNode.parameters()to access user settings.input- Combined output from all upstream nodes that connected to this node. For simple flows, this contains the direct predecessor's output. For merge nodes, it contains combined data.context- Verification context providing access to workflow-scoped services, logger, and execution metadata.- Returns:
- A Map containing the results of this node's execution.
Keys in this map become available variables for downstream nodes.
Note: Returningnullis treated as an empty map.
-
getNodeType
Description copied from interface:NodeExecutorUnique identifier for the node type this executor handles. This must match the 'type' field in the JSON definition of the node.- Specified by:
getNodeTypein interfaceNodeExecutor- Returns:
- The unique type string (e.g., "httpRequest", "llmChat").
-