Skip to main content

n8n Local Setup (Windows) with OpenAI-Compatible Gateway

Prerequisites

  • Node.js installed
  • n8n installed globally
Verify installation:
Start n8n:
n8n will be available at:

Initial Account Setup

On first launch, n8n will prompt you to create an owner account. Fill in:
Password requirements:
  • Minimum 8 characters
  • At least 1 uppercase letter
  • At least 1 number
The “I want to receive security and product updates” checkbox is optional. After completing registration, you’ll be redirected to the n8n dashboard.

Connecting n8n to an OpenAI-Compatible Gateway

This method works with:
  • ZnapAI
  • Any OpenAI-compatible endpoint

Step 1: Open Chat

From the left sidebar:

Step 2: Select a Model

Click:
Choose:

Step 3: Create Credentials

When prompted, create a new credential. Enter:
n8n Configuration

Step 4: Save Credential

Click:
n8n will store the credential securely and make it available for future workflows and agents.

Step 5: Test the Connection

Send a message in the Chat interface. Example:
If configured correctly:
  • n8n sends the request to your gateway
  • The gateway routes the request to the selected model
  • The response appears in the chat

Verification

If using ZnapAI or any other Gateway Provider, monitor the gateway logs. You should see incoming requests from n8n whenever a chat message is sent. Example validation flow:
If requests appear in gateway logs, the integration is working correctly.

Next Steps

Once chat is working, you can build workflows and AI agents. Typical architecture:
Examples:
  • GitHub Issue Summarizer
  • Slack AI Assistant
  • CRM Lead Qualification Agent
  • Customer Support Automation
  • RAG Knowledge Assistant
  • Email Classification and Routing
At this point, n8n is successfully configured to use your OpenAI-compatible gateway for both chat and workflow-based AI automation.