Skip to content

Commit 64f8d49

Browse files
committed
feat(n8n): update Near AI agents source in dept workflow
1 parent c59231f commit 64f8d49

File tree

1 file changed

+35
-76
lines changed

1 file changed

+35
-76
lines changed

n8n/workflows.json

Lines changed: 35 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -6712,7 +6712,7 @@
67126712
]
67136713
]
67146714
},
6715-
"Get favourite agents": {
6715+
"Get Enabled Capabilities": {
67166716
"main": [
67176717
[
67186718
{
@@ -6728,7 +6728,7 @@
67286728
[
67296729
{
67306730
"index": 0,
6731-
"node": "Get favourite agents",
6731+
"node": "Get Enabled Capabilities",
67326732
"type": "main"
67336733
}
67346734
],
@@ -6804,65 +6804,6 @@
68046804
},
68056805
"name": "Nearai",
68066806
"nodes": [
6807-
{
6808-
"id": "8a9621e5-a1f6-4e97-aaa1-839583589b90",
6809-
"name": "Get favourite agents",
6810-
"parameters": {
6811-
"headerParameters": {
6812-
"parameters": [
6813-
{
6814-
"name": "accept",
6815-
"value": "application/json"
6816-
}
6817-
]
6818-
},
6819-
"method": "POST",
6820-
"options": {
6821-
"pagination": {
6822-
"pagination": {
6823-
"parameters": {
6824-
"parameters": [
6825-
{
6826-
"name": "offset",
6827-
"value": "={{ $pageCount * 20}}"
6828-
}
6829-
]
6830-
},
6831-
"requestInterval": 1000
6832-
}
6833-
}
6834-
},
6835-
"queryParameters": {
6836-
"parameters": [
6837-
{
6838-
"name": "total",
6839-
"value": "20"
6840-
},
6841-
{
6842-
"name": "show_hidden",
6843-
"value": "false"
6844-
},
6845-
{
6846-
"name": "show_latest_version",
6847-
"value": "true"
6848-
},
6849-
{
6850-
"name": "starred_by",
6851-
"value": "={{ $json.near_account_id }}"
6852-
}
6853-
]
6854-
},
6855-
"sendHeaders": true,
6856-
"sendQuery": true,
6857-
"url": "https://api.near.ai/v1/registry/list_entries"
6858-
},
6859-
"position": [
6860-
1420,
6861-
-40
6862-
],
6863-
"type": "n8n-nodes-base.httpRequest",
6864-
"typeVersion": 4.2
6865-
},
68666807
{
68676808
"id": "6ecde618-0bd1-46fc-9fd2-9915990560f1",
68686809
"name": "Aggregate",
@@ -6964,7 +6905,7 @@
69646905
}
69656906
]
69666907
},
6967-
"jsonBody": "={\n \"agent_id\": \"{{ $json.agent_id }}\",\n \"new_message\": {{ $json.query.toJsonString() }},\n \"max_iterations\": \"1\"\n}",
6908+
"jsonBody": "={\n \"agent_id\": \"{{ $json.agent_id }}/latest\",\n \"new_message\": {{ $json.query.toJsonString() }},\n \"max_iterations\": \"1\"\n}",
69686909
"method": "POST",
69696910
"options": {
69706911
"response": {
@@ -7098,25 +7039,19 @@
70987039
"id": "6c45176b-c40e-4944-af38-7321ce59f7dd",
70997040
"name": "agent_id",
71007041
"type": "string",
7101-
"value": "={{ $json.namespace }}/{{ $json.name }}/{{ $json.version }}"
7102-
},
7103-
{
7104-
"id": "f3f626c2-3863-47af-a933-440629d58c0d",
7105-
"name": "description",
7106-
"type": "string",
7107-
"value": "={{ $json.description }}"
7042+
"value": "={{ $json.capability_name }}"
71087043
},
71097044
{
71107045
"id": "ce866fd8-3d9f-460f-96e3-e882c61e2965",
7111-
"name": "welcome_title",
7046+
"name": "title",
71127047
"type": "string",
7113-
"value": "={{ $json.details.agent.welcome.title }}"
7048+
"value": "={{ $json.title }}"
71147049
},
71157050
{
7116-
"id": "2e4aba58-ca7d-4652-b6ab-2fa4d9ea28b0",
7117-
"name": "welcome_description",
7051+
"id": "f3f626c2-3863-47af-a933-440629d58c0d",
7052+
"name": "description",
71187053
"type": "string",
7119-
"value": "={{ $json.details.agent.welcome.description }}"
7054+
"value": "={{ $json.description }}"
71207055
}
71217056
]
71227057
},
@@ -7242,6 +7177,30 @@
72427177
],
72437178
"type": "n8n-nodes-base.stopAndError",
72447179
"typeVersion": 1
7180+
},
7181+
{
7182+
"alwaysOutputData": true,
7183+
"credentials": {
7184+
"postgres": {
7185+
"id": "8ZOLCkWqvhw8gGkU",
7186+
"name": "Postgres account"
7187+
}
7188+
},
7189+
"id": "c60746f4-6444-4c52-9368-a39f5a905a86",
7190+
"name": "Get Enabled Capabilities",
7191+
"parameters": {
7192+
"operation": "executeQuery",
7193+
"options": {
7194+
"queryReplacement": "={{ $json.username }}"
7195+
},
7196+
"query": "select *\nfrom \"default\".user_capability as uc\njoin \"default\".capability as c on c.domain = uc.capability_domain and c.name = uc.capability_name\nwhere uc.username = $1\n and is_deleted = false\n and is_enabled = true\norder by uc.capability_domain asc, uc.capability_name asc"
7197+
},
7198+
"position": [
7199+
1420,
7200+
-40
7201+
],
7202+
"type": "n8n-nodes-base.postgres",
7203+
"typeVersion": 2.6
72457204
}
72467205
],
72477206
"pinData": {
@@ -7255,8 +7214,8 @@
72557214
"tags": [
72567215
],
72577216
"triggerCount": 0,
7258-
"updatedAt": "2025-04-23T06:45:42.000Z",
7259-
"versionId": "cca0f0bd-3b89-4c69-bb3f-2ce08fe3460a"
7217+
"updatedAt": "2025-04-24T15:55:52.000Z",
7218+
"versionId": "a2a61705-bbf3-4762-adbf-07a42f2fc798"
72607219
},
72617220
{
72627221
"active": false,

0 commit comments

Comments
 (0)