> For the complete documentation index, see [llms.txt](https://docs.baas.sh/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.baas.sh/baas-console/automations/reference/trigger.md).

# Trigger object

What each trigger type delivers under trigger.\*, field by field.

`trigger` is the data that started the run, and its shape depends on the trigger type. The [trigger guides](/baas-console/automations/triggers.md) show how each type fires; this page shows what arrives in `trigger` when it does.

## Webhook: the request body

The JSON body of the POST arrives under `trigger.body`, exactly as sent. The order-paid call from the [Webhook](/baas-console/automations/triggers/webhook.md#call-the-webhook) page sends `{"orderId": ...}`, so its actions read `{{trigger.body.orderId}}`. An empty body sets `trigger.body` to `{}`.

Only the body travels: query parameters and request headers stay out of `trigger`.

## Cron: the planned time

A cron trigger provides one value: `trigger.scheduledAt`, the time the run was scheduled for. It is an ISO 8601 timestamp in UTC, whatever timezone the schedule uses, and it stays the same if the delivery is retried.

Everything else comes from the configuration of the actions themselves, as the rewards example on the [Cron](/baas-console/automations/triggers/cron.md) page shows.

## Monitor: the event envelope

A monitor delivers the on-chain event, wrapped with the id of the trigger that caught it. In the `Transfer alerts` example from the [Monitor](/baas-console/automations/triggers/monitor.md) page, `trigger` holds:

```json
{
  "monitor": { "id": "..." },
  "event": {
    "name": "Transfer",
    "signature": "Transfer(address,address,uint256)",
    "topic": "0xddf252ad...",
    "args": {
      "from": "0x...",
      "to": "0x...",
      "value": {
        "raw": "5000000000000000000",
        "formatted": "5.0",
        "metadata": { "encoding": "units", "decimals": "18" }
      }
    },
    "raw": {
      "address": "0x...",
      "blockNumber": 123456,
      "transactionHash": "0xabc...",
      "logIndex": 3,
      "timestamp": "2026-07-15T09:30:12.000Z"
    }
  }
}
```

`trigger.monitor.id` is the id of the monitor that caught the event, the same value actions read as [`context.sourceId`](/baas-console/automations/reference/context.md).

`event.args` is an object keyed by the argument names in the ABI, so you read every argument by its name, as in `{{trigger.event.args.from}}`. An event with no arguments gives `{}`.

Every value follows a fixed encoding:

| What                                                                                | How it arrives                                                                                      |
| ----------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| Integer arguments (`uint256`, ...)                                                  | Decimal strings, like `"5000000000000000000"`, unless [bound to a unit](#arguments-bound-to-a-unit) |
| Address arguments                                                                   | Checksummed (mixed-case) `0x...` addresses                                                          |
| Bytes arguments                                                                     | `0x...` hex strings                                                                                 |
| Tuple arguments                                                                     | Objects, keyed by the names of their components                                                     |
| Array arguments                                                                     | Arrays, in order                                                                                    |
| `raw.transactionHash`                                                               | Lowercase `0x...` hash                                                                              |
| `raw.address`                                                                       | The monitored contract's address, checksummed                                                       |
| `raw.blockNumber`, `raw.logIndex`                                                   | Numbers                                                                                             |
| `raw.timestamp`                                                                     | Delivery time, as an ISO 8601 timestamp                                                             |
| An `indexed` argument of a dynamic type (text, variable-length bytes, array, tuple) | `{ "hash": "0x..." }` — the log keeps only the hash                                                 |

### Arguments bound to a unit

Units come from the contract version you registered, either [detected](/baas-console/contracts/units/automatic-units.md) for a recognized standard like ERC-20 or [declared explicitly](/baas-console/contracts/units/custom-units.md). An argument that has one arrives as an object rather than a bare value, as `value` does above:

| Field       | What it holds                                        |
| ----------- | ---------------------------------------------------- |
| `raw`       | The exact on-chain integer, as a decimal string      |
| `formatted` | The same amount, scaled by the declared decimals     |
| `metadata`  | The conversion applied, as `encoding` and `decimals` |

An amount whose unit depends on a token id, as on an ERC-6909, arrives raw.

Read `raw` wherever the value must stay exact, such as an argument of a later [Transaction](/baas-console/automations/actions/transaction.md). Read `formatted` wherever a person will see it.

To see the exact form an argument takes, open the [Trigger payload](/baas-console/automations/runs-and-logs.md#the-trigger-payload) of a past run.

## Finding a path

Insert paths from the **Insert a variable** panel: it lists what the configured trigger actually delivers. For a monitor, an argument bound to a unit appears as its `raw` and `formatted` leaves, so you insert a usable value instead of the envelope.

{% hint style="info" %}
**Delivery time is not block time.** `trigger.event.raw.timestamp` records when BaaS received the event; for on-chain time, look up the block at `raw.blockNumber`.
{% endhint %}

## Next

* [Context object](/baas-console/automations/reference/context.md): the variables the run itself provides.
* [Monitor](/baas-console/automations/triggers/monitor.md): set up the trigger that delivers the event.
* [Reference](/baas-console/automations/reference.md): back to the section overview.
