Hi. My team is using N8N (self-hosted, not enterprise).
I have two N8N instances—one for development and one for production—each deployed in separate environments.
Steps:
-
Development Environment (Example: https://n8n.dev.com)
- I create a workflow with the following details:
ID:"JirYUFuG......"
Name:"Temp1"
- Within the
"Temp1"
workflow, it executes (calls) another workflow:
ID:"M1p92XJGv......"
Name:"Temp2"
- I create a workflow with the following details:
-
Production Environment (Example: https://n8n.prod.com)
- I copy the
"Temp1"
and"Temp2"
workflows from the development environment to production. - However, when I execute
"Temp1"
in production, I receive an error stating that"Temp2"
(ID:"M1p92XJGv......"
) does not exist.
- I copy the
Debugging Findings:
- I discovered that when copying
"Temp1"
and"Temp2"
to production, their workflow IDs change. - When
"Temp1"
is executed in production, it attempts to call the sub-workflow"M1p92XJGv......"
, but since that specific ID does not exist in the production environment, an error occurs. - I tried manually creating a
"Temp2"
workflow in production using the same ID from the development environment, but N8N does not allow workflows to be created with predefined IDs.
Question:
If I have a workflow containing 100 sub-workflows, it is impractical to manually copy 100 JSON files for each sub-workflow to the production environment and then replace every single ID in the main workflow. What can I do to deploy from development to production quickly, conveniently, and accurately?