...

How to Set Up OpenAI Credentials in n8n

n8n is a powerful workflow automation tool that lets you connect various services and applications — without writing any code.

With n8n, you can automate tasks, integrate APIs, and even work with artificial intelligence.

Previously, we explained how to install n8n Community Edition on a VPS — if you don’t yet have a running n8n instance, start with that guide.

In this tutorial, we’ll walk through how to connect OpenAI to n8n so you can use language models (such as ChatGPT) in your automation workflows.

Step 1. Open the Credentials Section

Log in to your n8n dashboard.

In the left-hand menu, find Credentials.

Click Add new credential.

Step 2. Choose OpenAI

In the list of available credential types, search for OpenAI.

Select it and click Continue.

Step 3. Get Your OpenAI API Key

To allow n8n to interact with OpenAI, you’ll need an API key.

Go to platform.openai.com.

Log into your account (or create one if you don’t have it yet).

Navigate to the API Keys section.

API Keys.

Click Create new secret key.

Give your key a name (for example, tutorial) and link it to a project if needed.

Copy the generated key.

⚠️ Important: You’ll only see the key once at creation time — save it somewhere safe!

Step 4. Configure OpenAI in n8n

OpenAI credential

Go back to n8n, to the OpenAI credential setup window.

Paste your copied API key into the corresponding field.

The Organization ID field can be left empty (it’s optional).

The Base URL field is usually left as the default value.

Click Save.

If everything was configured correctly, you’ll see a green message: Connection tested successfully.

You can now use this credential in any OpenAI node inside n8n.

Step 5. Use OpenAI in a Workflow

After you’ve added your key:

  • Open or create a new workflow.
  • Add an OpenAI node.
  • In the node’s settings, select the credential you created earlier.

Now you can automate tasks such as:

Теперь вы можете автоматизировать:

  • Text generation
  • Summarization
  • Query processing
  • Integration with other services

In just a few steps, you’ve connected n8n + OpenAI — a powerful combo that lets you bring AI capabilities into your workflows and automate repetitive tasks.

To ensure your automation runs smoothly, you’ll need a reliable server.

Our company provides:

  • VPS and dedicated servers in Russia and Europe
  • High performance and uptime
  • 24/7 technical support

Start automating today — order a VPS in Europe and create your first smart workflow with n8n + OpenAI!

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

    We use a variety of tools, including cookies, to provide the basic services and functionality of our site, and to collect data about how visitors interact with our site, products and services. By clicking "Accept", you agree to the current terms and conditions of use of the site and give permission to use this data. Otherwise, please leave the site.

    Spelling error report

    The following text will be sent to our editors:

    Seraphinite AcceleratorOptimized by Seraphinite Accelerator
    Turns on site high speed to be attractive for people and search engines.