It is essential for me - and others as I’ve seen in related requests - to be able to populate a form trigger dropdown list dynamically. So far no reasonable solution has been provided. In my case as Google Sheet will be continually updated and we want to AI chat with the spreadsheet, similar to this example which is not at all helpful if you don’t know the entries beforehand. A dynamic dropdown list would solve that and then some. I have made a simplified attempt based off the unwieldy solution offered here but I receive a 404 error for “resource not found”. How can I solve this? Thank you
What is the error message (if any)?
{
"errorMessage": "The resource you are requesting could not be found",
"errorDetails": {
"rawErrorMessage": [
"404 - \"<!DOCTYPE html>\\n<html lang=\\\"en\\\">\\n<head>\\n<meta charset=\\\"utf-8\\\">\\n<title>Error</title>\\n</head>\\n<body>\\n<pre>Cannot PUT /workflow/jfmBky3uGq3l58eQ</pre>\\n</body>\\n</html>\\n\""
],
"httpCode": "404"
},
"n8nDetails": {
"nodeName": "HTTP Request",
"nodeType": "n8n-nodes-base.httpRequest",
"nodeVersion": 4.1,
"itemIndex": 0,
"time": "6/19/2024, 12:04:42 PM",
"n8nVersion": "1.37.3 (Self Hosted)",
"binaryDataMode": "default",
"stackTrace": [
"NodeApiError: The resource you are requesting could not be found",
" at Object.execute (C:\\Users\\sherm\\AppData\\Roaming\\npm\\node_modules\\n8n\\node_modules\\n8n-nodes-base\\nodes\\HttpRequest\\V3\\HttpRequestV3.node.ts:1778:20)",
" at processTicksAndRejections (node:internal/process/task_queues:95:5)",
" at Workflow.runNode (C:\\Users\\sherm\\AppData\\Roaming\\npm\\node_modules\\n8n\\node_modules\\n8n-workflow\\src\\Workflow.ts:1378:8)",
" at C:\\Users\\sherm\\AppData\\Roaming\\npm\\node_modules\\n8n\\node_modules\\n8n-core\\src\\WorkflowExecute.ts:1050:29",
" at C:\\Users\\sherm\\AppData\\Roaming\\npm\\node_modules\\n8n\\node_modules\\n8n-core\\src\\WorkflowExecute.ts:1726:11"
]
}
}
Hello, thanks for the reply. I’ve set the auth and path, but still same error. Would you mind pasting the json that should work, so I can see if I’m correctly applying your solution? Also, to implement this I had to copy and paste the object manually to obtain its workflow json. Is there not a way to obtain the workflow json of an object programatically via some method? II do not see it in the listed built-in methods/variables - but hopefully it can be done.
Hi, thanks for that. I’ve crudely adapted it towards my needs, and the workflow runs without error. However, the form does not actually update. Any idea why?
Actually, it’s not a good idea to update the flow inside the same flow. Any change that is made by you and saved after you have clicked on the “Save” button will override the workflow updated via the API. It should be updated when you have started it, but you have to refresh the page every time it is updated. It won’t be refreshed automatically
I thought something like that might be at play. Actually, what is happened is that I never activated the workflow - I just tested it. Once I activated it, now it is behaving as expected, and with the problem you just mentioned. Here’s a hack where I submit the test form and redirect it to the updated production form and resubmit it. This hack prevents the test form from being updated. It would be nice if this hack was actually a feature.
The reason is that it will help with n8n’s LangChain workflows (and plenty more). These being static at the moment makes it difficult to grapple with the agents and their idiosyncracies/errors. This is a basic example https://n8n.io/workflows/2085-chat-with-a-google-sheet-using-ai/. The user must chat with the AI agent about a spreadsheet without knowing what is in the spreadsheet. The agent must consume the entire spreadsheet and infer what the user is trying to find out and where it is. Tasks and prompts are hard-coded all over the place in the workflow. It’s not user-friendly and I can’t imagine actually delivering something like this.
Off the top of my head, I am looking for the test/production urls to be permanent/initial states with option of entering a dynamic temporary state depending on the data called up. I understand n8n is at core about automation which is typically fairly static, but LLMs are not. Dynamic forms could be one way of increasing the leverage n8n has over LLMs. Is something like this doable, or part of the game plan?