For background, we are rendering n8n in a window as an iframe.
So, I wrote some logic to automatically create a new workflow or redirect them to an existing one if it matches a specific key in the query params.
Not an error message, but the behavior is weird, if it’s going to create a new workflow, I made it create it using the saveAsNewWorkflow function, then I call saveCurrentWorkflow using that new name from the query params, then dispatch(settings/fetchPromptsData).
However, this sometimes cause the final redirect to have a start node with node + button, meaning I’m not able to add any new nodes. This is only fixed if I close the iframe and open it again so that instead of creating it redirects to that workflow, then this works fine.
Here’s a picture of the logic.
(Select the nodes and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow respectively)
- n8n version: - 0.184.0
- Database you’re using (default: SQLite): - default
- Running n8n with the execution process [own(default), main]: - default
- Running n8n via [Docker, npm, n8n.cloud, desktop app]: - npm