This workflow corresponds to n8n.io template #15042 — we link there as the canonical source.
This workflow follows the Agent → HTTP Request recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"id": "nCZWOVUIt3OTAT6F",
"meta": {
"templateCredsSetupCompleted": true
},
"name": "AI Crypto Portfolio Analyzer",
"tags": [],
"nodes": [
{
"id": "97b3e8ba-72ac-4352-8301-f3d788e7b5e8",
"name": "Polygon blockchain",
"type": "n8n-nodes-quicknode.quicknodeRpc",
"position": [
64,
176
],
"parameters": {
"address": "={{ $json.wallet_address }}"
},
"credentials": {
"quicknodeApi": {
"name": "<your credential>"
}
},
"notesInFlow": true,
"typeVersion": 1
},
{
"id": "def5fc86-698f-4dfe-9e6b-bc5c32dc28ac",
"name": "Ethereum blockchain",
"type": "n8n-nodes-quicknode.quicknodeRpc",
"position": [
64,
16
],
"parameters": {
"address": "={{ $json.wallet_address }}"
},
"credentials": {
"quicknodeApi": {
"name": "<your credential>"
}
},
"notesInFlow": true,
"typeVersion": 1
},
{
"id": "58b50986-714a-4f87-9364-29098748ef24",
"name": "Google Gemini Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
1312,
512
],
"parameters": {
"options": {}
},
"credentials": {
"googlePalmApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "ac39b859-a893-4421-8190-7537c4dba8b7",
"name": "Structured Output Parser",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
1632,
496
],
"parameters": {
"jsonSchemaExample": "{\n \"type\": \"object\",\n \"properties\": {\n \"insight\": {\n \"type\": \"string\",\n \"description\": \"Key observation about the portfolio composition\"\n },\n \"risk\": {\n \"type\": \"string\",\n \"description\": \"Risk level and reasoning (Low / Medium / High)\"\n },\n \"suggestion\": {\n \"type\": \"string\",\n \"description\": \"Actionable recommendation for the user\"\n },\n \"score\": {\n \"type\": \"number\",\n \"description\": \"Portfolio health score between 0 and 100\"\n },\n \"gas_analysis\": {\n \"type\": \"string\",\n \"description\": \"Impact of gas fees on portfolio strategy\"\n },\n \"allocation_summary\": {\n \"type\": \"string\",\n \"description\": \"Summary of ETH vs MATIC allocation\"\n }\n },\n \"required\": [\n \"insight\",\n \"risk\",\n \"suggestion\",\n \"score\",\n \"gas_analysis\",\n \"allocation_summary\"\n ]\n}"
},
"typeVersion": 1.3
},
{
"id": "0991c103-89f0-4b50-991d-92adcc54e6f7",
"name": "Polygon Gas Price",
"type": "n8n-nodes-quicknode.quicknodeRpc",
"position": [
64,
384
],
"parameters": {
"operation": "getGasPrice"
},
"credentials": {
"quicknodeApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "39f372c9-0634-401f-84c0-e5fc5c0d90ae",
"name": "ETH Gas Price",
"type": "n8n-nodes-quicknode.quicknodeRpc",
"position": [
64,
-176
],
"parameters": {
"operation": "getGasPrice"
},
"credentials": {
"quicknodeApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "439dfb25-ecf4-4991-a424-f21cf5f4547d",
"name": "When clicking \u2018Execute workflow\u2019",
"type": "n8n-nodes-base.manualTrigger",
"position": [
-448,
208
],
"parameters": {},
"typeVersion": 1
},
{
"id": "76aea139-db1d-4c53-84a2-7a950a18b3b6",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-64,
-288
],
"parameters": {
"width": 400,
"height": 80,
"content": "## \ud83d\udfe2 Fetch blockchain + gas data"
},
"typeVersion": 1
},
{
"id": "8aadf281-16f6-4170-9fa3-27b54caf27e6",
"name": "Set Wallet & Coins",
"type": "n8n-nodes-base.set",
"position": [
-256,
208
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "ac5c03e4-d79b-4c94-b225-a3028365aac9",
"name": "wallet_address",
"type": "string",
"value": "0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe"
},
{
"id": "64973927-212c-4bb3-a0b7-b104af78de3e",
"name": "coins",
"type": "array",
"value": "[\"ETH\",\"MATIC\"]"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "2a26c45d-9e9c-40c8-bac3-f28d6cb4566a",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-464,
64
],
"parameters": {
"width": 320,
"height": 80,
"content": "## \ud83d\udfe2 Trigger and Input Layer"
},
"typeVersion": 1
},
{
"id": "8b6896a8-e020-4a0d-9989-9d8245a63fe8",
"name": "Extract Chain Metrics",
"type": "n8n-nodes-base.code",
"position": [
512,
208
],
"parameters": {
"jsCode": "let eth_balance = 0;\nlet polygon_balance = 0;\nlet eth_gas = 0;\nlet polygon_gas = 0;\nlet coins = [];\n\nfor (const item of items) {\n\n const data = item.json;\n\n // ETH Balance\n if (data.network === \"ethereum-mainnet\" && data.balanceEth !== undefined) {\n eth_balance = Number(data.balanceEth);\n }\n\n // Polygon Balance\n if (data.network === \"polygon-mainnet\" && data.balanceEth !== undefined) {\n polygon_balance = Number(data.balanceEth);\n }\n\n // ETH Gas\n if (data.network === \"ethereum-mainnet\" && data.gasPriceGwei !== undefined) {\n eth_gas = Number(data.gasPriceGwei);\n }\n\n // Polygon Gas\n if (data.network === \"polygon-mainnet\" && data.gasPriceGwei !== undefined) {\n polygon_gas = Number(data.gasPriceGwei);\n }\n\n // \u2705 Get coins dynamically\n if (data.coins) {\n coins = data.coins;\n }\n}\n\nreturn [{\n json: {\n eth_balance,\n polygon_balance,\n eth_gas,\n polygon_gas,\n coins\n }\n}];"
},
"typeVersion": 2
},
{
"id": "ef64e3c6-4a11-4d0c-8d8d-960cc4cfd026",
"name": "Fetch Crypto Prices (USD)",
"type": "n8n-nodes-base.httpRequest",
"position": [
736,
288
],
"parameters": {
"url": "=https://min-api.cryptocompare.com/data/pricemulti?fsyms={{ $json.coins.map(c => c.toUpperCase()).join(',') }}&tsyms=USD",
"options": {}
},
"typeVersion": 4.4
},
{
"id": "6eb471cc-8948-4e84-9590-b5890e2d3639",
"name": "Merge Price & Portfolio Data",
"type": "n8n-nodes-base.merge",
"position": [
960,
208
],
"parameters": {
"mode": "combine",
"options": {},
"combineBy": "combineByPosition"
},
"typeVersion": 3.2
},
{
"id": "1589cf28-5c99-4b00-8a9b-7729a2ad7b60",
"name": "Merge Blockchain Data",
"type": "n8n-nodes-base.merge",
"position": [
288,
160
],
"parameters": {
"numberInputs": 5
},
"typeVersion": 3.2
},
{
"id": "e71a28d6-dbb3-4d06-8c7c-cc21cc9093d0",
"name": "Calculate Portfolio Metrics",
"type": "n8n-nodes-base.code",
"position": [
1184,
208
],
"parameters": {
"jsCode": "const data = $json;\n\n// Prices\nconst eth_price = data.ETH?.USD || 0;\nconst matic_price = data.MATIC?.USD || 0;\n\n// Balances\nconst eth_balance = data.eth_balance || 0;\nconst matic_balance = data.polygon_balance || 0;\n\n// Gas\nconst eth_gas = data.eth_gas || 0;\nconst matic_gas = data.polygon_gas || 0;\n\n// USD values\nconst eth_value = eth_balance * eth_price;\nconst matic_value = matic_balance * matic_price;\n\nconst total = eth_value + matic_value;\n\n// Allocation %\nconst eth_pct = total ? (eth_value / total) * 100 : 0;\nconst matic_pct = total ? (matic_value / total) * 100 : 0;\n\nreturn [{\n json: {\n eth_balance,\n matic_balance,\n eth_price,\n matic_price,\n eth_gas,\n matic_gas,\n eth_value,\n matic_value,\n total,\n eth_pct,\n matic_pct\n }\n}];"
},
"typeVersion": 2
},
{
"id": "bc8e0ac6-43c3-4415-b648-8d221d92df02",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
736,
48
],
"parameters": {
"width": 304,
"height": 80,
"content": "## \ud83d\udfe2 Processing Layer"
},
"typeVersion": 1
},
{
"id": "ae7b9af1-e23f-4780-84fc-e5d69b939616",
"name": "Generate AI Portfolio Insights",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
1424,
208
],
"parameters": {
"text": "=You are a professional crypto portfolio analyst.\n\nAnalyze the following portfolio:\n\n--- Portfolio Data ---\nETH Balance: {{$json.eth_balance}}\nMATIC Balance: {{$json.matic_balance}}\n\nETH Price (USD): {{$json.eth_price}}\nMATIC Price (USD): {{$json.matic_price}}\n\nETH Value (USD): {{$json.eth_value}}\nMATIC Value (USD): {{$json.matic_value}}\n\nETH Allocation: {{$json.eth_pct}}%\nMATIC Allocation: {{$json.matic_pct}}%\n\nETH Gas (Gwei): {{$json.eth_gas}}\nPolygon Gas (Gwei): {{$json.matic_gas}}\n\nTotal Portfolio Value: ${{$json.total}}\n\n---\n\n### Instructions:\n\n1. Give clear **Insight**\n2. Evaluate **Risk Level** (Low / Medium / High)\n3. Provide **Actionable Suggestion**\n4. Give a **Portfolio Score (0\u2013100)**\n5. Mention if gas fees impact strategy\n\nReturn ONLY valid JSON.\nDo not include markdown, explanation, or extra text.\nScore must be a number between 0 and 100.\n---\n\n### Output STRICTLY in JSON format:\n\n{\n \"insight\": \"\",\n \"risk\": \"\",\n \"suggestion\": \"\",\n \"score\": \"\",\n \"gas_analysis\": \"\",\n \"allocation_summary\": \"\"\n}",
"options": {},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 3.1
},
{
"id": "36070bd1-22f2-46ed-b5a2-3fd7057531d2",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
1360,
-144
],
"parameters": {
"width": 304,
"height": 80,
"content": "## \ud83d\udfe2 AI Analysis"
},
"typeVersion": 1
},
{
"id": "01e07e96-d497-469a-a122-b70693edcf87",
"name": "Merge Portfolio & AI Data",
"type": "n8n-nodes-base.merge",
"position": [
1680,
-32
],
"parameters": {
"mode": "combine",
"options": {},
"combineBy": "combineByPosition"
},
"typeVersion": 3.2
},
{
"id": "bdeb765f-5054-4ef6-a8eb-d7ffaf872905",
"name": "Format Slack Report",
"type": "n8n-nodes-base.code",
"position": [
1904,
-32
],
"parameters": {
"jsCode": "const data = $json;\n\n// ===== Portfolio values =====\nconst total = Number(data.total || 0);\nconst eth_value = Number(data.eth_value || 0);\nconst matic_value = Number(data.matic_value || 0);\n\n// ===== Allocation =====\nconst eth_pct = Number(data.eth_pct || 0).toFixed(2);\nconst matic_pct = Number(data.matic_pct || 0).toFixed(2);\n\n// ===== AI OUTPUT (CORRECT PATH \u2705) =====\nconst ai = data.output?.properties || {};\n\nconst insight = ai.insight?.description || \"No insight available\";\nconst risk = ai.risk?.description || \"No risk data\";\nconst suggestion = ai.suggestion?.description || \"No suggestion\";\nconst gas = ai.gas_analysis?.description || \"No gas data\";\nconst score = ai.score?.description ?? \"N/A\";\n\n// ===== MESSAGE =====\nconst message = `\n\ud83d\udcca *Crypto Portfolio Report*\n\n\ud83d\udcb0 *Total Value:* $${total.toFixed(2)}\n\n\ud83d\udcb8 *Breakdown:*\n\u2022 ETH Value: $${eth_value.toFixed(2)}\n\u2022 MATIC Value: $${matic_value.toFixed(6)}\n\n\ud83d\udcc8 *Allocation:*\n\u2022 ETH: ${eth_pct}%\n\u2022 MATIC: ${matic_pct}%\n\n\ud83e\udde0 *Insight:*\n${insight}\n\n\u26a0\ufe0f *Risk:*\n${risk}\n\n\ud83d\udca1 *Suggestion:*\n${suggestion}\n\n\u26fd *Gas Analysis:*\n${gas}\n\n\ud83c\udfc6 *Portfolio Score:* ${score}/100\n`;\n\nreturn [{ json: { slack_text: message } }];"
},
"typeVersion": 2
},
{
"id": "0e4f40ab-5394-40fb-9e26-09bd13f75528",
"name": "Send Slack Alert",
"type": "n8n-nodes-base.slack",
"position": [
2128,
-32
],
"parameters": {
"text": "={{ $json.slack_text }}",
"user": {
"__rl": true,
"mode": "list",
"value": "U0AS8B0F3S4",
"cachedResultName": "guptadivyanshu765"
},
"select": "user",
"otherOptions": {},
"authentication": "oAuth2"
},
"credentials": {
"slackOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 2.4
},
{
"id": "cf56c20d-e3e2-4fa6-99f8-5a8407873e56",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
1888,
-160
],
"parameters": {
"width": 320,
"height": 80,
"content": "## \ud83d\udfe2 Output Layer"
},
"typeVersion": 1
},
{
"id": "bc7038c1-cbc2-4731-92cf-6596a3894436",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1120,
-400
],
"parameters": {
"color": 6,
"width": 568,
"height": 1380,
"content": "## AI Powered Multi-Chain Crypto Portfolio Tracker & Risk Analyzer using QuickNode\n\nTrack your multi-chain crypto portfolio with AI-powered insights, gas analysis, and automated Slack alerts.\n\n**This workflow provides a fully automated multi-chain crypto portfolio tracking system powered by AI.**\n\nIt fetches wallet balances and gas prices across multiple blockchain networks (e.g., Ethereum, Polygon, and more via QuickNode), retrieves real-time token prices, and calculates total portfolio value in USD.\n\nUsing an AI agent, it generates:\n\n- Portfolio insights\n- Risk analysis\n- Investment suggestions\n- Gas fee insights across chains\n- Portfolio health score\n\nThe final report is formatted and delivered directly to Slack.\n\n\n\u2699\ufe0f **Key Features**\n\n\ud83c\udf10 Multi-chain support (Ethereum, Polygon, extendable to any EVM chain via QuickNode)\n\n\ud83d\udcb0 Real-time USD portfolio valuation\n\n\u2696\ufe0f Accurate asset allocation (%)\n\n\ud83e\udde0 AI-powered insights, risk & suggestions\n\n\u26fd Cross-chain gas fee analysis\n\n\ud83d\udce9 Automated Slack alerts\n\n\u23f0 Daily scheduling support (Cron)\n\n\ud83d\udd0c Powered by QuickNode for reliable blockchain data\n\n\n\ud83e\udde0 **How It Works**\n- Fetch wallet balances across chains (via QuickNode RPC)\n- Fetch gas prices for each network\n- Retrieve live token prices (ETH, MATIC, etc.)\n- Calculate total portfolio value & allocation\n- Generate AI-driven insights and recommendations\n- Format a clean Slack-ready report\n- Send automated alert\n\n\n\u23f0 **Scheduling (CORE VALUE)**\n\nTurn this into a Daily AI Portfolio Assistant:\n\n- Add a Cron node\n- Run every morning (e.g., 9 AM)\n- Get daily portfolio intelligence in Slack\n\n\n\ud83c\udfaf **Use Cases**\n\n- Multi-chain portfolio tracking\n- Daily crypto risk monitoring\n- Automated investment insights\n- Web3 traders & investors\n- DAO treasury monitoring\n- Crypto founders & analysts\n\n\n\ud83d\udd27 **Requirements**\n\n- Wallet address (EVM-compatible chains)\n- QuickNode RPC endpoints (Ethereum, Polygon, etc.)\n- Slack account (for alerts)\n- Price API (CoinGecko / CryptoCompare)\n"
},
"typeVersion": 1
}
],
"active": false,
"settings": {
"binaryMode": "separate",
"executionOrder": "v1"
},
"versionId": "ba9aeb4b-5868-4877-9d51-716254d1fd3d",
"connections": {
"ETH Gas Price": {
"main": [
[
{
"node": "Merge Blockchain Data",
"type": "main",
"index": 0
}
]
]
},
"Send Slack Alert": {
"main": [
[]
]
},
"Polygon Gas Price": {
"main": [
[
{
"node": "Merge Blockchain Data",
"type": "main",
"index": 3
}
]
]
},
"Polygon blockchain": {
"main": [
[
{
"node": "Merge Blockchain Data",
"type": "main",
"index": 2
}
]
]
},
"Set Wallet & Coins": {
"main": [
[
{
"node": "ETH Gas Price",
"type": "main",
"index": 0
},
{
"node": "Ethereum blockchain",
"type": "main",
"index": 0
},
{
"node": "Polygon blockchain",
"type": "main",
"index": 0
},
{
"node": "Polygon Gas Price",
"type": "main",
"index": 0
},
{
"node": "Merge Blockchain Data",
"type": "main",
"index": 4
}
]
]
},
"Ethereum blockchain": {
"main": [
[
{
"node": "Merge Blockchain Data",
"type": "main",
"index": 1
}
]
]
},
"Format Slack Report": {
"main": [
[
{
"node": "Send Slack Alert",
"type": "main",
"index": 0
}
]
]
},
"Extract Chain Metrics": {
"main": [
[
{
"node": "Fetch Crypto Prices (USD)",
"type": "main",
"index": 0
},
{
"node": "Merge Price & Portfolio Data",
"type": "main",
"index": 0
}
]
]
},
"Merge Blockchain Data": {
"main": [
[
{
"node": "Extract Chain Metrics",
"type": "main",
"index": 0
}
]
]
},
"Google Gemini Chat Model": {
"ai_languageModel": [
[
{
"node": "Generate AI Portfolio Insights",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Structured Output Parser": {
"ai_outputParser": [
[
{
"node": "Generate AI Portfolio Insights",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Fetch Crypto Prices (USD)": {
"main": [
[
{
"node": "Merge Price & Portfolio Data",
"type": "main",
"index": 1
}
]
]
},
"Merge Portfolio & AI Data": {
"main": [
[
{
"node": "Format Slack Report",
"type": "main",
"index": 0
}
]
]
},
"Calculate Portfolio Metrics": {
"main": [
[
{
"node": "Generate AI Portfolio Insights",
"type": "main",
"index": 0
},
{
"node": "Merge Portfolio & AI Data",
"type": "main",
"index": 0
}
]
]
},
"Merge Price & Portfolio Data": {
"main": [
[
{
"node": "Calculate Portfolio Metrics",
"type": "main",
"index": 0
}
]
]
},
"Generate AI Portfolio Insights": {
"main": [
[
{
"node": "Merge Portfolio & AI Data",
"type": "main",
"index": 1
}
]
]
},
"When clicking \u2018Execute workflow\u2019": {
"main": [
[
{
"node": "Set Wallet & Coins",
"type": "main",
"index": 0
}
]
]
}
}
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
googlePalmApiquicknodeApislackOAuth2Api
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
This workflow provides a fully automated multi-chain crypto portfolio tracking system powered by AI.
Source: https://n8n.io/workflows/15042/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
CV → Match → Screen → Decide, all automated
This workflow analyzes any npm package and delivers a data-driven recommendation using Firecrawl + APIs + AI reasoning.
Stop drowning in job applications. This workflow transforms your hiring process from a manual, time-consuming data-entry task into an automated, intelligent screening system.
How it works: This end-to-end workflow automates your personal or brand content strategy by: 🧠 Using Google Gemini or OpenAI to generate engaging LinkedIn/X content from a title or trending posts. 🗓️
Content - Newsletter Agent. Uses formTrigger, chainLlm, outputParserStructured, httpRequest. Event-driven trigger; 91 nodes.