Lambda Output
The Lambda Output node is the “exit door” for reusable workflows. It packages up the results of your workflow and sends them back to whichever workflow called it, like a function returning its answer.
This node ensures that your reusable workflows always return data in a consistent, predictable format that other workflows can easily use.
How it works
Section titled “How it works”After your workflow processes data, the Lambda Output node takes the final results, formats them according to your specifications, and returns them to the workflow that originally called yours.
graph LR
Process[Workflow Processing] --> Output{Lambda Output}
Output --> Format[Format Results]
Format --> Return[Return to Caller]
style Output fill:#6d28d9,stroke:#fff,color:#fff
Setup guide
Section titled “Setup guide”-
Connect Your Data: Link the Lambda Output node to receive data from the final processing step in your workflow.
-
Define Output Format: Specify exactly what fields you want to return and what type of data each field should contain.
-
Map Your Results: Connect the processed data from your workflow to the appropriate output fields.
-
Test the Output: Run your workflow to verify that the output format matches what calling workflows expect.
Practical example: Content analysis results
Section titled “Practical example: Content analysis results”Let’s say your workflow analyzes website content and you want to return the key findings in a structured way.
Let’s say your workflow analyzes website content and you want to return the key findings in a structured way.
Workflow Results: Your workflow has finished and produced details like extracted text (1247 words) and keywords (“renewable”, “energy”).
Output Configuration: You define the output schema to ensure consistent delivery:
content: Text (String)wordCount: Numberkeywords: List (Array)analyzedAt: Timestamp (String)
Calling Workflow Receives: The main workflow gets a clean package of results:
{ "content": "This article discusses renewable energy trends...", "wordCount": 1247, "keywords": ["renewable", "energy", "solar", "wind"], "analyzedAt": "2024-01-17T10:30:15Z"}Common output patterns
Section titled “Common output patterns”| Output Type | When to Use | Example Setup |
|---|---|---|
| Simple Result | When returning just one piece of information | {"outputSchema": {"type": "string"}} |
| Success/Failure | When you need to indicate if the process worked | {"outputSchema": {"type": "object", "properties": {"success": {"type": "boolean"}, "message": {"type": "string"}}}} |
| Processed Data | When returning transformed or analyzed information | See the content analysis example above |
| List of Results | When your workflow produces multiple items | {"outputSchema": {"type": "array", "items": {"type": "string"}}} |
Troubleshooting
Section titled “Troubleshooting”- “Output validation failed” errors: Check that your workflow data matches the output schema format exactly.
- Calling workflows get unexpected data: Verify that your output schema matches what other workflows are expecting to receive.
- Missing output fields: Make sure all the fields defined in your output schema are actually being provided by your workflow data.