Quick Overview
This workflow helps you set and maintain n8n credential overwrites by fetching credential schemas via the n8n REST API and registering overwrite values on every n8n startup using the credential overwrite endpoint.
How it works
- Runs manually to collect your target credential type and n8n base URL for testing.
- Calls the n8n REST API to fetch the schema for the specified credential type so you can see which fields are available to overwrite.
- Triggers when n8n starts and sends a POST request to the credential overwrite endpoint to register the overwrite payload.
- Stores the overwrite JSON securely inside an HTTP custom auth credential and uses it as the request body to apply defaults that users cannot change in the UI.
Setup
- Self-host n8n and set
CREDENTIALS_OVERWRITE_ENDPOINT=creds-overwrite (and CREDENTIALS_OVERWRITE_PERSISTENCE=true if you run queue mode).
- Create an n8n API key with at least read permissions, add it as an n8n API credential, and set the correct base URL in the schema request.
- Enter the credential type name you want to overwrite (for example
googleOAuth2Api) in the input fields used by the manual test.
- Create an HTTP Custom Auth credential that contains the overwrite JSON payload and use it in the overwrite registration request (including the correct
/creds-overwrite URL for your instance).
- Publish the workflow and restart n8n so it runs on init and re-applies overwrites on every startup.