Workflow: CoinMarketCap_Exchange_and_Community_Agent_Tool
Integrations: executeWorkflowTrigger, noOp, stickyNote

{"id": "kbJb4VMD3SZlcS2u", "meta": {"instanceId": "workflow-03e0f566", "versionId": "1.0.0", "createdAt": "2025-09-29T07:07:55.122805", "updatedAt": "2025-09-29T07:07:55.122824", "owner": "n8n-user", "license": "MIT", "category": "automation", "status": "active", "priority": "high", "environment": "production"}, "name": "CoinMarketCap_Exchange_and_Community_Agent_Tool", "tags": ["automation", "n8n", "production-ready", "excellent", "optimized"], "nodes": [{"id": "c055762a-8fe7-4141-a639-df2372f30060", "name": "When Executed by Another Workflow", "type": "n8n-nodes-base.executeWorkflowTrigger", "position": [-160, 340], "parameters": {"workflowInputs": {"values": [{"name": "sessionId"}, {"name": "message"}]}}, "typeVersion": 1.1, "notes": "This executeWorkflowTrigger node performs automated tasks as part of the workflow."}, {"id": "3609967c-f7c4-4be5-8cf5-1213dcf8cd39", "name": "CoinMarketCap Exchange and Community Agent", "type": "n8n-nodes-base.noOp", "position": [300, 340], "parameters": {"text": "={{ $json.message }}", "options": {"systemMessage": "You are a **digital asset intelligence agent** designed to provide deep insights into the cryptocurrency ecosystem by querying CoinMarketCap's API. You support data retrieval across exchanges, community sentiment, and index tracking.\n\n---\n\n### \ud83d\udee0\ufe0f Available Tools & Capabilities\n\n#### 1. \ud83d\udd0d **Exchange Map**\n- **Purpose:** Retrieve a list of all registered cryptocurrency exchanges.\n- **Endpoint:** `{{ $env.API_BASE_URL }}`\n- **Query Parameters:** \n  - `slug` (recommended starting point)\n  - `listing_status`, `start`, `limit`, `crypto_id`\n- **Returns:** Exchange ID, name, slug \u2014 essential for identifying exchanges.\n- **Usage:** Use first to acquire the `id` needed by other tools.\n\n---\n\n#### 2. \ud83e\uddfe **Exchange Info**\n- **Purpose:** Obtain metadata for a specific exchange.\n- **Endpoint:** `{{ $env.API_BASE_URL }}`\n- **Required Parameter:** `id` (from Exchange Map)\n- **Returns:** Description, launch year, country, website/Twitter links, and status.\n\n---\n\n#### 3. \ud83d\udcb0 **Exchange Assets**\n- **Purpose:** View on-chain token holdings of an exchange.\n- **Endpoint:** `{{ $env.API_BASE_URL }}`\n- **Required Parameter:** `id` (from Exchange Map)\n- **Returns:** Token balances, wallet addresses, blockchain platform, and USD value.\n\n---\n\n#### 4. \ud83d\udcc8 **CMC 100 Index**\n- **Purpose:** Get the latest CoinMarketCap 100 Index data.\n- **Endpoint:** `{{ $env.API_BASE_URL }}`\n- **Returns:** Constituents of the index and their weights.\n\n---\n\n#### 5. \ud83d\ude31 **Fear and Greed Index (Latest)**\n- **Purpose:** Access current crypto market sentiment.\n- **Endpoint:** `{{ $env.API_BASE_URL }}`\n- **Returns:** Sentiment index score and classification (e.g., Fear, Greed).\n\n---\n\n### \u26a0\ufe0f Error Trap: API Response Overload\nIf the API response returns **too much data** and exceeds the GPT model's token limit:\n- Notify the user with the message:  \n  **\"\u26a0\ufe0f The requested data exceeds the processing capacity of this model. Please refine your query by limiting results or filtering data.\"**\n- Suggest parameters like `limit`, `start`, or using a specific `id` or `slug` to reduce data size.\n\n---\n\nKeep responses structured, insightful, and performant. Always validate if required parameters are available before invoking a tool. Prioritize `Exchange Map` for ID resolution before calling `Exchange Info` or `Exchange Assets`.\n\n"}, "promptType": "define"}, "typeVersion": 1.8, "notes": "This agent node performs automated tasks as part of the workflow."}, {"id": "811480ce-f2c9-4400-b585-1a3609b5bef0", "name": "Exchange and Community Agent Brain", "type": "n8n-nodes-base.noOp", "position": [-320, 620], "parameters": {"model": {"__rl": true, "mode": "list", "value": "gpt-4o-mini", "cachedResultName": "gpt-4o-mini"}, "options": {}}, "credentials": {"openAiApi": {"id": "yUizd8t0sD5wMYVG", "name": "OpenAi account"}}, "typeVersion": 1.2, "notes": "This lmChatOpenAi node performs automated tasks as part of the workflow."}, {"id": "007b07fd-2abe-4bdd-80ef-8883e0cbfcec", "name": "Exchange and Community Agent Memory", "type": "n8n-nodes-base.noOp", "position": [-140, 620], "parameters": {}, "typeVersion": 1.3, "notes": "This memoryBufferWindow node performs automated tasks as part of the workflow."}, {"id": "669566d0-3dc5-413e-a8b5-80cf4aeaa54d", "name": "Exchange Map", "type": "n8n-nodes-base.noOp", "position": [60, 620], "parameters": {"url": "{{ $env.API_BASE_URL }}", "sendQuery": true, "sendHeaders": true, "authentication": "{{ $credentials.genericCredentialType }}", "genericAuthType": "httpHeaderAuth", "parametersQuery": {"values": [{"name": "slug"}]}, "toolDescription": "Get a map of all crypto exchanges with CoinMarketCap ID, name, and slug.\n\n1st query with only the slug only, if error then try others.", "parametersHeaders": {"values": [{"name": "Accept"}]}}, "credentials": {"httpHeaderAuth": {"id": "OKXROn8aWkgAOvvV", "name": "CoinMarketCap Standard"}}, "typeVersion": 1.1, "notes": "This toolHttpRequest node performs automated tasks as part of the workflow."}, {"id": "03b3e44f-a740-414c-a011-de4d571b7968", "name": "Exchange Info", "type": "n8n-nodes-base.noOp", "position": [280, 620], "parameters": {"url": "{{ $env.API_BASE_URL }}", "sendQuery": true, "sendHeaders": true, "authentication": "{{ $credentials.genericCredentialType }}", "genericAuthType": "httpHeaderAuth", "parametersQuery": {"values": [{"name": "id"}]}, "toolDescription": "Get metadata for a crypto exchange including description, launch date, country, and links.", "parametersHeaders": {"values": [{"name": "Accept"}]}}, "credentials": {"httpHeaderAuth": {"id": "OKXROn8aWkgAOvvV", "name": "CoinMarketCap Standard"}}, "typeVersion": 1.1, "notes": "This toolHttpRequest node performs automated tasks as part of the workflow."}, {"id": "65c2b8ab-7d6d-415e-a436-0a9c14af2457", "name": "CMC 100 Index", "type": "n8n-nodes-base.noOp", "position": [740, 620], "parameters": {"url": "{{ $env.API_BASE_URL }}", "sendHeaders": true, "authentication": "{{ $credentials.genericCredentialType }}", "genericAuthType": "httpHeaderAuth", "toolDescription": "Returns the latest CoinMarketCap 100 Index value, including constituents and their weights.", "parametersHeaders": {"values": [{"name": "Accept"}]}}, "credentials": {"httpHeaderAuth": {"id": "OKXROn8aWkgAOvvV", "name": "CoinMarketCap Standard"}}, "typeVersion": 1.1, "notes": "This toolHttpRequest node performs automated tasks as part of the workflow."}, {"id": "51a94f35-4405-4e53-9fa5-91911759802d", "name": "Fear and Greed Latest", "type": "n8n-nodes-base.noOp", "position": [980, 620], "parameters": {"url": "{{ $env.API_BASE_URL }}", "sendHeaders": true, "authentication": "{{ $credentials.genericCredentialType }}", "genericAuthType": "httpHeaderAuth", "toolDescription": "Returns the latest value from the CMC Crypto Fear and Greed Index.", "parametersHeaders": {"values": [{"name": "Accept"}]}}, "credentials": {"httpHeaderAuth": {"id": "OKXROn8aWkgAOvvV", "name": "CoinMarketCap Standard"}}, "typeVersion": 1.1, "notes": "This toolHttpRequest node performs automated tasks as part of the workflow."}, {"id": "26240549-9b41-4b6a-bf24-d61c8ee155ca", "name": "Exchange Assets", "type": "n8n-nodes-base.noOp", "position": [520, 620], "parameters": {"url": "{{ $env.API_BASE_URL }}", "sendQuery": true, "sendHeaders": true, "authentication": "{{ $credentials.genericCredentialType }}", "genericAuthType": "httpHeaderAuth", "parametersQuery": {"values": [{"name": "id"}]}, "toolDescription": "Returns token holdings of a specific exchange including wallet addresses, platform, balance, and USD value.", "parametersHeaders": {"values": [{"name": "Accept"}]}}, "credentials": {"httpHeaderAuth": {"id": "OKXROn8aWkgAOvvV", "name": "CoinMarketCap Standard"}}, "typeVersion": 1.1, "notes": "This toolHttpRequest node performs automated tasks as part of the workflow."}, {"id": "22b5608c-467e-41ff-81d9-559d110b872d", "name": "Exchange & Community Guide", "type": "n8n-nodes-base.stickyNote", "position": [-1520, -680], "parameters": {"width": 1200, "height": 720, "content": "# \ud83e\udde0 CoinMarketCap_Exchange_and_Community_Agent_Tool Guide\n\nThis agent handles **exchange-level** data, **community sentiment**, and **index insights** using CoinMarketCap API endpoints.\n\n## \ud83d\udd0c Supported Tools\n1. `/v1/exchange/map` \u2013 Get exchange ID, name, and slug\n2. `/v1/exchange/info` \u2013 Metadata: launch date, social, location\n3. `/v1/exchange/assets` \u2013 Token holdings of exchange\n4. `/v3/index/cmc100-latest` \u2013 CoinMarketCap 100 Index info\n5. `/v3/fear-and-greed/latest` \u2013 Sentiment index (0\u2013100)\n\n## \ud83e\udde0 Agent Components:\n- **\ud83e\udde0 Brain**: GPT-4o Mini\n- **\ud83d\udcbe Memory**: Conversation state handler\n- **\u2699\ufe0f Tools**: 5 direct API endpoints\n\n## \ud83e\udde9 Trigger Parameters:\n- `message` \u2013 Main query prompt\n- `sessionId` \u2013 Contextual memory key\n\n## \ud83d\udd11 Notes:\n- Use `Exchange Map` to get valid `id` before calling `Exchange Info` or `Assets`\n- Fear & Greed index returns daily updated data points\n- Index tools return structured component weights"}, "typeVersion": 1, "notes": "This stickyNote node performs automated tasks as part of the workflow."}, {"id": "dd38cd37-bff7-4200-94e4-a7f2a0f3b979", "name": "Usage & Examples", "type": "n8n-nodes-base.stickyNote", "position": [-80, -680], "parameters": {"color": 5, "width": 840, "height": 920, "content": "## \ud83d\udccc Usage Instructions\n\n### \u2705 Step 1: Provide Inputs\nUse `slug` for exchanges or `id` for metadata/assets. \n\n### \u2705 Step 2: Trigger from Supervisor Agent\nThe main workflow will send `message` and `sessionId`.\n\n### \u2705 Step 3: Results Output\nReturns JSON with insights on exchanges or index data.\n\n---\n\n## \ud83d\udd0d Example Prompts\n\n### 1\ufe0f\u20e3 Show latest Fear & Greed score\n```plaintext\nGET /v3/fear-and-greed/latest\n```\n\n### 2\ufe0f\u20e3 Get Binance exchange token holdings\n```plaintext\n1. GET /v1/exchange/map?slug=binance\n2. Use ID to query /v1/exchange/assets?id=...\n```\n\n### 3\ufe0f\u20e3 What coins make up the CMC 100 Index?\n```plaintext\nGET /v3/index/cmc100-latest\n```\n\n### 4\ufe0f\u20e3 Show info on Coinbase\n```plaintext\n1. /v1/exchange/map?slug=coinbase\n2. /v1/exchange/info?id=...\n```"}, "typeVersion": 1, "notes": "This stickyNote node performs automated tasks as part of the workflow."}, {"id": "ce0e7093-9fe0-4b9c-8cf5-50cdfef45d94", "name": "Errors & Licensing", "type": "n8n-nodes-base.stickyNote", "position": [1020, -680], "parameters": {"color": 3, "width": 640, "height": 500, "content": "## \u26a0\ufe0f Error Handling Tips\n\n| Error Code | Meaning |\n|------------|---------|\n| `400` | Bad Request \u2013 missing/invalid param |\n| `401` | Unauthorized \u2013 check API key |\n| `429` | Rate Limit Exceeded |\n| `500` | CoinMarketCap server error |\n\n### \u26a0\ufe0f Large Response Warning\nIf result data exceeds memory limits:\n- Prompt: _\u201c\u26a0\ufe0f Data too large, refine query with limit or filters.\u201d_\n\n---\n\n**Need Help?**  \n\ud83c\udf10 Connect on LinkedIn:  \n\ud83d\udd17 [{{ $env.WEBHOOK_URL }}]({{ $env.WEBHOOK_URL }}\n\n\u00a9 2025 Treasurium Capital Limited Company. All rights reserved.\nThis AI workflow architecture, including logic, design, and prompt structures, is the intellectual property of Treasurium Capital Limited Company. Unauthorized reproduction, redistribution, or resale is prohibited under U.S. copyright law. Licensed use only."}, "typeVersion": 1, "notes": "This stickyNote node performs automated tasks as part of the workflow."}], "active": false, "pinData": {}, "settings": {"executionOrder": "v1", "saveManualExecutions": true, "callerPolicy": "workflowsFromSameOwner", "errorWorkflow": null, "timezone": "UTC", "executionTimeout": 3600, "maxExecutions": 1000, "retryOnFail": true, "retryCount": 3, "retryDelay": 1000}, "versionId": "faf44acc-2d07-4185-877c-b57f9c8c88bb", "connections": {"669566d0-3dc5-413e-a8b5-80cf4aeaa54d": {"main": [[{"node": "error-handler-669566d0-3dc5-413e-a8b5-80cf4aeaa54d", "type": "main", "index": 0}], [{"node": "error-handler-669566d0-3dc5-413e-a8b5-80cf4aeaa54d-b866d5f0", "type": "main", "index": 0}], [{"node": "error-handler-669566d0-3dc5-413e-a8b5-80cf4aeaa54d-910499e4", "type": "main", "index": 0}], [{"node": "error-handler-669566d0-3dc5-413e-a8b5-80cf4aeaa54d-8a8f3c2a", "type": "main", "index": 0}], [{"node": "error-handler-669566d0-3dc5-413e-a8b5-80cf4aeaa54d-b6936d57", "type": "main", "index": 0}], [{"node": "error-handler-669566d0-3dc5-413e-a8b5-80cf4aeaa54d-e6a1c4b4", "type": "main", "index": 0}], [{"node": "error-handler-669566d0-3dc5-413e-a8b5-80cf4aeaa54d-5e412ccd", "type": "main", "index": 0}], [{"node": "error-handler-669566d0-3dc5-413e-a8b5-80cf4aeaa54d-aa83f832", "type": "main", "index": 0}], [{"node": "error-handler-669566d0-3dc5-413e-a8b5-80cf4aeaa54d-e410b2c3", "type": "main", "index": 0}]]}, "03b3e44f-a740-414c-a011-de4d571b7968": {"main": [[{"node": "error-handler-03b3e44f-a740-414c-a011-de4d571b7968", "type": "main", "index": 0}], [{"node": "error-handler-03b3e44f-a740-414c-a011-de4d571b7968-8ac412e5", "type": "main", "index": 0}], [{"node": "error-handler-03b3e44f-a740-414c-a011-de4d571b7968-0dc8bff2", "type": "main", "index": 0}], [{"node": "error-handler-03b3e44f-a740-414c-a011-de4d571b7968-434a57df", "type": "main", "index": 0}], [{"node": "error-handler-03b3e44f-a740-414c-a011-de4d571b7968-55ca02a1", "type": "main", "index": 0}], [{"node": "error-handler-03b3e44f-a740-414c-a011-de4d571b7968-570591e1", "type": "main", "index": 0}], [{"node": "error-handler-03b3e44f-a740-414c-a011-de4d571b7968-067d4516", "type": "main", "index": 0}], [{"node": "error-handler-03b3e44f-a740-414c-a011-de4d571b7968-4366b214", "type": "main", "index": 0}], [{"node": "error-handler-03b3e44f-a740-414c-a011-de4d571b7968-b6800acf", "type": "main", "index": 0}]]}, "65c2b8ab-7d6d-415e-a436-0a9c14af2457": {"main": [[{"node": "error-handler-65c2b8ab-7d6d-415e-a436-0a9c14af2457", "type": "main", "index": 0}], [{"node": "error-handler-65c2b8ab-7d6d-415e-a436-0a9c14af2457-c27159d2", "type": "main", "index": 0}], [{"node": "error-handler-65c2b8ab-7d6d-415e-a436-0a9c14af2457-a27700a2", "type": "main", "index": 0}], [{"node": "error-handler-65c2b8ab-7d6d-415e-a436-0a9c14af2457-bd0dc05d", "type": "main", "index": 0}], [{"node": "error-handler-65c2b8ab-7d6d-415e-a436-0a9c14af2457-3dab5a4b", "type": "main", "index": 0}], [{"node": "error-handler-65c2b8ab-7d6d-415e-a436-0a9c14af2457-901e3408", "type": "main", "index": 0}], [{"node": "error-handler-65c2b8ab-7d6d-415e-a436-0a9c14af2457-37dee448", "type": "main", "index": 0}], [{"node": "error-handler-65c2b8ab-7d6d-415e-a436-0a9c14af2457-4151bb25", "type": "main", "index": 0}], [{"node": "error-handler-65c2b8ab-7d6d-415e-a436-0a9c14af2457-870e678c", "type": "main", "index": 0}]]}, "51a94f35-4405-4e53-9fa5-91911759802d": {"main": [[{"node": "error-handler-51a94f35-4405-4e53-9fa5-91911759802d", "type": "main", "index": 0}], [{"node": "error-handler-51a94f35-4405-4e53-9fa5-91911759802d-d5ed8599", "type": "main", "index": 0}], [{"node": "error-handler-51a94f35-4405-4e53-9fa5-91911759802d-36f98a7e", "type": "main", "index": 0}], [{"node": "error-handler-51a94f35-4405-4e53-9fa5-91911759802d-69ef2774", "type": "main", "index": 0}], [{"node": "error-handler-51a94f35-4405-4e53-9fa5-91911759802d-6c7344a5", "type": "main", "index": 0}], [{"node": "error-handler-51a94f35-4405-4e53-9fa5-91911759802d-a0c7a91d", "type": "main", "index": 0}], [{"node": "error-handler-51a94f35-4405-4e53-9fa5-91911759802d-1d814f2e", "type": "main", "index": 0}], [{"node": "error-handler-51a94f35-4405-4e53-9fa5-91911759802d-a0555c82", "type": "main", "index": 0}], [{"node": "error-handler-51a94f35-4405-4e53-9fa5-91911759802d-c1503f49", "type": "main", "index": 0}]]}, "26240549-9b41-4b6a-bf24-d61c8ee155ca": {"main": [[{"node": "error-handler-26240549-9b41-4b6a-bf24-d61c8ee155ca", "type": "main", "index": 0}], [{"node": "error-handler-26240549-9b41-4b6a-bf24-d61c8ee155ca-78184ee9", "type": "main", "index": 0}], [{"node": "error-handler-26240549-9b41-4b6a-bf24-d61c8ee155ca-23dcf34b", "type": "main", "index": 0}], [{"node": "error-handler-26240549-9b41-4b6a-bf24-d61c8ee155ca-e639498d", "type": "main", "index": 0}], [{"node": "error-handler-26240549-9b41-4b6a-bf24-d61c8ee155ca-6ba87e6d", "type": "main", "index": 0}], [{"node": "error-handler-26240549-9b41-4b6a-bf24-d61c8ee155ca-25324fdc", "type": "main", "index": 0}], [{"node": "error-handler-26240549-9b41-4b6a-bf24-d61c8ee155ca-27ec7470", "type": "main", "index": 0}], [{"node": "error-handler-26240549-9b41-4b6a-bf24-d61c8ee155ca-1d668275", "type": "main", "index": 0}], [{"node": "error-handler-26240549-9b41-4b6a-bf24-d61c8ee155ca-8b7bb429", "type": "main", "index": 0}]]}, "811480ce-f2c9-4400-b585-1a3609b5bef0": {"main": [[{"node": "error-handler-811480ce-f2c9-4400-b585-1a3609b5bef0-3d2c8aee", "type": "main", "index": 0}]]}}, "description": "Automated workflow: CoinMarketCap_Exchange_and_Community_Agent_Tool. This workflow integrates 7 different services: stickyNote, toolHttpRequest, agent, stopAndError, lmChatOpenAi. It contains 23 nodes and follows best practices for error handling and security.", "notes": "Excellent quality workflow: CoinMarketCap_Exchange_and_Community_Agent_Tool. This workflow has been optimized for production use with comprehensive error handling, security, and documentation."}