Import Workflows and Map Their Credentials Using a Multi-Form - n8n Workflow | Neura Market
Import Workflows and Map Their Credentials Using a Multi-Form
## Purpose
This workflow allows you to import any workflow from a file or another n8n instance and map the credentials easily.


## How it works
- A multi-form setup guides you through the entire process.
- At the beginning, you have two options:
- Upload a workflow file (JSON)
- Copy workflow from a remote n8n instance
- If you choose the second option, you get to choose one of your predefined (in the Settings node) remote instances first, then it retrieves a list of all the workflows using the n8n API which you then can choose a workflow from.
- Now both initial options come together - the workflow file is being processed.
- In parallel, all credentials of the current instance are being retrieved using the Execute Command node.
- The next form page enables a mapping of all the credentials used in the workflow. The matching happens between the names (because one workflow can contain different credentials of the same type) of the original credentials and the ones available on the current instance. Every option then shows all available credentials of the same type. In addition, the user has always the choice to create a new credential on the fly.
- For every option which was set to create a new credential, an empty credential is being created on the current instance using the n8n API. An emoji is being appended to the name, which indicates that it needs to be populated.
- Finally, the workflow gets updated with the new credential IDs and created on the current instance using the n8n API. Then the user gets a message, if the process has succeeded or not.
## Setup
- Select your credentials in the nodes which require those.
- Configure your remote instance(s) in the Settings node. (You can skip this step, if you only want to use the File Upload feature)
- Every instance is defined as an object with the keys name, apiKey, and baseUrl. These instances are then wrapped inside an array. You can find an example described within a note on the workflow canvas.
## How to use
- Grab the (production) URL of the Form from the first node.
- Open the URL and follow the instructions given in the multi-form.
## Disclaimer
- Security: Beware, that all credentials are being decrypted and processed within the workflow. Also, the API keys to other n8n instances are stored within the workflow.
- This solution is primarily meant for transferring data between testing environments. For production use, consider the n8n enterprise edition which provides a **reliable** way to deploy workflows between different environments without the need of manual credential mapping.
Platform
n8n
Category
Data & Analytics
Price
Free
Creator
Mario
if
n8n
set
code
form
noOp
sort
merge
filter
splitOut
How to import this workflow into n8n
1Purchase or download the workflow to get the n8n workflow JSON file.
2In your n8n instance, open Workflows and choose "Import from File" (or paste the JSON with Ctrl+V on the canvas).
3Open each node marked with a credential warning and connect your own accounts and API keys.
4Run the workflow once manually to verify the data flow, then toggle it to Active.