How to Set Up n8n Credentials for External APIs

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

  1. Log in to your n8n dashboard.
  2. In the left sidebar, click Credentials.
  3. Click the Add Credential button (top right).
  4. Search for the service you want to connect (e.g., Gmail, Slack, HTTP Request).
  5. Click the service and follow the authentication steps (see types below).
  6. 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.

 

  • n8n credentials, n8n setup, OAuth, Gmail n8n, OpenAI n8n, Paystack n8n, API key
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to Access Your n8n Instance After Purchase

Once your Hordanso n8n VPS is ready (usually within 5–30 minutes of purchase), here is how to...

How to Create Your First n8n Workflow

A workflow in n8n is a series of connected steps that run automatically. Here is how to create...

How to Connect n8n to WhatsApp

Connecting n8n to WhatsApp allows you to send and receive WhatsApp messages automatically as part...

How to Upgrade Your n8n VPS Plan

If your workflows are running slowly, timing out, or you are running out of storage on your n8n...

How to Back Up Your n8n Workflows

Your n8n workflows represent real business logic and automation. Backing them up regularly...

Powered by WHMCompleteSolution