Skip to content

Lambda Input

The Lambda Input node acts as the “front door” for reusable workflows. It defines what information your workflow needs to receive when another workflow calls it, like specifying what ingredients a recipe requires.

Think of it as creating a template that says “to use this workflow, you must provide these specific pieces of information.” This makes your workflows reusable across different projects and situations.

Illustration of data flowing into a reusable workflow component

When you create a workflow that other workflows will use, the Lambda Input node defines the “contract” - what data must be provided and in what format. It validates incoming data and makes it available to the rest of your workflow.

graph LR
  Caller[Other Workflow] --> Input{Lambda Input}
  Input --> Validate[Validate Data]
  Validate --> Start[Start Workflow]
  style Input fill:#6d28d9,stroke:#fff,color:#fff
  1. Name Your Input: Give your input parameter a clear name like “websiteUrl” or “userText” that describes what data you’re expecting.

  2. Define the Format: Specify what type of data you need - text, numbers, or more complex structures with multiple fields.

  3. Set Requirements: Mark which fields are required and which are optional. You can also set default values for optional fields.

  4. Test Your Input: Run a test to make sure the data validation works as expected before using it in other workflows.

Practical example: Website content extractor

Section titled “Practical example: Website content extractor”

Let’s create a reusable workflow that can extract content from any website. The Lambda Input defines what information callers must provide.

Let’s create a reusable workflow that can extract content from any website. The Lambda Input defines what information callers must provide.

Input Setup: You define a parameter called websiteData that expects:

  • url (Required): The link to the page.
  • waitTime (Optional): How long to wait for the page to load (default: 5 seconds).

Calling the Workflow: When another workflow calls this one, it sends:

  • url: https://news.example.com/article/123
  • waitTime: 10

Workflow Receives: Your workflow starts with this data ready for use:

{
"websiteData": {
"url": "https://news.example.com/article/123",
"waitTime": 10
}
}
Input TypeWhen to UseExample Setup
Simple TextWhen you need just one piece of text{"parameterName": "userMessage", "inputSchema": {"type": "string"}}
NumberFor quantities, timeouts, or calculations{"parameterName": "maxResults", "inputSchema": {"type": "number"}}
Multiple FieldsWhen you need several related pieces of dataSee the website extractor example above
Optional FieldsWhen some data is nice-to-have but not requiredAdd "default" values to make fields optional
  • “Parameter not found” errors: Make sure the parameter name in your Lambda Input matches exactly what you’re using in other nodes of your workflow.
  • Validation failures: Check that the calling workflow is sending data in the exact format you specified in your input schema.
  • Missing data: Verify that all required fields are marked as required in your schema, and that calling workflows provide them.