# Credentials not resolving and folders misaligned when promoting workflows from Dev → Prod

**URL:** <https://community.n8n.io/t/credentials-not-resolving-and-folders-misaligned-when-promoting-workflows-from-dev-prod/201084>\
**Category:** Questions\
**Created:** [October 7, 2025, 11:25am UTC](https://community.n8n.io/t/credentials-not-resolving-and-folders-misaligned-when-promoting-workflows-from-dev-prod/201084 "2025-10-07T11:25:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Darshan\_Mahalingam](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/darshan_mahalingam/32/59083_2.png) [@Darshan\_Mahalingam](https://community.n8n.io/u/Darshan_Mahalingam)\
**Post date:** [October 7, 2025, 11:25am UTC](https://community.n8n.io/t/credentials-not-resolving-and-folders-misaligned-when-promoting-workflows-from-dev-prod/201084/1 "2025-10-07T11:25:43Z")

</div>

Hi all, looking for guidance on two recurring issues when we promote workflows from our Dev n8n to Prod:

1. Credentials and environment variables not picked up in Prod

- After importing a workflow from Dev to Prod, nodes often show missing credentials or resolve env vars to null until we manually intervene.

- We do have the corresponding credentials and env variables configured in Prod (names/keys are the same), but the workflow still doesn’t bind automatically.

- It looks like credential IDs differ between environments and the imported workflow may be referencing IDs from Dev.

- Question: What’s the recommended way to promote workflows so credentials are matched by name/type (not ID), and env vars are resolved immediately without manual edits? Any best practices or tooling to strip credential IDs on export/import?

1. Folders get misplaced in Prod

- Some workflows land in the wrong folders (or root) after import to Prod, even though we didn’t change folder structure explicitly in the workflow export.

- I suspect folder IDs differ between Dev and Prod, so the import falls back or creates duplicates.

- Question: Is there a supported approach to map/migrate folder placement by folder name/path rather than folderId? Any recommended pipeline or API pattern to ensure the target folder exists and the workflow is moved there on import?

Environment and process

- We export workflows from Dev and import into Prod (no shared DB).

- Credentials and env vars exist in both environments (but IDs obviously differ).

- We’d like a zero-manual-intervention promotion (CI-friendly) that:

- Ensures required credentials exist in Prod (by name/type) and binds automatically

- Resolves env vars immediately

- Places workflows into the intended folder path reliably

What we’ve tried/considering

- Stripping credential IDs from workflow JSON and leaving only name/type (so Prod can bind to the existing credential by name)

- Using env vars in node parameters instead of credentials where possible

- Pre-creating folders in Prod and mapping by name before import

- A bootstrap script that upserts credentials/folders by name before importing workflows

Questions to the community

- Is there an official or recommended way to:

- Promote workflows with name-based credential mapping (not ID)?

- Map folders by name/path during import (or move after import) using the API?

- Validate that required credentials and env vars exist in Prod before import, and fail early if they don’t?

- If you have a working Dev → Prod pipeline, could you share your steps or scripts (n8n API endpoints, CLI usage, do’s/don’ts)?

- Any common pitfalls (e.g., OAuth tokens per environment, required restarts to load env changes) we should account for?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![Ed\_P](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/ed_p/32/98978_2.png) [@Ed\_P](https://community.n8n.io/u/Ed_P)\
**Post date:** [October 9, 2025, 12:59am UTC](https://community.n8n.io/t/credentials-not-resolving-and-folders-misaligned-when-promoting-workflows-from-dev-prod/201084/2 "2025-10-09T00:59:32Z")

</div>

There are a lot of questions.

First of all, which n8n version are you using? Paid Business / Enterprise or 2 independent free Community versions (one for Dev, the other for prod?)

---

<div class="post-metadata">

**Author:** ![Darshan\_Mahalingam](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/darshan_mahalingam/32/59083_2.png) [@Darshan\_Mahalingam](https://community.n8n.io/u/Darshan_Mahalingam)\
**Post date:** [October 16, 2025, 7:35am UTC](https://community.n8n.io/t/credentials-not-resolving-and-folders-misaligned-when-promoting-workflows-from-dev-prod/201084/3 "2025-10-16T07:35:22Z")

</div>

enterprise

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/195824_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [January 14, 2026, 7:35am UTC](https://community.n8n.io/t/credentials-not-resolving-and-folders-misaligned-when-promoting-workflows-from-dev-prod/201084/4 "2026-01-14T07:35:54Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
