Hola a todos,
Tengo un problema general con n8n self-hosted y workflows importados desde JSON.
No me pasa solo con Slack. Me pasa con varias integraciones:
- Slack
- Airtable
- Notion
- Shopify
- OpenAI
- Gemini
- OpenRouter
- Google Drive
- Gmail
- otras credenciales similares
Contexto:
- Las credenciales están creadas en n8n.
- Las credenciales prueban conexión correctamente.
- Están creadas en el mismo entorno de n8n.
- Los tokens/API keys funcionan.
- Pero cuando abro un nodo dentro de un workflow importado desde JSON, el desplegable de credenciales aparece vacío o como “No credentials yet”.
- Recargar el navegador no lo arregla.
- Borrar caché tampoco lo arregla.
- El problema ocurre con nodos importados, no solo con un nodo concreto.
Lo raro:
Si dentro del propio nodo pulso “Set up credential” y creo una credencial nueva desde ahí, entonces el nodo empieza a reconocer credenciales y funciona.
La solución temporal que estamos usando es:
- Crear una credencial nueva/falsa desde el propio nodo.
- Entonces n8n ya permite escoger una credencial.
- Seleccionar o recrear la credencial correcta.
- Después borrar la credencial temporal.
Pero esto no es práctico, porque habría que hacerlo en muchos nodos y muchas integraciones.
Pregunta principal:
¿Cómo se arregla correctamente este problema?
Preguntas concretas:
- ¿Es un problema de ownership/contexto de usuario/proyecto en n8n?
- ¿Las credenciales creadas desde la pantalla Credentials no están disponibles para workflows importados por algún motivo?
- ¿Hay alguna forma de reasignar o re-vincular credenciales existentes a workflows importados sin recrearlas nodo por nodo?
- ¿Existe algún comando CLI o método recomendado para importar workflows y mantener o reasignar credenciales?
- ¿Es necesario que workflow y credencial pertenezcan exactamente al mismo usuario/proyecto?
- ¿Puede arreglarse desde n8n UI, base de datos, CLI o API?
- ¿Puede n8n MCP / Claude Code asignar credenciales existentes a nodos importados, o por seguridad debe hacerse manualmente?
Entorno:
- n8n self-hosted
- Workflows importados desde JSON
- Credenciales creadas en n8n
- Las credenciales testean correctamente
- El problema afecta a varias apps, no solo Slack
- Crear la credencial desde el propio nodo sí funciona
Necesito saber cuál es la forma correcta de solucionarlo de manera global, no nodo por nodo.
Gracias.
Information on your n8n setup
- n8n version:
- Database (default: SQLite):
- n8n EXECUTIONS_PROCESS setting (default: own, main):
- Running n8n via (Docker, npm, n8n cloud, desktop app):
- Operating system:
Welcome @miki007 to our community! I’m Jay and I am a n8n verified creator.
This is expected behavior - when you import a workflow JSON, the credential IDs inside the JSON won’t match the IDs on your instance, so nodes show empty dropdowns. The cleanest fix: after importing, use the “Credential” dropdown in each affected node - since your credentials are already created and tested, they should appear in the list, just not pre-selected. Select the right credential and save. If you’re importing many workflows, n8n CLI has an n8n import:workflow command that can help with bulk operations, though manual re-mapping is still needed for credentials unless you’re migrating between identical instances using n8n export:credentials + n8n import:credentials.
Thanks for the answer. I understand that imported workflow JSON files keep credential IDs/names from the original instance and that these IDs won’t match my instance automatically.
However, my issue is a bit different: the problem is not only that credentials are not pre-selected. In many imported nodes, the credential dropdown is completely empty or shows “No credentials yet”, even though the credentials already exist in the same n8n instance and test successfully.
If I create a new credential from inside that same node using “Set up credential”, then the node starts recognizing credentials. That makes me think it may be related to one of these:
-
the imported workflow and the existing credentials belong to different users/projects/spaces;
-
the imported node expects a different credential type than the credential I created from the Credentials screen;
-
the workflow was imported into the wrong user/project context.
So my follow-up question is:
What is the recommended way to globally fix this?
Should I import workflows with n8n import:workflow --projectId or --userId so they land in the same context as the credentials?
Is there a supported way to reassign existing credentials to imported workflows in bulk, or is manual remapping/recreating nodes required?
I’m trying to avoid creating temporary credentials node by node across many workflows.
Your diagnosis is right - option 1 is almost certainly the cause. The --projectId and --userId flags in n8n import:workflow control which project/user owns the workflow, but they don’t remap credential IDs inside the workflow JSON. There’s no built-in bulk credential reassignment. The cleanest approach for bulk imports is to export your credentials from the source instance with n8n export:credentials --all, import them to the new instance with n8n import:credentials, and then import the workflows - since the credential IDs will match, nodes won’t show empty dropdowns. If you’re starting fresh without the source credentials, the fastest workaround is still the “Set up credential” trick you already found, since it forces the node to register with a valid ID on your instance.