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

# Configure triggers and actions

> Configure the triggers that activate wallet automations and the wallet actions they create.

An automation's `config` pairs one trigger with one action. Triggers define when an automation runs; actions define what it does. New actions can reuse existing triggers whenever the combination is compatible.

The config is reusable across wallets. Values that differ by wallet belong to the attachment instead.

## Triggers

### Deposit

The `deposit` trigger activates when Privy detects a deposit to a wallet with an enabled attachment and the deposited asset matches the configured filter.

A deposit that does not match an enabled attachment does not create an execution. If multiple attachments match, Privy selects the [oldest matching attachment](/controls/automations/manage#matching-precedence).

#### Supported chains

Privy Automations can detect deposits on the following mainnet chains:

| Chain           | CAIP-2 identifier                         |
| --------------- | ----------------------------------------- |
| Ethereum        | `eip155:1`                                |
| Base            | `eip155:8453`                             |
| Polygon         | `eip155:137`                              |
| Arbitrum        | `eip155:42161`                            |
| Optimism        | `eip155:10`                               |
| BNB Smart Chain | `eip155:56`                               |
| Monad           | `eip155:143`                              |
| Tempo           | `eip155:4217`                             |
| Solana          | `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp` |
| Robinhood Chain | `eip155:4663`                             |
| Plasma          | `eip155:9745`                             |
| MegaETH         | `eip155:4326`                             |

### Filter assets

The `assets.mode` field controls which deposits match:

| Mode      | Values | Behavior                                    |
| --------- | ------ | ------------------------------------------- |
| `all`     | None   | Match every detected asset.                 |
| `include` | 1–20   | Match only the listed assets.               |
| `exclude` | 1–20   | Match every asset except the listed assets. |

Each `include` or `exclude` value identifies an asset using a human-readable alias or canonical identifiers:

| Input                                                | Scope                                   |
| ---------------------------------------------------- | --------------------------------------- |
| `{"asset": "usdc"}`                                  | USDC on every supported deployment.     |
| `{"asset": "usdc", "chain": "base"}`                 | USDC on Base.                           |
| `{"asset_address": "0x...", "caip2": "eip155:8453"}` | A contract address on a specific chain. |

Provide exactly one of `asset` or `asset_address` per `value`. A raw `asset_address` must include either `chain` or `caip2`. When `asset` is provided without a chain, Privy expands it to every Privy-supported deployment.

Privy resolves aliases before storing the automation. API responses therefore contain canonical `asset_address` and `caip2` values.

<Warning>
  A matching deposit acts on the triggering asset's full current wallet balance, not only the amount
  from the latest deposit. Any earlier balance of that asset can be included.
</Warning>

If the balance is zero when the execution runs, Privy marks the execution as `skipped` and does not create a wallet action.

## Actions

### Swap

The `swap` action converts the triggering asset into one configured destination asset and chain. `destination_chain_asset` accepts aliases or canonical identifiers, but it must identify exactly one asset on exactly one chain.

```json theme={"system"}
{
  "type": "swap",
  "destination_chain_asset": {
    "asset": "usdc",
    "chain": "base"
  }
}
```

The generated action follows the [Swap API's supported routes](/wallets/actions/swap/overview#supported-chains) and the source wallet's [policies](/controls/policies/overview). Apps should enable [gas sponsorship](/wallets/gas-and-asset-management/gas/overview), particularly when an automation can sweep a native asset.

Action availability depends on the action's own chain and routing support. For example, review the [supported chains](/wallets/actions/swap/overview#supported-chains) and [cross-chain routes](/wallets/actions/swap/overview#cross-chain-swaps) before configuring a swap action.

## Per-wallet parameters

The output address belongs to the attachment rather than the reusable action config. This allows one automation to send each wallet's swap output to a different destination.

```json theme={"system"}
{
  "automation_ids": ["automation-id"],
  "params": {
    "destination_address": "0x..."
  }
}
```

Privy verifies that an automated swap uses the destination asset from the automation and the `destination_address` from the matched attachment.

## Example configuration

This config swaps USDC or USDT deposits on any Privy supported chain into pathUSD on Tempo:

```json theme={"system"}
{
  "trigger": {
    "type": "deposit",
    "assets": {
      "mode": "include",
      "values": [{"asset": "usdc"}, {"asset": "usdt"}]
    }
  },
  "action": {
    "type": "swap",
    "destination_chain_asset": {
      "asset": "pathusd",
      "chain": "tempo"
    }
  }
}
```

Continue to [create and attach an automation](/controls/automations/create-and-attach) after choosing the trigger, filter, destination asset, and per-wallet destination address.
