{ "createdAt": "2025-09-08T10:32:07.628Z", "updatedAt": "2025-09-08T10:32:07.628Z", "name": "Tools: One invocation per item", "id": "266", "active": false, "nodes": [ { "parameters": { "workflowInputs": { "values": [ { "name": "query" } ] } }, "type": "n8n-nodes-base.executeWorkflowTrigger", "typeVersion": 1.1, "position": [-560, -288], "id": "9e3e729b-16a8-4ff2-af41-ad86c44daf89", "name": "When Executed by Another Workflow" }, { "parameters": { "resource": "all", "limit": 1, "additionalFields": { "keyword": "={{ $json.query }}" } }, "type": "n8n-nodes-base.hackerNews", "typeVersion": 1, "position": [-352, -288], "id": "8d01727b-50bd-4990-807b-91c8dd3942ad", "name": "Hacker News2" }, { "parameters": { "promptType": "define", "text": "=Search HackerNews for {{ $json.name }}", "options": {} }, "type": "@n8n/n8n-nodes-langchain.agent", "typeVersion": 2.2, "position": [-496, 128], "id": "fe09dba9-ffe7-40cd-87f9-1eafeceae041", "name": "AI Agent" }, { "parameters": { "model": { "__rl": true, "value": "gpt-4.1-nano", "mode": "list", "cachedResultName": "gpt-4.1-nano" }, "options": {} }, "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi", "typeVersion": 1.2, "position": [-544, 304], "id": "4e97ae72-f736-433d-bd30-9328d36090f8", "name": "OpenAI Chat Model", "credentials": { "openAiApi": { "id": "Zak03cqeLUOsgkFI", "name": "OpenAi account" } } }, { "parameters": { "resource": "all", "limit": 1, "additionalFields": { "keyword": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Keyword', ``, 'string') }}" } }, "type": "n8n-nodes-base.hackerNewsTool", "typeVersion": 1, "position": [-272, 304], "id": "e6fd0d73-86fc-4d4d-addb-dca24a56ac75", "name": "Hacker News" }, { "parameters": { "content": "## Node as Tool, one invocation per item\n", "height": 240, "width": 560 }, "type": "n8n-nodes-base.stickyNote", "position": [-544, 16], "typeVersion": 1, "id": "797104a9-9e7a-4805-bbf6-92fd4d741e8f", "name": "Sticky Note" }, { "parameters": { "promptType": "define", "text": "=Search HackerNews for {{ $json.name }}", "options": {} }, "type": "@n8n/n8n-nodes-langchain.agent", "typeVersion": 2.2, "position": [-528, 704], "id": "d61ee92e-46a0-4b5a-ba9c-41963424bb58", "name": "AI Agent2" }, { "parameters": { "model": { "__rl": true, "value": "gpt-4.1-nano", "mode": "list", "cachedResultName": "gpt-4.1-nano" }, "options": {} }, "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi", "typeVersion": 1.2, "position": [-576, 880], "id": "2d810ae4-f72a-4f46-a1a9-5b5f7a8678c2", "name": "OpenAI Chat Model2", "credentials": { "openAiApi": { "id": "Zak03cqeLUOsgkFI", "name": "OpenAi account" } } }, { "parameters": { "content": "## Workflow Tool, one invocation per item\n", "height": 240, "width": 660 }, "type": "n8n-nodes-base.stickyNote", "position": [-576, 592], "typeVersion": 1, "id": "21d03b34-8597-4c95-b207-1cd5df938f1c", "name": "Sticky Note2" }, { "parameters": { "description": "Call this tool to search Hacker News", "workflowId": { "__rl": true, "value": "={{ $workflow.id }}", "mode": "id" }, "workflowInputs": { "mappingMode": "defineBelow", "value": { "query": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('query', ``, 'string') }}" }, "matchingColumns": ["query"], "schema": [ { "id": "query", "displayName": "query", "required": false, "defaultMatch": false, "display": true, "canBeUsedToMatch": true, "type": "string", "removed": false } ], "attemptToConvertTypes": false, "convertFieldsToString": false } }, "type": "@n8n/n8n-nodes-langchain.toolWorkflow", "typeVersion": 2.2, "position": [-352, 880], "id": "df0a6e96-737b-43ee-a85f-8071c42d0e09", "name": "Call n8n Workflow Tool" }, { "parameters": { "jsCode": "const result = [\n 'n8n',\n 'make',\n 'zappier',\n 'workato'\n].map(i => ({ json: {name: i}}))\n\nreturn result;" }, "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [-1008, 464], "id": "cd5ec001-3dd5-4e32-b30c-37bf1e43edfc", "name": "Code1" }, { "parameters": {}, "type": "n8n-nodes-base.manualTrigger", "typeVersion": 1, "position": [-1200, 464], "id": "c0b4f2dd-e778-4afc-8ebc-14c759d4f238", "name": "When clicking ‘Test workflow’" } ], "pinData": {}, "connections": { "When Executed by Another Workflow": { "main": [ [ { "node": "Hacker News2", "type": "main", "index": 0 } ] ] }, "OpenAI Chat Model": { "ai_languageModel": [ [ { "node": "AI Agent", "type": "ai_languageModel", "index": 0 } ] ] }, "Hacker News": { "ai_tool": [ [ { "node": "AI Agent", "type": "ai_tool", "index": 0 } ] ] }, "OpenAI Chat Model2": { "ai_languageModel": [ [ { "node": "AI Agent2", "type": "ai_languageModel", "index": 0 } ] ] }, "Call n8n Workflow Tool": { "ai_tool": [ [ { "node": "AI Agent2", "type": "ai_tool", "index": 0 } ] ] }, "Code1": { "main": [ [ { "node": "AI Agent", "type": "main", "index": 0 }, { "node": "AI Agent2", "type": "main", "index": 0 } ] ] }, "When clicking ‘Test workflow’": { "main": [ [ { "node": "Code1", "type": "main", "index": 0 } ] ] } }, "settings": {}, "versionId": null, "meta": null, "tags": [] }