Describe the problem/error/question
When I try to run this and the website it down it send me the request via discords and I hit accept. It’s then supposed to send Accept and the ClientID back to the agent, which it does HOWEVER, the agent doesn’t accept the 2nd input from edit fields1, It takes the first prompt that was sent in and just continuously spams discord with the accept messages.
What is the error message (if any)?
no errors reported
Please share your workflow
(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)
Share the output returned by the last node
{
“nodes”: [
{
“parameters”: {},
“type”: “n8n-nodes-base.manualTrigger”,
“typeVersion”: 1,
“position”: [
-112,
96
],
“id”: “7fe76fea-7298-4326-909f-cc36879aec16”,
“name”: “When clicking ‘Execute workflow’”
},
{
“parameters”: {
“url”: “http://10.0.0.15:8090/”,
“options”: {}
},
“type”: “n8n-nodes-base.httpRequestTool”,
“typeVersion”: 4.3,
“position”: [
368,
200
],
“id”: “f9f381e3-5c4e-4512-a4f2-ef5b7a1b2c2e”,
“name”: “Visit Website”
},
{
“parameters”: {
“model”: {
“__rl”: true,
“value”: “gpt-5-nano”,
“mode”: “list”,
“cachedResultName”: “gpt-5-nano”
},
“options”: {}
},
“type”: “@n8n/n8n-nodes-langchain.lmChatOpenAi”,
“typeVersion”: 1.2,
“position”: [
112,
200
],
“id”: “a1b9a284-8317-4d39-90c4-4a38d984c591”,
“name”: “OpenAI Chat Model”,
“credentials”: {
“openAiApi”: {
“id”: “KEA4EzgvHjpxgqKl”,
“name”: “OpenAi account”
}
}
},
{
“parameters”: {
“promptType”: “define”,
“text”: “={{ $json.prompt }}”,
“hasOutputParser”: true,
“options”: {
“systemMessage”: “=You are Nia, a new IT Administrator for Unix4u. Your sole responsibility is to ensure the website at http://10.0.0.15:8090/ is operational.\n\nCRITICAL PERMISSION RULES:\n- You MUST request EXPLICIT APPROVAL before running ANY command that could modify the system\n- This includes but is not limited to: docker start, docker stop, docker run, docker rm, kill, pkill, systemctl, or any command that creates, modifies, or deletes files\n- Even diagnostic commands like docker ps, netstat, or ps are fine without permission\n- When in doubt, ASK FIRST\n\nYou are a Docker expert. You know everything about Docker and common issues that prevent containers from running properly. In our environment, we have a web server that should be running inside a Docker container called "website" on port 8090.\n\nWhen asked if the website is up, follow these systematic troubleshooting steps:\n\n1. First, check if the website is accessible using the HTTP tool\n\n2. The website is operational ONLY if it returns HTML containing:
Unix4u rocks
\n\n3. If the website is down, investigate systematically:\n - Check if the container exists and its current state\n - Check what’s currently using port 8090 (could be another process)\n - Look for any error messages or logs\n - Identify the root cause before attempting any fix\n\n4. Once you’ve identified the issue, explain what you found and request permission for the specific fix needed\n\n5. Only after receiving explicit approval, apply the necessary fix to restore the website\n\nRemember: Always investigate thoroughly before proposing solutions. Something else might be using the port.\n\nREQUIRED OUTPUT FORMAT:\nYou MUST always respond with a JSON object in this exact format:\n{\n "website_up": true/false,\n "message": "Detailed explanation of status and any actions taken",\n "applied_fix": true/false,\n "needs_approval": true/false,\n "commands_requested": "Specific commands needing approval (null if none)"\n}”}
},
“type”: “@n8n/n8n-nodes-langchain.agent”,
“typeVersion”: 2.2,
“position”: [
296,
-24
],
“id”: “0fcd1361-8ac4-42df-bdf3-55484c948770”,
“name”: “AI Agent”
},
{
“parameters”: {
“sessionIdType”: “customKey”,
“sessionKey”: “={{ $json.chatid }}”
},
“type”: “@n8n/n8n-nodes-langchain.memoryBufferWindow”,
“typeVersion”: 1.3,
“position”: [
240,
200
],
“id”: “41f9a9e5-52b8-4478-9417-952bc7715ff5”,
“name”: “Simple Memory”
},
{
“parameters”: {
“rule”: {
“interval”: [
{
“field”: “minutes”
}
]
}
},
“type”: “n8n-nodes-base.scheduleTrigger”,
“typeVersion”: 1.2,
“position”: [
-336,
-96
],
“id”: “f9001737-c227-4fc9-a855-b306f6919c9e”,
“name”: “Schedule Trigger”
},
{
“parameters”: {
“assignments”: {
“assignments”: [
{
“id”: “1e27047e-5f08-4aed-a799-d3616a89e318”,
“name”: “prompt”,
“value”: “Monitor this website http://10.0.0.15:8090 if it’s down fix it”,
“type”: “string”
},
{
“id”: “4cb508c9-23e4-4247-bf0f-6348afd67843”,
“name”: “chatid”,
“value”: “Mia12345”,
“type”: “string”
}
]
},
“options”: {}
},
“type”: “n8n-nodes-base.set”,
“typeVersion”: 3.4,
“position”: [
-112,
-96
],
“id”: “6ec4d047-10ff-4388-9ac0-02b472d20816”,
“name”: “Edit Fields”
},
{
“parameters”: {
“authentication”: “webhook”,
“content”: “=Website up: {{ $json.output[‘website up’] }}\n\nMessage: {{ $json.output.message }}\n”,
“options”: {}
},
“type”: “n8n-nodes-base.discord”,
“typeVersion”: 2,
“position”: [
1280,
96
],
“id”: “92cb5ea7-99fd-413a-a572-11b312abc515”,
“name”: “Discord”,
“webhookId”: “fc95a855-a28c-4eea-b4bc-3b51c9c49e24”,
“credentials”: {
“discordWebhookApi”: {
“id”: “tpAOGktgjIAZ4I5l”,
“name”: “Discord Webhook account”
}
}
},
{
“parameters”: {
“jsonSchemaExample”: “{\n "website_up": true,\n "message": "Detailed explanation of status and any actions taken",\n "applied_fix": true,\n "needs_approval": true,\n "commands_requested": "Specific commands needing approval (null if none)"\n}”
},
“type”: “@n8n/n8n-nodes-langchain.outputParserStructured”,
“typeVersion”: 1.3,
“position”: [
624,
200
],
“id”: “9fd677c5-84ac-414e-8304-0ea0a76ad3df”,
“name”: “Structured Output Parser”
},
{
“parameters”: {
“conditions”: {
“options”: {
“caseSensitive”: true,
“leftValue”: “”,
“typeValidation”: “strict”,
“version”: 2
},
“conditions”: [
{
“id”: “eb70966b-87bb-4655-b141-002487a626a0”,
“leftValue”: “={{ $json.output[‘website up’] }}”,
“rightValue”: “false”,
“operator”: {
“type”: “boolean”,
“operation”: “true”,
“singleValue”: true
}
}
],
“combinator”: “and”
},
“options”: {}
},
“type”: “n8n-nodes-base.if”,
“typeVersion”: 2.2,
“position”: [
1056,
96
],
“id”: “bf23407a-c9ac-474e-9505-640d92708203”,
“name”: “If”
},
{
“parameters”: {
“workflowId”: {
“__rl”: true,
“value”: “GRBtapKbNwq9jIZB”,
“mode”: “list”,
“cachedResultUrl”: “/workflow/GRBtapKbNwq9jIZB”,
“cachedResultName”: “SSH_n8n_server”
},
“workflowInputs”: {
“mappingMode”: “defineBelow”,
“value”: {
“command”: “={{ /n8n-auto-generated-fromAI-override/ $fromAI(‘command’, ``, ‘string’) }}”
},
“matchingColumns”: [
“command”
],
“schema”: [
{
“id”: “command”,
“displayName”: “command”,
“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”: [
496,
200
],
“id”: “351700a3-20ec-4ab0-a74d-94d51ae79c3b”,
“name”: “CLI Tool”
},
{
“parameters”: {
“conditions”: {
“options”: {
“caseSensitive”: true,
“leftValue”: “”,
“typeValidation”: “strict”,
“version”: 2
},
“conditions”: [
{
“id”: “82870455-03c2-4b05-b8ba-06dbde3d84d8”,
“leftValue”: “={{ $json.output.needs_approval }}”,
“rightValue”: “”,
“operator”: {
“type”: “boolean”,
“operation”: “true”,
“singleValue”: true
}
}
],
“combinator”: “and”
},
“options”: {}
},
“type”: “n8n-nodes-base.if”,
“typeVersion”: 2.2,
“position”: [
832,
-96
],
“id”: “704b2620-b6e6-476b-ab03-38af1eb1197d”,
“name”: “If2”
},
{
“parameters”: {
“resource”: “message”,
“operation”: “sendAndWait”,
“guildId”: {
“__rl”: true,
“value”: “1433210173144698880”,
“mode”: “id”
},
“channelId”: {
“__rl”: true,
“value”: “1433686506991517848”,
“mode”: “list”,
“cachedResultName”: “network-status”,
“cachedResultUrl”: “Discord”
},
“message”: “=WEBSITE UP: {{ $json.output.website_up }}\nNeeds Approval: {{ $json.output.needs_approval }}\n\nCOMMANDS REQUESTED: {{ $json.output.commands_requested }}”,
“options”: {}
},
“type”: “n8n-nodes-base.discord”,
“typeVersion”: 2,
“position”: [
1056,
-96
],
“id”: “7dd3f22c-eea3-47be-ba09-825fbc2cbe5e”,
“name”: “Send a Message”,
“webhookId”: “908eafd2-f087-4956-8b3d-1e7fdcb8751e”,
“credentials”: {
“discordBotApi”: {
“id”: “c9eaC4sboBVL7iuc”,
“name”: “Discord Mia”
}
}
},
{
“parameters”: {
“assignments”: {
“assignments”: [
{
“id”: “16f6c559-d424-4ba3-9ada-599784988442”,
“name”: “prompt”,
“value”: “={{ $json.data.approved }}”,
“type”: “string”
},
{
“id”: “dd575cc0-d633-410c-93b5-6bed7dc6fcb2”,
“name”: “chatid”,
“value”: “={{ $(‘Edit Fields’).item.json.chatid }}”,
“type”: “string”
}
]
},
“options”: {}
},
“type”: “n8n-nodes-base.set”,
“typeVersion”: 3.4,
“position”: [
1280,
-96
],
“id”: “faeab1d8-6849-4acc-ae68-1106bb494d00”,
“name”: “Edit Fields1”
}
],
“connections”: {
“When clicking ‘Execute workflow’”: {
“main”: [
[
{
“node”: “AI Agent”,
“type”: “main”,
“index”: 0
}
]
]
},
“Visit Website”: {
“ai_tool”: [
[
{
“node”: “AI Agent”,
“type”: “ai_tool”,
“index”: 0
}
]
]
},
“OpenAI Chat Model”: {
“ai_languageModel”: [
[
{
“node”: “AI Agent”,
“type”: “ai_languageModel”,
“index”: 0
}
]
]
},
“AI Agent”: {
“main”: [
[
{
“node”: “If2”,
“type”: “main”,
“index”: 0
}
]
]
},
“Simple Memory”: {
“ai_memory”: [
[
{
“node”: “AI Agent”,
“type”: “ai_memory”,
“index”: 0
}
]
]
},
“Schedule Trigger”: {
“main”: [
[
{
“node”: “Edit Fields”,
“type”: “main”,
“index”: 0
}
]
]
},
“Edit Fields”: {
“main”: [
[
{
“node”: “AI Agent”,
“type”: “main”,
“index”: 0
}
]
]
},
“Structured Output Parser”: {
“ai_outputParser”: [
[
{
“node”: “AI Agent”,
“type”: “ai_outputParser”,
“index”: 0
}
]
]
},
“If”: {
“main”: [
,
[
{
“node”: “Discord”,
“type”: “main”,
“index”: 0
}
]
]
},
“CLI Tool”: {
“ai_tool”: [
[
{
“node”: “AI Agent”,
“type”: “ai_tool”,
“index”: 0
}
]
]
},
“If2”: {
“main”: [
[
{
“node”: “Send a Message”,
“type”: “main”,
“index”: 0
}
],
[
{
“node”: “If”,
“type”: “main”,
“index”: 0
}
]
]
},
“Send a Message”: {
“main”: [
[
{
“node”: “Edit Fields1”,
“type”: “main”,
“index”: 0
}
]
]
},
“Edit Fields1”: {
“main”: [
[
{
“node”: “AI Agent”,
“type”: “main”,
“index”: 0
}
]
]
}
},
“pinData”: {
“Edit Fields1”: [
{
“prompt”: “true”,
“chatid”: “Mia12345”
}
]
},
“meta”: {
“templateCredsSetupCompleted”: true,
“instanceId”: “9992bc833cb1ab38ebd95d00167b9439a6972c99420ad276b3bf893cdd569fd7”
}
}
Information on your n8n setup
- n8n version:
1.117.3 - Database (default: SQLite): postgressql
- n8n EXECUTIONS_PROCESS setting (default: own, main): click the execute butoon
- Running n8n via (Docker, npm, n8n cloud, desktop app): npm
- Operating system: Ubuntu 22.04 running in Hyper-V
I’m still following network chucks page at https://www.youtube.com/watch?v=budTmdQfXYU&t=270s