{
  "id": "ECZnCUL1v6EUrpHN",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "AAVE Portfolio Professional AI Agent",
  "tags": [],
  "nodes": [
    {
      "id": "8b4dd2cc-ecb4-46bb-bf3e-7715cf88a108",
      "name": "Telegram",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2760,
        0
      ],
      "parameters": {
        "text": "={{ $json.output }}",
        "chatId": "<<Insert ChatID>>",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "6506d454-1cd2-44b7-8207-9797141dce5a",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        620,
        0
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours"
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "94d3ce0c-fafd-4ca0-a767-a164a5b2c160",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1320,
        320
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "51b04d71-e0fa-48bd-a6bb-80021478010b",
      "name": "getDefiSummary",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        1600,
        320
      ],
      "parameters": {
        "url": "=https://deep-index.moralis.io/api/v2.2/wallets/{{$json.Wallet_Address}}/defi/summary",
        "options": {},
        "sendHeaders": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "toolDescription": "Get DeFi protocols by wallet",
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "981c2af0-b001-4f82-903a-b7c843fa0df9",
      "name": "getDefiPositionsSummary",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        1900,
        320
      ],
      "parameters": {
        "url": "=https://deep-index.moralis.io/api/v2.2/wallets/{{$json.Wallet_Address}}/defi/positions",
        "options": {},
        "sendHeaders": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "toolDescription": "Get DeFi positions by wallet",
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "4f95523b-4877-4f29-a9f1-21c2d153bbb6",
      "name": "getDefiPositionsByProtocol",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        2180,
        320
      ],
      "parameters": {
        "url": "=https://deep-index.moralis.io/api/v2.2/wallets/{{$json.Wallet_Address}}/defi/aave-v3/positions",
        "options": {},
        "sendHeaders": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "toolDescription": "Get detailed DeFi positions by wallet and protocol",
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "1df5e729-f892-4a1e-8c4a-f50af0fc318e",
      "name": "Gmail",
      "type": "n8n-nodes-base.gmail",
      "position": [
        2780,
        260
      ],
      "parameters": {
        "sendTo": "user@example.com",
        "message": "={{ $json.htmlBody }}",
        "options": {
          "appendAttribution": false
        },
        "subject": "Aave DeFi Health Report"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "60badfca-b47c-4e07-abc4-be75e2297a71",
      "name": "Format Email",
      "type": "n8n-nodes-base.code",
      "position": [
        2480,
        260
      ],
      "parameters": {
        "jsCode": "const aiOutput = $json.output || \"No data available.\";\nconst date = new Date().toISOString().split('T')[0];\n\n// Extract wallet using regex\nconst walletMatch = aiOutput.match(/Wallet:\\s*(0x[a-fA-F0-9]{40})/);\nconst wallet = walletMatch ? walletMatch[1] : \"Unknown Wallet\";\n\n// Convert \\n to <br> for HTML formatting\nconst htmlFormatted = aiOutput\n  .replace(/---/g, '<hr>') // Replace section breaks\n  .replace(/\\n{2,}/g, '<br><br>') // Extra line spacing between sections\n  .replace(/\\n/g, '<br>'); // Standard line breaks\n\n// Wrap in basic HTML styling\nconst htmlBody = `\n  <div style=\"font-family: Arial, sans-serif; font-size: 14px; line-height: 1.6; color: #222;\">\n    ${htmlFormatted}\n  </div>\n`;\n\nconst textBody = aiOutput;\nconst subject = `\ud83d\udee1\ufe0f Aave DeFi Health Report \u2013 ${date}`;\n\nreturn [\n  {\n    json: {\n      wallet,\n      subject,\n      htmlBody,\n      textBody\n    }\n  }\n];"
      },
      "typeVersion": 2
    },
    {
      "id": "cf7e92d5-5201-4273-a65d-bb80f2d1f993",
      "name": "AAVE Portfolio Professional AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1740,
        0
      ],
      "parameters": {
        "text": "={{ $json.Wallet_Address }}",
        "options": {
          "systemMessage": "You are a blockchain DeFi data assistant. Your task is to fetch, analyze, and summarize Aave-related DeFi positions using the Moralis DeFi API, then deliver a human-readable report to the user via Telegram.\n\nYour task is to:\n1. Fetch, analyze, and summarize Aave-related DeFi positions using the Moralis DeFi API.\n2. Collect data from the following three API endpoints:\n   - **getDefiSummary**  \n     URL: https://deep-index.moralis.io/api/v2.2/wallets/{{ $json.wallet_address }}/defi/summary  \n     Description: Retrieves a list of all DeFi protocols the wallet is interacting with.\n\n   - **getDefiPositionsSummary**  \n     URL: https://deep-index.moralis.io/api/v2.2/wallets/{{ $json.wallet_address }}/defi/positions  \n     Description: Provides a summary of DeFi protocol positions for the wallet, including collateral and debt levels.\n\n   - **getDefiPositionsByProtocol**  \n     URL: https://deep-index.moralis.io/api/v2.2/wallets/{{ $json.wallet_address }}/defi/aave-v3/positions  \n     Description: Returns detailed Aave position data, including pool details, underlying assets, balances, and health factors.\n\n\ud83d\udd39 Your output format must follow this structure:\n\n1\ufe0f\u20e3 **Header**  \n\ud83d\udcca Aave DeFi Health Report\nWallet: {{wallet_address}}\nDate: {{$json.current_date}}\n\n2\ufe0f\u20e3 **Position Summary (Loop over each Aave pool position)**  \n\n\u25aa\ufe0f Pool: {{pool_name}}\n\u2022 Supply: ${{supplyBalanceUSD}}\n\u2022 Borrowed: ${{borrowBalanceUSD}}\n\u2022 Collateral: ${{collateralValueUSD}}\n\u2022 Health Factor: {{healthFactor}}\n\u2022 Liquidation Threshold: {{liquidationThreshold}}\n\u2022 Liquidation Risk: {{liquidationRisk ? \"\u26a0\ufe0f Yes\" : \"No\"}}\n\nUnderlying Assets:\n{{#each underlyingAssets}}\n- {{name}} ({{symbol}}): {{balance}}\n{{/each}}\n\n\n, \n\n4\ufe0f\u20e3 **Readable Numbers:**  \n- Format large numbers with commas (e.g., `15,000` instead of `15000`).\n- Display ETH values to 4 decimal places for easy reading.\n\n5\ufe0f\u20e3 **Fallback Message**  \nIf no Aave data is found, reply with:\n\n\u274c No Aave V3 positions found for this wallet.\n\n6\ufe0f\u20e3 **Example Telegram Output:**  \n\n\ud83d\udcca Aave DeFi Health Report\nWallet: 0xA221674eDB403A8F714F66Af74a2332c3CB5C0c3\nDate: 2025-05-08\n\n\u25aa\ufe0f Pool: Aave Lending Pool\n\u2022 Supply: $15,000.00\n\u2022 Borrowed: $7,500.00\n\u2022 Collateral: $15,000.00\n\u2022 Health Factor: 2.00\n\u2022 Liquidation Threshold: 1.05\n\u2022 Liquidation Risk: No\n\u2022 Net Worth\nUnderlying Assets:\n\nDAI: 10,000\n\nUSDC: 5,000\n\n\n\ud83d\udd39 **Instructions:**  \n- Fetch data directly from the Moralis API endpoints provided.  \n- Parse and format the response according to the structure above.  \n- Send the formatted message to the specified Telegram Chat ID.  \n- If no data is available, send the fallback message instead.  \n- This report should be updated every 30 minutes and triggered on critical health factors (<1.1).\n\n"
        },
        "promptType": "define"
      },
      "typeVersion": 1.9
    },
    {
      "id": "b57ddee3-7b92-4e89-9f58-37855a86ab31",
      "name": "Wallet Addresses to Monitor",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        980,
        0
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1rTPT4-e8AER5xJkm297ibk3e4wVhDd5zSi66kTOCW0U/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1rTPT4-e8AER5xJkm297ibk3e4wVhDd5zSi66kTOCW0U",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1rTPT4-e8AER5xJkm297ibk3e4wVhDd5zSi66kTOCW0U/edit?usp=drivesdk",
          "cachedResultName": "Aave Wallet Address"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "16293754-9aa6-4c6c-b9c5-e630e0ccbe25",
      "name": "Edit Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        1340,
        0
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "92ced85e-ea59-4c12-9ee9-fe0b46a91ed4",
              "name": "Wallet_Address",
              "type": "string",
              "value": "={{ $json.wallet_address }}"
            },
            {
              "id": "da0fed7a-5fe0-4202-b8e6-f8ccb7efcebe",
              "name": "=current_date",
              "type": "string",
              "value": "={{ new Date().toISOString().split('T')[0] }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "40cde5ac-8e8c-4e34-8ed8-24f2e13933cd",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        540,
        -240
      ],
      "parameters": {
        "color": 4,
        "height": 420,
        "content": "## \u23f0 Scheduler\n\n\ud83d\udd01 Triggers the workflow at fixed intervals (default: every X hours)\n\n\u2705 Used for automatic periodic scanning of all wallets in the sheet.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "72748224-3c09-4cc0-8607-d64788b35c0f",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        900,
        -340
      ],
      "parameters": {
        "color": 7,
        "width": 260,
        "height": 520,
        "content": "## \ud83d\udcc4 Google Sheets Wallet Loader\n\n\ud83d\udccc Purpose: Loads wallet addresses from a Google Sheet\n\n\u2795 Add wallet: Insert a new row\n\u2796 Remove wallet: Delete the row\n\n\u26a0\ufe0f Required column: `wallet_address`\n\ud83d\uddc2\ufe0f Source Sheet: [Google Sheet link]\n"
      },
      "typeVersion": 1
    },
    {
      "id": "e1b4d506-5859-466b-8754-2e2bd2630685",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1260,
        -260
      ],
      "parameters": {
        "color": 2,
        "height": 440,
        "content": "## \ud83e\udde9 Set Variables\n\n\ud83e\udeaa `Wallet_Address` \u2013 used in all API calls and report labels  \n\ud83d\udcc5 `current_date` \u2013 dynamically generates today's date in `YYYY-MM-DD` format\n\n\u2705 Enables personalized reporting per wallet\n"
      },
      "typeVersion": 1
    },
    {
      "id": "d2494da5-0196-438a-8da8-02fba036ab3b",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1620,
        -340
      ],
      "parameters": {
        "color": 5,
        "width": 500,
        "height": 520,
        "content": "## \ud83e\udd16 Aave AI Report Generator\n\n\ud83e\udde0 Uses LangChain + GPT to generate a DeFi health report for Aave V3 positions\n\n\ud83d\udce5 Input: `Wallet_Address`, `current_date`\n\ud83d\udcca Fetches data from Moralis API:\n  - /defi/summary\n  - /defi/positions\n  - /defi/aave-v3/positions\n\n\ud83e\uddfe Outputs formatted message sent to:\n- Telegram\n- Email\n"
      },
      "typeVersion": 1
    },
    {
      "id": "b27d9c2c-853c-4aad-891d-eb1722089b17",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1520,
        280
      ],
      "parameters": {
        "color": 6,
        "height": 460,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n## \ud83d\udce1 Moralis API \u2013 DeFi Summary\n\n\ud83d\udd0e URL (dynamic): /wallets/{{$json.Wallet_Address}}/defi/summary  \n\ud83d\udccb Description: Fetches protocols wallet is using  \n\u26a0\ufe0f Requires valid Moralis API Key (HTTP Header Auth)\n"
      },
      "typeVersion": 1
    },
    {
      "id": "956ddef2-e2cb-4203-8aa1-e1bed07895f7",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1820,
        280
      ],
      "parameters": {
        "color": 6,
        "height": 460,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## \ud83d\udce1 Moralis API \u2013 Position Summary\n\n\ud83d\udd0e URL (dynamic): /wallets/{{$json.Wallet_Address}}/defi/positions  \n\ud83d\udccb Description: Gets protocol-level position data (supply, borrow, collateral)  \n\u26a0\ufe0f Required for high-level Aave analysis\n"
      },
      "typeVersion": 1
    },
    {
      "id": "30a23bfd-ea48-473d-b72c-0164c278d7b4",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2100,
        280
      ],
      "parameters": {
        "color": 6,
        "height": 460,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n## \ud83d\udce1 Moralis API \u2013 Aave V3 Details\n\n\ud83d\udd0e URL (dynamic): /wallets/{{$json.Wallet_Address}}/defi/aave-v3/positions  \n\ud83d\udccb Description: Gets pool-level breakdown (assets, health factor, risk)  \n\ud83d\udea8 Critical for liquidation monitoring\n"
      },
      "typeVersion": 1
    },
    {
      "id": "5ca1a63a-c5a3-4a96-a1b4-9942ef73467d",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2700,
        200
      ],
      "parameters": {
        "color": 4,
        "width": 260,
        "height": 560,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## \ud83d\udce7 Send Aave Report via Gmail\n\n\ud83d\udce4 Sends formatted HTML email report  \n\ud83d\udce5 Input: `htmlBody`, `subject` from code node  \n\ud83d\udccc To: <<Replace Email>>\n\n\u2705 Requires Gmail OAuth2 credential\n"
      },
      "typeVersion": 1
    },
    {
      "id": "45ee0bc1-5c11-4b18-9f2f-8b09d015e6e8",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2400,
        200
      ],
      "parameters": {
        "color": 5,
        "width": 260,
        "height": 560,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## \ud83d\udce8 Format Email Report\n\n\ud83e\uddfe Converts report to HTML + plain text for Gmail delivery  \n\ud83e\udeaa Uses: `Wallet_Address`, `current_date`  \n\ud83d\udcc5 Date is auto-formatted on each run\n\n\u26a0\ufe0f Replace static wallet/date if hardcoded\n"
      },
      "typeVersion": 1
    },
    {
      "id": "9b5d76f4-2e46-4847-a360-f4f2b3927e43",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2700,
        -300
      ],
      "parameters": {
        "color": 4,
        "height": 480,
        "content": "## \ud83d\udcf2 Telegram Message Delivery\n\n\ud83d\udce4 Sends Aave summary message to Telegram chat  \n\ud83d\udce5 Input: AI output in Markdown/HTML format  \n\u2705 Used for real-time updates and alerts\n\n\ud83d\udccc Chat ID: <<Replace ChatId>>\n"
      },
      "typeVersion": 1
    },
    {
      "id": "7384fbd5-7964-4b2a-a0bd-fa715217cac0",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1220,
        280
      ],
      "parameters": {
        "color": 3,
        "width": 260,
        "height": 560,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n## \ud83e\udde0 OpenAI Chat Model\n\n\ud83d\udccc Model: `gpt-4o-mini` (high-speed, multi-modal optimized)\n\n\ud83c\udfaf Role: Processes prompts and generates DeFi summaries and insights  \n\ud83d\udd17 Connected to LangChain Agent node  \n\ud83d\udce5 Inputs: `Wallet_Address`, `current_date`  \n\ud83d\udce4 Output: Natural language Telegram/Email report via AI Agent\n\n\u2705 Ensure your OpenAI API credentials are set\n"
      },
      "typeVersion": 1
    },
    {
      "id": "9baa4c9d-2cb0-40bb-bdb8-cea460451024",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3240,
        -1400
      ],
      "parameters": {
        "width": 1280,
        "height": 2180,
        "content": "# \ud83e\udde0 AAVE Portfolio Professional AI Agent \u2013 Full System Documentation\n\nA next-generation AI-powered DeFi portfolio analyzer built to monitor **multiple wallet addresses** and generate structured Aave V3 health reports via Telegram and Email using LangChain + GPT-4o + Moralis API.\n\n---\n\n## \ud83e\udde9 Included Components (Workflows)\n\n> Download and install the following nodes and credentials to ensure full system operation.\n\n| Component Name                         | Function                                                               |\n| -------------------------------------- | ---------------------------------------------------------------------- |\n| \u2705 Schedule Trigger                     | Runs the agent periodically (e.g. every hour)                          |\n| \u2705 Google Sheets Wallet Loader          | Reads wallet addresses from a Google Sheet                             |\n| \u2705 Set Variables                        | Injects wallet address + current date into the flow                    |\n| \u2705 AAVE Portfolio Professional AI Agent | LangChain Agent calling OpenAI + Moralis APIs to analyze wallet health |\n| \u2705 Moralis API Nodes (3)                | Fetches DeFi summary, positions, and Aave V3-specific data             |\n| \u2705 OpenAI Chat Model                    | Provides GPT-4o-mini language model for report generation              |\n| \u2705 Format Email                         | Converts AI output into styled HTML + plain text                       |\n| \u2705 Telegram Message Delivery            | Sends summary report to Telegram chat                                  |\n| \u2705 Gmail Email Sender                   | Sends full HTML report to configured email address                     |\n\n---\n\n## \u2699\ufe0f Installation Instructions\n\n### Step 1: Import Workflow\n\n1. Open your **n8n editor UI**.\n2. Import the `AAVE_Portfolio_Professional_AI_Agent.json` file.\n3. Ensure all nodes are **connected**, especially Google Sheets \u2192 AI Agent.\n\n### Step 2: Google Sheets Setup\n\n1. Create a new sheet with a column titled `wallet_address`.\n2. Add the Ethereum wallet addresses you want to monitor in each row.\n3. Connect your Google Sheets OAuth2 credential to the workflow.\n\n### Step 3: Credentials Setup\n\n| Service  | Type             | Setup Instructions                                                |\n| -------- | ---------------- | ----------------------------------------------------------------- |\n| Moralis  | HTTP Header Auth | Add `X-API-Key: YOUR_MORALIS_KEY`                                 |\n| OpenAI   | OpenAI API       | Use `gpt-4o-mini` or your preferred model                         |\n| Gmail    | Gmail OAuth2     | Connect your Google Account for email delivery                    |\n| Telegram | Telegram Bot API | Link your bot with the correct Chat ID (`539847013` or as needed) |\n\n---\n\n## \ud83d\udda5\ufe0f System Overview\n\n**Data Flow:**\n\n```\n[Scheduler or Manual Run] \n\u2192 [Google Sheet: Wallets] \n\u2192 [Set Wallet + Date]\n\u2192 [Moralis API Data Fetch] \n\u2192 [LangChain + GPT Summary]\n\u2192 [Telegram + Email Report Delivery]\n```\n\n**Analysis Includes:**\n\n* Supply / Borrow / Collateral per pool\n* Liquidation threshold & health factor\n* Asset-level breakdowns (e.g., WBTC, USDC)\n* Liquidation risk alerts (\u26a0\ufe0f)\n\n---\n\n## \ud83d\udcec Output Format\n\n* Telegram Message: human-readable summary for each wallet\n* Email Report: full HTML + plain text with tables and asset detail\n* Includes dynamic wallet address and current date per report\n\n---\n\n## \ud83d\udd27 Customization Ideas\n\n* Add Telegram commands like `/aave 0x123...` to trigger on-demand\n* Set health-factor alerts (< 1.2) to notify immediately\n* Export to Notion, CSV, or build dashboard integrations\n\n---\n\n## \ud83d\ude80 Support & Licensing\n\n\ud83d\udd17 **Don Jayamaha \u2013 LinkedIn**\n[http://linkedin.com/in/donjayamahajr](http://linkedin.com/in/donjayamahajr)\n\n\u00a9 2025 Treasurium Capital Limited Company. All rights reserved.\nThis AI workflow system, including prompt logic, integration structure, and tooling, is proprietary to **Treasurium Capital**. Reuse, repackaging, or resale is prohibited without license. Educational use permitted with attribution.\n\n\n"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "0f2602e9-4654-4181-af14-06438b8a3a32",
  "connections": {
    "Edit Fields": {
      "main": [
        [
          {
            "node": "AAVE Portfolio Professional AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Email": {
      "main": [
        [
          {
            "node": "Gmail",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "getDefiSummary": {
      "ai_tool": [
        [
          {
            "node": "AAVE Portfolio Professional AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Wallet Addresses to Monitor",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AAVE Portfolio Professional AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "getDefiPositionsSummary": {
      "ai_tool": [
        [
          {
            "node": "AAVE Portfolio Professional AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "getDefiPositionsByProtocol": {
      "ai_tool": [
        [
          {
            "node": "AAVE Portfolio Professional AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Wallet Addresses to Monitor": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AAVE Portfolio Professional AI Agent": {
      "main": [
        [
          {
            "node": "Telegram",
            "type": "main",
            "index": 0
          },
          {
            "node": "Format Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}