|
1420 | 1420 | [ |
1421 | 1421 | { |
1422 | 1422 | "index": 0, |
1423 | | - "node": "Get favourite agents", |
| 1423 | + "node": "Get Enabled Capabilities", |
1424 | 1424 | "type": "main" |
1425 | 1425 | } |
1426 | 1426 | ] |
|
1459 | 1459 | ] |
1460 | 1460 | ] |
1461 | 1461 | }, |
1462 | | - "Get favourite agents": { |
| 1462 | + "Get Enabled Capabilities": { |
1463 | 1463 | "main": [ |
1464 | 1464 | [ |
1465 | 1465 | { |
|
5497 | 5497 | "text": "=Developer mode: {{ $('Get Account1').item.json.isdeveloper }}\n\nXen is logged in as: {{ $('Get Account1').item.json.near_account_id }}\n\nXen balance is: {{ $('Get Account Balance').item.json.formatted.available }} NEAR\n\n{{ $json.agent_ids.length === 0 ? \"No agents are connected to your Xen.\" : \"The following agents are connected to your Xen:\" }}\n{{ $json.agent_ids.map(x => `[${x}](https://app.near.ai/agents/${x}/latest)`).join('\\n') }}" |
5498 | 5498 | }, |
5499 | 5499 | "position": [ |
5500 | | - 3320, |
| 5500 | + 3300, |
5501 | 5501 | -560 |
5502 | 5502 | ], |
5503 | 5503 | "type": "n8n-nodes-base.telegram", |
|
5528 | 5528 | "typeVersion": 1.2, |
5529 | 5529 | "webhookId": "2e7b0d78-b0ad-462f-bac9-509f3556d886" |
5530 | 5530 | }, |
5531 | | - { |
5532 | | - "alwaysOutputData": true, |
5533 | | - "id": "09d3c830-ec0c-4489-a2a2-b6be3f89bd89", |
5534 | | - "name": "Get favourite agents", |
5535 | | - "parameters": { |
5536 | | - "headerParameters": { |
5537 | | - "parameters": [ |
5538 | | - { |
5539 | | - "name": "accept", |
5540 | | - "value": "application/json" |
5541 | | - } |
5542 | | - ] |
5543 | | - }, |
5544 | | - "method": "POST", |
5545 | | - "options": { |
5546 | | - "pagination": { |
5547 | | - "pagination": { |
5548 | | - "parameters": { |
5549 | | - "parameters": [ |
5550 | | - { |
5551 | | - "name": "offset", |
5552 | | - "value": "={{ $pageCount * 20}}" |
5553 | | - } |
5554 | | - ] |
5555 | | - }, |
5556 | | - "requestInterval": 1000 |
5557 | | - } |
5558 | | - } |
5559 | | - }, |
5560 | | - "queryParameters": { |
5561 | | - "parameters": [ |
5562 | | - { |
5563 | | - "name": "total", |
5564 | | - "value": "20" |
5565 | | - }, |
5566 | | - { |
5567 | | - "name": "show_hidden", |
5568 | | - "value": "false" |
5569 | | - }, |
5570 | | - { |
5571 | | - "name": "show_latest_version", |
5572 | | - "value": "true" |
5573 | | - }, |
5574 | | - { |
5575 | | - "name": "starred_by", |
5576 | | - "value": "={{ $('Get Account1').item.json.near_account_id }}" |
5577 | | - } |
5578 | | - ] |
5579 | | - }, |
5580 | | - "sendHeaders": true, |
5581 | | - "sendQuery": true, |
5582 | | - "url": "https://api.near.ai/v1/registry/list_entries" |
5583 | | - }, |
5584 | | - "position": [ |
5585 | | - 2680, |
5586 | | - -560 |
5587 | | - ], |
5588 | | - "type": "n8n-nodes-base.httpRequest", |
5589 | | - "typeVersion": 4.2 |
5590 | | - }, |
5591 | 5531 | { |
5592 | 5532 | "credentials": { |
5593 | 5533 | "telegramApi": { |
|
5627 | 5567 | } |
5628 | 5568 | }, |
5629 | 5569 | "position": [ |
5630 | | - 3100, |
| 5570 | + 3080, |
5631 | 5571 | -560 |
5632 | 5572 | ], |
5633 | 5573 | "type": "n8n-nodes-base.aggregate", |
|
5643 | 5583 | "id": "efd25a3c-b2b2-403a-bd3d-98267d8a72ce", |
5644 | 5584 | "name": "agent_id", |
5645 | 5585 | "type": "string", |
5646 | | - "value": "={{ $json.namespace && $json.name ? `${$json.namespace}/${$json.name}` : null }}" |
| 5586 | + "value": "={{ $json.capability_name ? $json.capability_name : null }}" |
5647 | 5587 | } |
5648 | 5588 | ] |
5649 | 5589 | }, |
5650 | 5590 | "options": { |
5651 | 5591 | } |
5652 | 5592 | }, |
5653 | 5593 | "position": [ |
5654 | | - 2900, |
| 5594 | + 2880, |
5655 | 5595 | -560 |
5656 | 5596 | ], |
5657 | 5597 | "type": "n8n-nodes-base.set", |
|
6636 | 6576 | ], |
6637 | 6577 | "type": "@n8n/n8n-nodes-langchain.toolWorkflow", |
6638 | 6578 | "typeVersion": 2.1 |
| 6579 | + }, |
| 6580 | + { |
| 6581 | + "alwaysOutputData": true, |
| 6582 | + "credentials": { |
| 6583 | + "postgres": { |
| 6584 | + "id": "8ZOLCkWqvhw8gGkU", |
| 6585 | + "name": "Postgres account" |
| 6586 | + } |
| 6587 | + }, |
| 6588 | + "id": "4caf126c-da94-4d46-b044-80eb5e53689f", |
| 6589 | + "name": "Get Enabled Capabilities", |
| 6590 | + "parameters": { |
| 6591 | + "operation": "select", |
| 6592 | + "options": { |
| 6593 | + }, |
| 6594 | + "returnAll": true, |
| 6595 | + "schema": { |
| 6596 | + "__rl": true, |
| 6597 | + "cachedResultName": "default", |
| 6598 | + "mode": "list", |
| 6599 | + "value": "default" |
| 6600 | + }, |
| 6601 | + "table": { |
| 6602 | + "__rl": true, |
| 6603 | + "cachedResultName": "user_capability", |
| 6604 | + "mode": "list", |
| 6605 | + "value": "user_capability" |
| 6606 | + }, |
| 6607 | + "where": { |
| 6608 | + "values": [ |
| 6609 | + { |
| 6610 | + "column": "username", |
| 6611 | + "value": "={{ $('Telegram Trigger').item.json.message.from.username }}" |
| 6612 | + }, |
| 6613 | + { |
| 6614 | + "column": "is_enabled", |
| 6615 | + "value": "true" |
| 6616 | + }, |
| 6617 | + { |
| 6618 | + "column": "is_deleted", |
| 6619 | + "value": "false" |
| 6620 | + } |
| 6621 | + ] |
| 6622 | + } |
| 6623 | + }, |
| 6624 | + "position": [ |
| 6625 | + 2680, |
| 6626 | + -560 |
| 6627 | + ], |
| 6628 | + "type": "n8n-nodes-base.postgres", |
| 6629 | + "typeVersion": 2.6 |
6639 | 6630 | } |
6640 | 6631 | ], |
6641 | 6632 | "pinData": { |
|
6649 | 6640 | "tags": [ |
6650 | 6641 | ], |
6651 | 6642 | "triggerCount": 1, |
6652 | | - "updatedAt": "2025-04-23T06:39:28.000Z", |
6653 | | - "versionId": "4586a0ff-90ce-4fa2-926f-7bf4941b8b77" |
| 6643 | + "updatedAt": "2025-04-24T15:48:34.000Z", |
| 6644 | + "versionId": "0070c787-87ff-4d07-b290-23e66405f285" |
6654 | 6645 | }, |
6655 | 6646 | { |
6656 | 6647 | "active": false, |
|
0 commit comments