n8n

How to Automate n8n Credential Transfer?

Move saved credentials between n8n instances with a simple guided form. Users pick the destination and the exact credential, and the system copies it securely. Great for admins who run test, staging, and production and want a fast and safe handoff.

The flow starts with a form trigger that launches the process. A Set node stores a list of remote instances with name, base URL, and API key. The workflow exports all local credentials using the command line, reads the export file, and converts it to JSON. Code nodes build dropdown lists for instance names and credential names so users can choose from real data. After selection, the data is prepared and sent to the target instance with an HTTP POST to the credentials endpoint using the API key header. Success and error pages confirm the result.

Setup needs API access on each destination instance and command line access on the source. Protect the form with Basic Auth and double check each base URL includes the API path. Expect a big time win by removing manual export and import steps and fewer mistakes from copy and paste. Use this for environment sync, organization moves, or quick credential cloning for new teams.

What are the key features?

  • Form trigger starts a guided copy flow with no coding needed for the user
  • Instance list stored in a settings node with name, base URL, and API key
  • Exports all local credentials using the n8n command line for full coverage
  • Reads the export file and converts it from JSON into structured items
  • Dynamic dropdowns for instance and credential names built by Code nodes
  • Prepares selected credential data and posts it to the target API endpoint
  • Uses API key header for secure and dynamic authentication per instance
  • Clear success and error screens to confirm result for the requester

What are the benefits?

  • Reduce manual credential handover from 20 minutes to 2 minutes
  • Eliminate up to 90 percent of copy and paste errors
  • Support many destinations by listing multiple instances in settings
  • Standardize moves with a form guided flow and clear success feedback
  • Keep secrets safe using API keys and avoid sharing raw data with users

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. Confirm your n8n host allows the Execute Command node. Self hosted setups should enable it and provide access to the n8n CLI on the same machine.
  3. Prepare destination instances: in each target n8n, create an API key in Settings > API and note the base URL that includes /api/v1.
  4. Open the Settings node and replace the remoteInstances array with your instances, including name, apiKey, and baseUrl for each destination.
  5. Secure the Form Trigger and form pages: open the form nodes and enable Basic Auth so only approved users can start the transfer.
  6. Validate the export step: run the workflow to the Export Credentials node and check that /tmp/cred is created and contains decrypted credential JSON.
  7. Check dropdown data: ensure the Get Instance Names and Get Credential Names nodes output valid options for the forms.
  8. Test a transfer: pick one destination and one credential using the forms. Watch the HTTP Request node for a 200 or 201 response.
  9. If you see 401 or 403 errors, confirm the API key is correct and the base URL is the direct API endpoint of the target instance.
  10. If you see file or command errors, verify the command path for n8n export:credentials and that the user has permission to write to /tmp.
  11. Review the Success or Error pages to inform the requester. Check the target instance credential list to confirm the new credential exists.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.