Class WebhookTriggerExecutor

java.lang.Object
ai.nervemind.app.executor.WebhookTriggerExecutor
All Implemented Interfaces:
NodeExecutor

@Component public class WebhookTriggerExecutor extends Object implements 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

Webhook trigger configuration 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

Output keys containing incoming HTTP request 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 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: NodeExecutor
      Executes the business logic for this node type.
      Specified by:
      execute in interface NodeExecutor
      Parameters:
      node - The node definition containing parameters and configuration. Use Node.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: Returning null is treated as an empty map.
    • getNodeType

      public String getNodeType()
      Description copied from interface: NodeExecutor
      Unique identifier for the node type this executor handles. This must match the 'type' field in the JSON definition of the node.
      Specified by:
      getNodeType in interface NodeExecutor
      Returns:
      The unique type string (e.g., "httpRequest", "llmChat").