Hallo zusammen,
Ich habe ein grundsätzliches Problem mit n8n self-hosted und Workflows, die aus JSON importiert werden.
Es passiert nicht nur bei Slack. Es passiert bei mehreren Integrationen:
- Slack
- Airtable
- Notion
- Shopify
- OpenAI
- Gemini
- OpenRouter
- Google Drive
- Gmail
- andere ähnliche Anmeldedaten
Kontext:
- Die Anmeldedaten sind in n8n erstellt.
- Die Anmeldedaten testen die Verbindung korrekt.
- Sie sind in der gleichen n8n-Umgebung erstellt.
- Die Token/API-Schlüssel funktionieren.
- Aber wenn ich einen Node in einem aus JSON importierten Workflow öffne, erscheint das Anmeldedaten-Dropdown leer oder als “No credentials yet”.
- Das Neu laden des Browsers behebt das Problem nicht.
- Cache leeren behebt das Problem auch nicht.
- Das Problem tritt bei importierten Nodes auf, nicht nur bei einem bestimmten Node.
Das Seltsame:
Wenn ich im Node selbst auf “Set up credential” klicke und von dort aus neue Anmeldedaten erstelle, beginnt der Node, Anmeldedaten zu erkennen und funktioniert.
Die vorübergehende Lösung, die wir verwenden, ist:
- Neue/falsche Anmeldedaten vom Node selbst erstellen.
- Dann ermöglicht n8n bereits die Auswahl von Anmeldedaten.
- Die korrekte Anmeldedaten auswählen oder neu erstellen.
- Danach die temporären Anmeldedaten löschen.
Aber das ist nicht praktisch, da es bei vielen Nodes und vielen Integrationen gemacht werden müsste.
Hauptfrage:
Wie wird dieses Problem korrekt behoben?
Spezifische Fragen:
- Ist es ein Problem mit Eigentümerschaft/Benutzerkontext/Projekt in n8n?
- Sind Anmeldedaten, die im Credentials-Bildschirm erstellt wurden, aus irgendeinem Grund nicht für importierte Workflows verfügbar?
- Gibt es eine Möglichkeit, vorhandene Anmeldedaten Workflows zuzuweisen oder neu zu verknüpfen, ohne sie Node für Node neu zu erstellen?
- Gibt es einen CLI-Befehl oder eine empfohlene Methode zum Importieren von Workflows und Beibehalten oder erneuten Zuweisen von Anmeldedaten?
- Müssen Workflow und Anmeldedaten zu genau demselben Benutzer/Projekt gehören?
- Kann das über n8n UI, Datenbank, CLI oder API behoben werden?
- Kann n8n MCP / Claude Code bestehende Anmeldedaten importierten Nodes zuweisen, oder muss dies aus Sicherheitsgründen manuell erfolgen?
Umgebung:
- n8n self-hosted
- Workflows aus JSON importiert
- Anmeldedaten in n8n erstellt
- Anmeldedaten testen korrekt
- Das Problem betrifft mehrere Apps, nicht nur Slack
- Anmeldedaten vom Node selbst zu erstellen funktioniert
Ich muss wissen, wie man dieses Problem global und nicht Node für Node korrekt behebt.
Danke.
Informationen zu deinem n8n-Setup
- n8n-Version:
- Datenbank (Standard: SQLite):
- n8n EXECUTIONS_PROCESS-Einstellung (Standard: own, main):
- n8n wird ausgeführt über (Docker, npm, n8n cloud, Desktop-App):
- Betriebssystem:
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.