Event Structure
Understand how events are structured in the automation system and what data is available for each type of action.
📋 Overview
The automation system uses a standardized event structure that allows triggers and actions to share data consistently. Each event contains specific information about the executed operation.
🏗️ Base Structure
All events follow a common base structure:
{
"version": 1,
"account_id": "account-uuid",
"resourceable_id": "resource-uuid",
"resourceable_type": "ResourceType",
"hook_type": "hook.type",
"data": { /* event specific data */ },
"result": { /* execution result */ }
}
🔄 Hook Events
Crypto Charge Events
Hook Types:
crypto.charge.deposited- When a deposit is detectedcrypto.charge.paid- When a payment is confirmed
Available Data:
account_txn- Account transaction tokenresource_id- Charge IDtoken- Token information (nested object)token.id- Token ID (compatible withfield_type: token)token.symbol- Token symbol (compatible withfield_type: token_symbol)token.contract_address- Contract address (compatible withfield_type: token)token.decimals- Number of decimals (compatible withfield_type: numeric)token.chain- Blockchain information (nested object)
amount- Transaction amount (compatible withfield_type: amount)wallet_address- Wallet address (compatible withfield_type: wallet)timestamp- Date/time of eventsuccess- Success status
PIX Charge Events
Hook Types:
pix.charge.created- When a PIX charge is createdpix.charge.paid- When a PIX is paid
Available Data:
txid- PIX transaction IDamount- Amount in cents (compatible withfield_type: amount)currency- Currency (BRL)payer- Payer informationreceiver- Receiver informationqr_code- QR code for paymentexpires_at- Expiration date
Ramp Events
Hook Types:
ramp.on_ramp.completed- On-ramp completedramp.off_ramp.completed- Off-ramp completed
Available Data:
ramp_id- Ramp IDdirection- Direction (on_ramp/off_ramp)status- Current statusservice_name- Provider (brla, blindpay)source_currency- Source currencytarget_currency- Target currencyamount- Operation amount (compatible withfield_type: amount)exchange_rate- Exchange rate (compatible withfield_type: numeric)walletable_id- Wallet ID (compatible withfield_type: wallet)beneficiary_id- Beneficiary ID (compatible withfield_type: beneficiary)
EVM Wallet Events
Hook Types:
evm_wallet.transfer- Transfer between wallets
Available Data:
from_wallet- Source wallet (compatible withfield_type: wallet)to_wallet- Destination wallet (compatible withfield_type: wallet)token- Transferred token (compatible withfield_type: token)amount- Transferred amount (compatible withfield_type: amount)gas_amount- Gas used (compatible withfield_type: amount)transaction_hash- Transaction hash
⚡ Action Events
Crypto Transfer Action
Action Type: crypto.transfer.new
Input Data:
from_address- Source address (compatible withfield_type: wallet)to_address- Destination address (compatible withfield_type: wallet)amount- Amount (compatible withfield_type: amount)token_symbol- Token symbol (compatible withfield_type: token_symbol)network_name- Network name
Result:
success- Success statustx_hash- Transaction hashcompleted_at- Completion date
Cross Swap Action
Action Type: cross.swap.new
Input Data:
from_token_id- Source token ID (compatible withfield_type: token)to_token_id- Destination token ID (compatible withfield_type: token)from_amount- Source amount (compatible withfield_type: amount)to_address- Destination address (compatible withfield_type: wallet)
Result:
cross_swap_id- Cross swap IDstatus- Current statusto_amount- Received amount (compatible withfield_type: amount)executed_at- Execution date
On-chain Swap Action
Action Type: onchain.swap.new
Input Data:
wallet_address- Wallet address (compatible withfield_type: wallet)token_in_symbol- Input token (compatible withfield_type: token_symbol)token_out_symbol- Output token (compatible withfield_type: token_symbol)amount_in- Input amount (compatible withfield_type: amount)slippage- Configured slippage (compatible withfield_type: numeric)
Result:
success- Success statustx_hash- Transaction hashamount_out- Received amount (compatible withfield_type: amount)
DeFi Position Actions
Action Types:
defi_position.get_fees_earned- Query earned feesdefi_strategy_position.deposit- Deposit into strategydefi_strategy_position.withdraw- Withdraw from strategydefi_strategy_position.get_details- Get position details
Available Data:
position_id- Position ID (compatible withfield_type: defi_position)protocol_name- Protocol nametoken_pair- Token pairfees_earned- Accumulated fees (compatible withfield_type: amount)current_apy- Current APY (compatible withfield_type: numeric)balance- Current balance (compatible withfield_type: amount)
EVM Wallet Actions
Action Types:
evm_wallet.get_native_balance- Query native balanceevm_wallet.get_token_balance- Query token balance
Available Data:
wallet_address- Wallet address (compatible withfield_type: wallet)balance_wei- Balance in wei (compatible withfield_type: amount)balance_formatted- Formatted balance (compatible withfield_type: amount)network_name- Network nametoken_symbol- Token symbol (compatible withfield_type: token_symbol)
🔧 Conditional Actions
Conditional Action
Configuration:
condition.path- Path to value to evaluatecondition.operator- Comparison operatorcondition.value- Expected value
Available Operators:
equals,not_equalsgreater_than,less_thangreater_than_or_equal,less_than_or_equalcontains,not_containsis_present,is_emptyis_true,is_false
Transform Numeric Split Action
Configuration:
source_value_path- Source value path (compatible withfield_type: numeric)allocations- Allocations to applydust_strategy- Strategy for residual values
Allocation Types:
percentage- Percentage (0-100)fixed_value- Fixed value
Result:
total- Total processed value (compatible withfield_type: amount)dust- Residual value (compatible withfield_type: amount)allocations.{name}- Value of each allocation (compatible withfield_type: amount)values.{name}- Processed value of each allocation (compatible withfield_type: amount)
📊 Scheduler Events
Scheduler Events
Hook Type: scheduler
Supported Resources:
DefiPosition- DeFi PositionsEvmWallet- EVM Wallets
Available Data:
resource_id- Resource ID (compatible withfield_type: uuid)resource_type- Resource typetimestamp- Date/time of eventposition_info- Position information (for DeFi)chain_cache- Cached blockchain data
For EvmWallet:
address- Wallet address (compatible withfield_type: wallet)
For DefiPosition:
position_id- Position ID (compatible withfield_type: defi_position)protocol_name- Protocol namebalance- Current balance (compatible withfield_type: amount)
🎯 Dynamic Value Resolution
To access event data in your automations, use the path format:
{events.hooks.crypto_charge_paid.amount}
{events.actions.cross_swap_123.to_amount}
{events.triggers.scheduler_456.data.position_info}
Path Formats:
- Hooks:
events.hooks.<event_key>.<field> - Actions:
events.actions.<ACTION_ID>.<field> - Triggers:
events.triggers.<TRIGGER_ID>.<field>
🔍 Compatibility Filters
The Field Selector system uses smart filters based on automation_type to show only compatible fields for each field type:
Supported Field Types
| field_type | Description | Compatible Fields |
|---|---|---|
wallet | Wallets and addresses | wallet_id, wallet_address, from_wallet, to_wallet, address |
token | Tokens and cryptocurrencies | token_id, token_address, from_token_id, to_token_id |
token_symbol | Token symbols | token_symbol, symbol |
amount | Numeric values | amount, value, balance, from_amount, to_amount |
numeric | Numeric fields | amount, value, balance, decimals, gas_used |
beneficiary | Beneficiaries | beneficiary_id, beneficiary_address, recipient_id |
ramp_token | Ramp tokens | input_asset_id, output_asset_id |
ramp_fiat | Ramp fiat currencies | input_asset_id, output_asset_id |
defi_position | DeFi positions | position_id, defi_position_id |
uuid | Unique identifiers | id, resource_id, account_id |
any | Any field | All available fields |
Temporal Filters
The system also applies temporal filters to ensure that only events happening BEFORE the current action are shown:
- ✅ Included: Hooks (always depth 0) and Actions with lower depth
- ❌ Excluded: The current action itself and Actions that depend on it
Usage Examples
# Wallet field - shows only compatible fields
power_autocomplete_field(
label: "Source Wallet",
field_type: "wallet"
# Shows: {events.hooks.crypto_charge_paid.wallet_address}
# Does not show: {events.hooks.crypto_charge_paid.amount}
)
# Token field - shows only token fields
power_autocomplete_field(
label: "Token",
field_type: "token"
# Shows: {events.hooks.crypto_charge_paid.token.id}
# Does not show: {events.hooks.crypto_charge_paid.wallet_address}
)
# Amount field - shows only numeric values
power_autocomplete_field(
label: "Amount",
field_type: "amount"
# Shows: {events.hooks.crypto_charge_paid.amount}
# Does not show: {events.hooks.crypto_charge_paid.token.symbol}
)
Next steps: Explore Workspaces to create your automations.