Credentials in n8n are the saved authentication details that allow your workflows to connect to external services like Gmail, Google Sheets, OpenAI, Paystack, and hundreds of others.
How to Add a New Credential
- Log in to your n8n dashboard.
- In the left sidebar, click Credentials.
- Click the Add Credential button (top right).
- Search for the service you want to connect (e.g., Gmail, Slack, HTTP Request).
- Click the service and follow the authentication steps (see types below).
- Click Save. The credential is now stored securely and can be used in any workflow.
Types of Authentication
1. API Key Authentication
Used by: OpenAI, Paystack, Flutterwave, Tavily, Anthropic, and many others.
- Log in to the service and navigate to their API or Developer settings
- Copy the API key
- Paste it into the API Key field in n8n and save
2. OAuth2 Authentication
Used by: Gmail, Google Sheets, Google Drive, Slack, LinkedIn, and others.
- In n8n, click Connect to open a browser popup
- Log in to the service account you want to connect
- Click Allow or Authorise to grant n8n access
- n8n stores the access and refresh tokens automatically
3. Basic Authentication
Used by: some internal APIs, WHMCS API, older REST services.
- Enter the username and password for the service
4. Header Auth / Bearer Token
Used by: custom APIs, 360Dialog WhatsApp, and many enterprise services.
- Enter the header name (e.g., Authorization) and value (e.g., Bearer YOUR_TOKEN)
Setting Up Specific Popular Credentials
Paystack
- Get your Secret Key from dashboard.paystack.com > Settings > API Keys
- In n8n: Credentials > Add > search Paystack or HTTP Request Header Auth > paste secret key
OpenAI
- Get your API key from platform.openai.com/api-keys
- In n8n: Credentials > Add > OpenAI > paste API key > save
Google Sheets
- In n8n: Credentials > Add > Google Sheets OAuth2 > click Connect > sign in with Google > allow access
Tip: Credentials are encrypted and stored securely in your n8n database. Give each credential a descriptive name (e.g., 'Paystack Live Key' vs 'Paystack Test Key') to avoid confusion when building multiple workflows.
