Workflow as Node Trigger

Define the inputs and methods for this workflow when it is used as a custom node.

Overview

This node, named "Workflow as Node Trigger," allows users to define custom methods and input fields for a workflow that can then be executed as a reusable node within other workflows. Essentially, it acts as a template or configuration node where you specify the available actions (methods) and their corresponding input parameters. After configuring this node, you copy the generated JSON configuration and paste it into an "Execute Workflow as Node" node elsewhere.

Common scenarios include:

  • Creating modular workflows with predefined inputs and operations that can be reused across multiple workflows.
  • Simplifying complex workflows by encapsulating logic behind configurable method selections and input fields.
  • Allowing non-technical users to interact with workflows via a controlled set of options and inputs.

Practical example:

  • Define a workflow that supports two actions: "Get" and "Update".
  • For each action, specify which input fields are required and their types.
  • Use this node to generate a configuration JSON.
  • Paste this JSON into an "Execute Workflow as Node" node to run the defined workflow with the selected method and inputs.

Properties

Name Meaning
Note Informational notice guiding the user to define methods and input fields, then copy the generated JSON.
Methods (as a JSON Object) Defines dropdown menus for selecting methods/actions. Example options: "Get", "Update".
Input Fields Collection of input fields available for the workflow. Each field has:
- Default Value: The default value for the input.
- Field Name: Display name shown in the UI.
- Show When...: JSON object specifying when to show this field based on selected method/action.
- Technical Name: Internal identifier for the field.
- Type: Data type of the field; options are String, Number, Boolean.
Node Configuration (Copy This) Read-only JSON output containing the combined configuration of methods and input fields. Users copy this JSON to use in the "Execute Workflow as Node" node.

Output

The node outputs the input data it receives without modification. Specifically, the json output field contains the same data as the input, effectively passing through the data.

No binary data is produced by this node.

Dependencies

  • No external services or API keys are required.
  • No special environment variables or n8n configurations are necessary.
  • The node relies solely on internal configuration and static JSON definitions provided by the user.

Troubleshooting

  • Issue: The generated JSON configuration is invalid or incomplete.

    • Cause: Improperly formatted JSON in the "Methods" or "Show When..." fields.
    • Resolution: Ensure all JSON inputs are valid and correctly structured. Use JSON validators if needed.
  • Issue: Input fields do not appear as expected in the "Execute Workflow as Node" node.

    • Cause: The "Show When..." conditions may not match the selected method.
    • Resolution: Verify that the "Show When..." JSON correctly references the method technical names and values.
  • Issue: The node does not trigger or produce output.

    • Cause: This node is designed as a trigger with no inputs and simply passes data through.
    • Resolution: Use it only to define configuration; actual execution happens in the "Execute Workflow as Node" node.

Links and References

Discussion