节点 / builtin / lambda
Lambda Output
Define the outputs for the lambda workflow.
此内容尚不支持你的语言。
Lambda Output is the end point of a lambda workflow: it sets the values the workflow hands back to whoever called it.
What it does
Section titled “What it does”Each entry under Outputs has a name, a type and a value. The value is usually an expression that reads data from earlier steps. When the run reaches Lambda Output, each value is converted to its type (number, true/false, and so on) and the result is returned to the caller.
Lambda Output is a dead end on the canvas: nothing connects after it. In the calling workflow, the Lambda Workflow node outputs these values, and the next steps continue from there.
When to use it
Section titled “When to use it”- You are building a lambda workflow. It needs a Lambda Output before you can test it or call it.
- You want the caller to get a small, predictable result (for example
summaryandwordCount) instead of whatever the last step produced.
Inputs and settings
Section titled “Inputs and settings”| 设置项 | 类型 | 作用 |
|---|---|---|
| Outputs (必填) | Field list | The outputs for the lambda workflow. |
Fill each value with an expression, for example {{ $input.text }} for the incoming data, or {{ $('Http Request').body }} for a named earlier step. Pick the type that matches what callers expect: a number output turns "42" into 42, and an object or array output reads JSON text into real data.
Outputs
Section titled “Outputs”-
Output
The result is one item with the output names you declared, for example { "summary": "...", "wordCount": 120 }. This is exactly what the calling Lambda Workflow node outputs, and what an AI agent gets back when it uses the workflow through Workflow as Tool.
Dependencies and credentials
Section titled “Dependencies and credentials”None. This node needs no connection and has no slots for other nodes.
Example workflow
Section titled “Example workflow”A lambda workflow that counts the words in a text:
- Lambda Input with one input
text. - Code that returns
{ count: ... }for the text. - Lambda Output with two outputs:
text={{ $('Lambda Input').text }}(string) andwordCount={{ $input.count }}(number). - A calling workflow adds this lambda from My Lambda Workflows and reads
{{ $input.wordCount }}in its next step.
Common issues
Section titled “Common issues”- The caller fails with “Workflow … produced no output. Check that it has an Output node and that the branch reaching it ran.” The run ended without reaching Lambda Output, for example because an IF sent the data down a branch that does not lead here. Make every branch end in Lambda Output, or use a Merge before it.
- A number output comes back as
0. The value is not a number (for example"12 items"), so it falls back to0. Make the expression return only the number. - A true/false output is always true. Any value that is not already a real true/false (including the text
"false") becomes true. Make the earlier step return a real true/false, or use a string output. - An object or array output fails or comes back empty. Text must be valid JSON to become an object or array. An invalid array becomes
[]; an invalid object stops the run with “Failed to parse object”. - There is no Test Workflow button on the canvas. The lambda workflow is missing its Lambda Input or Lambda Output. Use the Add Lambda Output button in the top right.
Related nodes
Section titled “Related nodes”- Lambda Input: the values the lambda workflow accepts.
- Lambda Workflow: call a lambda workflow from another one.
- Workflow as Tool: let an AI agent call it.