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.
How it works
Section titled “How it works”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
Setup guide
Section titled “Setup guide”-
Name Your Input: Give your input parameter a clear name like “websiteUrl” or “userText” that describes what data you’re expecting.
-
Define the Format: Specify what type of data you need - text, numbers, or more complex structures with multiple fields.
-
Set Requirements: Mark which fields are required and which are optional. You can also set default values for optional fields.
-
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/123waitTime:10
Workflow Receives: Your workflow starts with this data ready for use:
{ "websiteData": { "url": "https://news.example.com/article/123", "waitTime": 10 }}Common input types
Section titled “Common input types”| Input Type | When to Use | Example Setup |
|---|---|---|
| Simple Text | When you need just one piece of text | {"parameterName": "userMessage", "inputSchema": {"type": "string"}} |
| Number | For quantities, timeouts, or calculations | {"parameterName": "maxResults", "inputSchema": {"type": "number"}} |
| Multiple Fields | When you need several related pieces of data | See the website extractor example above |
| Optional Fields | When some data is nice-to-have but not required | Add "default" values to make fields optional |
Troubleshooting
Section titled “Troubleshooting”- “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.