Create and edit credentials#
Credentials are securely stored authentication information used to connect n8n workflows to external services such as APIs, or databases.
Create a credential#
- Select the
Create button in the upper-left corner of the side menu. Select credential. - If your n8n instance supports projects, you'll also need to choose whether to create the credential inside your personal space or a specific project you have access to. If you're using the community version, you'll create the credential inside your personal space.
- Select the app or service you wish to connect to.
Or:
- Using the
Create button in the upper-right corner from either the Overview page or a specific project. Select Credential. - If you're doing this from the Overview page, you'll create the credential inside your personal space. If you're doing this from inside a project, you'll create the credential inside that specific project.
- Select the app or service you wish to connect to.
You can also create new credential in the credential drop down when editing a node on the workflow editor.
Once in the credential modal, enter the details required by your service. Refer to your service's page in the credentials library for guidance.
When you save a credential, n8n tests it to confirm it works.
Credentials naming
n8n names new credentials "node name account" by default. You can rename the credentials by clicking on the name, similarly to renaming nodes. It's good practice to give them names that identify the app or service, type, and purpose of the credential. A naming convention makes it easier to keep track of and identify your credentials.
Allowed HTTP request domains#
The Allowed HTTP Request Domains field appears on many n8n credentials for web-based APIs and services. It controls which domains the credential is permitted to be used against when the credential is selected in an HTTP Request node. It has no effect when the credential is used in its own dedicated node.
The field has three options:
- All: The credential can be used against any URL.
- Specific Domains: Restrict to specific domains (provide a comma-separated list like
httpbin.org, api.github.com) - None: The credential is blocked entirely from use in the HTTP Request node.
This field prevents credential misuse, for example sending the credential to URLs outside the intended domain.
Expressions in credentials#
You can use expressions to set credentials dynamically as your workflow runs:
- In your workflow, find the data path containing the credential. This varies depending on the exact parameter names in your data. Make sure that the data containing the credential is available in the workflow when you get to the node that needs it.
- When creating your credential, hover over the field where you want to use an expression.
- Toggle Expression on.
- Enter your expression.
Example workflow#
Using the example#
To load the template into your n8n instance:
- Download the workflow JSON file.
- Open a new workflow in your n8n instance.
- Copy in the JSON, or select Workflow menu
> Import from file....
The example workflows use Sticky Notes to guide you:
- Yellow: notes and information.
- Green: instructions to run the workflow.
- Orange: you need to change something to make the workflow work.
- Blue: draws attention to a key feature of the example.