aave

n8n community node for Aave v4 Protocol - supply, borrow, and manage DeFi positions

Documentation

n8n-nodes-aave

This is an n8n community node that integrates with the Aave V4 Protocol, enabling you to query DeFi lending data and execute operations directly from your n8n workflows.

Aave is a decentralized non-custodial liquidity protocol where users can supply assets to earn interest or borrow against collateral.

Features

Protocol & Chains

  • Check API health status
  • List supported chains (with testnet/mainnet filter)
  • Get chain details
  • Get protocol history (deposits, borrows, earnings over time)

Hubs & Spokes

  • List/get hubs with summary data
  • Get hub assets and summary history
  • List/get spokes
  • List position managers

Reserves

  • List reserves with filters (supply, borrow, collateral)
  • Get reserve details including APY and settings

Assets

  • Get asset details by ID or token address
  • Get supply/borrow/price history
  • Get category trends (stablecoin, ETH-correlated)

User Positions

  • List all positions for a user
  • Get position details, summary, and summary history
  • Get wallet balances, supplies, borrows
  • Get risk premium breakdown

Activity

  • List transaction history (supply, borrow, repay, withdraw, liquidated)
  • Check if a transaction has been processed

Market Data

  • Get exchange rates (fiat, native, ERC20)
  • Get supply/borrow APY history for reserves

Swaps

  • Get swap quotes
  • Check swap status
  • List user swaps
  • List swappable tokens

Custom Queries

  • Get Schema: Retrieve full GraphQL schema (perfect for AI agents)
  • Execute Query: Run any GraphQL query directly

Installation

n8n Cloud / Hosted

  1. Go to SettingsCommunity Nodes
  2. Click Install a community node
  3. Enter: n8n-nodes-aave
  4. Click Install

Self-hosted n8n

npm install n8n-nodes-aave

For Development

# Clone the repository
git clone https://github.com/bartomolina/n8n-nodes-aave.git
cd n8n-nodes-aave

# Install dependencies
npm install

# Build
npm run build

# Link to n8n for local development
npm link
cd ~/.n8n/custom
npm link n8n-nodes-aave

Credentials

Aave V4 API (Required)

  • API Endpoint: The GraphQL API endpoint

Aave V4 Wallet (Optional - for write operations)

  • Private Key: Your wallet's private key for signing transactions
  • RPC URL: Optional custom RPC URL

Usage Examples

List Supported Chains

  1. Add Aave V4 node → Resource: Protocol → Operation: List Chains
  2. Optionally filter by testnet/mainnet

Get User Positions

  1. Resource: User Position → Operation: List Positions
  2. Enter Chain ID (e.g., 1 for Ethereum)
  3. Enter User Address (e.g., 0x...)

Get Supply APY History

  1. Resource: Market Data → Operation: Get Supply APY History
  2. Enter Reserve ID
  3. Select Time Window (Last Day, Week, Month, etc.)

Execute Custom GraphQL Query

  1. Resource: Custom Query → Operation: Execute Query
  2. Enter your GraphQL query:
query {
  chains(request: { query: { filter: ALL } }) {
    name
    chainId
    isTestnet
  }
}

AI Agent Integration

This node is designed to work as a tool for AI agents via usableAsTool: true. The Custom Query resource with Get Schema and Execute Query operations allows AI agents to:

  1. Discover available queries by fetching the schema
  2. Dynamically construct and execute queries based on user questions

Perfect for building conversational interfaces that can answer questions like:

  • "What's the current supply APY for USDC?"
  • "Show me protocol deposits over the last month"
  • "Which chain has the most liquidity?"

Development

# Watch mode
npm run dev

# Build
npm run build

# Format code
npm run format

# Lint
npm run lint

License

MIT

Links

Discussion