> ## Documentation Index
> Fetch the complete documentation index at: https://docs.b3os.org/llms.txt
> Use this file to discover all available pages before exploring further.

# 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 &#123;&#123;node.result.field&#125;&#125; 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 &#123;&#123;node.result.field&#125;&#125; expressions, mapping odd/nested action envelopes to flat, app-friendly keys \(e.g. coingecko &#123;&#123;fetch_prices.result.prices.0.prices.usd&#125;&#125; -&gt; btc.usd; db-query &#123;&#123;read_history.result.rows&#125;&#125; -&gt; 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\)\['&lt;this node id&gt;'\] — the normalizer returns appData directly \(no further unwrapping\). |

## Examples

**Workflow node**

```json
{
  "type": "emit-app-data",
  "payload": {
    "data": {
      "btc": {
        "usd": "{{fetch_prices.result.prices.0.prices.usd}}"
      },
      "history": "{{read_history.result.rows}}"
    }
  },
  "children": []
}
```
  **Test with API**

```bash
curl -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}}"
    }
  }
}'
```

**Use expressions for dynamic values**

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.