Leaniostrigger icon

Leaniostrigger

Starts the workflow when a webhook is called

Overview

This node acts as a webhook trigger that starts an n8n workflow when it receives an HTTP request. It supports various HTTP methods (GET, POST, PUT, PATCH, DELETE, HEAD) and can handle different types of incoming data including JSON, form-data multipart, and binary data. The node is useful for integrating external systems or services that need to notify or send data to your workflows in real-time via webhooks.

Common scenarios include:

  • Receiving notifications from third-party services about events such as production created/updated, transaction created/updated, operation created/updated, or order created.
  • Triggering workflows based on custom callbacks defined by the user.
  • Handling file uploads or binary data sent to the webhook.
  • Responding immediately or deferring response control to another node in the workflow.

Practical example:

  • A manufacturing system sends a webhook notification when a new production batch is created (production_created callback). This node triggers the workflow to process the batch data automatically.
  • An e-commerce platform posts order details to the webhook URL, triggering order processing workflows.

Properties

Name Meaning
Authentication Method of authentication for the webhook. Options: leaniosApi, None.
Callback Type of event callback to listen for. Options include: production_created, operation_created, transaction_created, production_updated, transaction_updated, operation_updated, order_created, or empty.
HTTP Method HTTP method(s) the webhook listens to. Options: DELETE, GET, HEAD, PATCH, POST, PUT.
Respond When and how to respond to the webhook request. Options: Immediately (as soon as node executes), When Last Node Finishes (returns data of last executed node), Using 'Respond to Webhook' Node (response controlled elsewhere).
Response Code HTTP status code returned in the webhook response (default 200).
Response Data What data to return in the response when responding after last node finishes. Options: All Entries (array), First Entry JSON (object), First Entry Binary (binary file), No Response Body.
Property Name Name of the property to return data from instead of whole JSON (used with some response modes).
Response Binary Property Name Name of the binary property to return when responding with binary data.
Options Collection of additional options:
- Binary File: Whether webhook receives binary data (for PATCH, PUT, POST).
- Put Output File in Field: Prefix for output binary fields.
- Ignore Bots: Ignore requests from bots/crawlers.
- No Response Body: Send no body in response.
- Raw Body: Return raw binary body.
- Response Data: Custom response data string.
- Response Content-Type: Custom content-type header.
- Response Headers: Additional headers to add to response.

Output

The node outputs JSON data representing the webhook request contents, structured as follows:

  • json: Contains an object with:
    • headers: HTTP headers received.
    • params: URL parameters.
    • query: Query string parameters.
    • body: Parsed request body (JSON or form data).
  • binary (optional): Contains binary data if the webhook received files or raw binary input. The binary data is prepared and stored under a property name specified by the user (default "data").

If the webhook receives multipart form-data, each uploaded file is saved temporarily and then converted into binary data accessible in the output.

Dependencies

  • Requires an HTTP server environment capable of receiving webhook calls.
  • Supports optional authentication via an API key credential (generic).
  • Uses temporary file storage and streaming utilities to handle file uploads.
  • No external API dependencies are explicitly required by this node itself.

Troubleshooting

  • Ignoring Bots: If enabled, legitimate requests from bots or link previewers may be rejected with a 403 error. Disable this option if you expect such traffic.
  • Binary Data Handling: Ensure the correct binary property names are set; otherwise, binary data might not be accessible downstream.
  • Response Modes: Using "Respond using 'Respond to Webhook' node" requires adding that node to the workflow; otherwise, the webhook may hang waiting for a response.
  • Authentication Errors: If authentication is enabled but credentials are missing or invalid, the node will reject requests with a 403 and prompt for authentication.
  • Multipart Form-Data: Large file uploads require sufficient disk space and permissions for temporary file creation.

Links and References

Discussion