writeOutput
Write a value to the flow’s output. The key must be defined in the flow config’s output array.
Signature
await utils.writeOutput(key, value)Parameters
| Param | Type | Description |
|---|---|---|
key | string | Output key (must match config) |
value | ProfileOutputValue | Value to store (see accepted types below) |
Accepted Value Types
| Type | Constraint |
|---|---|
string | number | boolean | Primitive values |
Array | Max 20 elements, each must be a primitive |
Object | Max 10 entries, values must be primitives |
Examples
await utils.writeOutput("status", "SUCCESS");
await utils.writeOutput("balance", 123.45);
await utils.writeOutput("tokens", ["ETH", "USDT", "BTC"]);
await utils.writeOutput("data", { token: "abc", verified: true });Error Handling
Throws if the key is not defined in the flow config’s output array.
Last updated on