Emit App Data
Publish a generated app's data contract. Takes a `data` object — the exact view-model the app should render, assembled from upstream node results via {{node.result.field}} expressions — and echoes it verbatim. A generated app reads THIS one node (by type) instead of parsing each action's raw output, so the keys you put in `data` are the app's contract.
Built-in action Built In
Publish a generated app's data contract. Takes a data object — the exact view-model the app should render, assembled from upstream node results via {{node.result.field}} expressions — and echoes it verbatim. A generated app reads THIS one node (by type) instead of parsing each action's raw output, so the keys you put in data are the app's contract.
At a Glance
| Field | Value |
|---|---|
| Action ID | emit-app-data |
| Category | Built In |
| Connector | Not required |
| Requires gas | No |
| Funds movement | None declared |
| Tags | app, generated-app, output, view-model, utility |
Payload Schema
| Field | Type | Required | Description |
|---|---|---|---|
data | object | Yes | The exact view-model the generated app renders. Assemble it from upstream node results with {{node.result.field}} expressions, mapping odd/nested action envelopes to flat, app-friendly keys (e.g. coingecko {{fetch_prices.result.prices.0.prices.usd}} -> btc.usd; db-query {{read_history.result.rows}} -> a top-level array). The keys and nesting here ARE the app's data contract — the app reads them 1:1. |
Result Schema
| Field | Type | Required | Description |
|---|---|---|---|
appData | object | Yes | Echo of 'data', verbatim. In a generated app, read it via unwrapRunOutputs(detail)['<this node id>'] — the normalizer returns appData directly (no further unwrapping). |
Examples
json{ "type": "emit-app-data", "payload": { "data": { "btc": { "usd": "{{fetch_prices.result.prices.0.prices.usd}}" }, "history": "{{read_history.result.rows}}" } }, "children": []}
bashcurl -X POST "https://api.b3os.org/v1/actions/emit-app-data/test" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "inputs": { "data": { "btc": { "usd": "{{fetch_prices.result.prices.0.prices.usd}}" }, "history": "{{read_history.result.rows}}" } }}'
Payload fields can use workflow expressions such as {{$trigger.body.amount}}, {{$nodes.fetch.result.price}}, and {{$props.asset}} when the value should come from a trigger, prior node, or reusable workflow prop.
