Resources · n8n integration

n8n Azure OpenAI Chat Model nodeConfigure Azure OpenAI Chat Model in n8n.

Azure OpenAI Chat Model hands an Azure-hosted chat model to an AI agent or a chain. The n8n Azure OpenAI Chat Model node carries 10 parameters, one deployment name and nine options that shape length, randomness and retries. It plugs into a single port, and never runs on its own.

Verified Trustpilot reviews · AI, automation & growth agency

Why automate

What does the n8n Azure OpenAI Chat Model node actually do?

It is a sub-node, meaning a small node you attach to a bigger one instead of placing it in the flow. It has no main input and no main output. You drop it under an AI Agent or a chain, point it at a deployment running in your Azure resource, and every model call that node makes from then on goes through Azure with your own credential.

First scenario: a sales team records calls and wants a structured summary out of each one. A root node handles the transcript, the chat model does the reading, and Response Format set to json_object keeps the answer parseable instead of free prose. That pairing is exactly what the AI Agent expects when an output parser sits behind it.

Second scenario: a content workflow drafts long pieces. Here Maximum Number of Tokens is the parameter that matters, because it caps the completion length, and a cap set too low truncates the draft mid-sentence. Raising Sampling Temperature a little gives more varied phrasing; leaving it near zero gives repetitive, predictable text.

Third scenario: personalized outreach built from a spreadsheet. Rows come from Google Sheets, the agent writes one message per row, and the result lands in Gmail as a draft ready for review. On a long run, Max Retries and Timeout (Ms) decide whether one slow call kills the whole batch.

When to pick something else: this node only makes sense if the deployment lives in Azure. For a key issued on the public API, the OpenAI side of the catalog is the natural route, and a model reached through a search product like Perplexity is a different node again. The choice is about where the deployment is hosted, not about quality.

Known limits. The node exposes one deployment at a time, so switching models means switching the value in Model (Deployment) Name. It does not support the NO_PROXY environment variable. And it never executes alone: with no root node attached to its port, nothing happens at all. Teams that want the whole picture usually start with the n8n review.

Connect

What credential does the node need?

  1. 01

    Pick an authentication method

    Open the node and look at Authentication. Two choices sit there: azureOpenAiApi, labeled API Key, and azureEntraCognitiveServicesOAuth2Api, labeled Azure Entra ID (OAuth2). The first is the quickest path for a single workflow. The second suits an organization that already manages access centrally and would rather not circulate a raw key.

  2. 02

    Create the credential once

    A credential in n8n is a stored set of secrets, kept outside the workflow. Create it from the Credentials menu, matching the method selected in the node. Once saved, it is reusable: every other workflow that needs the same Azure deployment points at the same entry, and rotating the secret later happens in one place instead of twenty.

  3. 03

    Name the deployment and test

    Fill Model (Deployment) Name with the deployment name as it exists in Azure, for example gpt-4 or gpt-35-turbo. Attach the node to a root node, then run that root node. A failure at this point is almost always the deployment name or the credential, not the model itself.

Connections

Where does this node plug in?

n8n splits AI work between a root node, which sits in the flow and receives items, and sub-nodes attached to its ports, one type of sub-node per port.

Output (what it plugs into)

  • Modelai_languageModel
01ModelThis is the only port the node connects to, and it carries the language model a root node calls whenever it needs text generated. Drag from the Model connector under the root node and pick Azure OpenAI Chat Model.

This is the only port the node connects to, and it carries the language model a root node calls whenever it needs text generated. Drag from the Model connector under the root node and pick Azure OpenAI Chat Model.

Key parameters

  • Required: a root node with an empty Model port cannot run, since it has nothing to send the prompt to.
  • AI Agent: the conversational root node, which calls the model on every reasoning step.
  • Basic LLM Chain: one prompt in, one answer out, no tools attached.
  • Summarization Chain: reads long documents and gives the model the condensing work.
Use cases
one Azure deployment serving an agent in one workflow and a Summarization Chain in another, both reading the same credential.
Parameters

What does each parameter change?

The Azure OpenAI Chat Model node has 10 parameters. For each one: the node as you configure it in n8n, what the parameter changes, and our field notes.

01

Authentication

authentication

What you see in n8n

Notes & use cases

This selector decides how n8n proves to Azure that it may call the deployment. It is the first thing to set, because the credential list below it filters on the choice made here.

Key parameters

  • Authentication: azureOpenAiApi (API Key) stores a key directly, and azureEntraCognitiveServicesOAuth2Api (Azure Entra ID (OAuth2)) delegates access to Entra ID instead.
Use cases
a team that bans long-lived keys in shared environments switches every chat model node to the Entra ID option and keeps the workflows untouched.
02

Model (Deployment) Name

model

What you see in n8n

Notes & use cases

The single required field of the node. It names the deployment to call, which is the model instance published inside the Azure resource, and nothing runs until it is filled.

Key parameters

  • Model (Deployment) Name: a string, for example gpt-4 or gpt-35-turbo. An expression works too when the value travels with the item, as in {{ $json.deployment }}, which lets one workflow serve several deployments.
Use cases
a routing workflow reads a column holding the deployment to use, and the same agent answers with a lighter model on low-priority requests.
03

Frequency Penalty

options.frequencyPenalty

What you see in n8n

Notes & use cases

Turn to this option when the model keeps repeating the same line word for word. Positive values penalize tokens, the word pieces a model works with, based on how often they already appeared in the text.

Key parameters

  • Frequency Penalty: a number. Higher values lower the chance of a verbatim repeat.
Use cases
a batch of product descriptions where every third sentence opens the same way gets readable again once this value is nudged up.
04

Maximum Number of Tokens

options.maxTokens

What you see in n8n

Notes & use cases

This caps how long the completion can get. Most models have a context length of 2048 tokens, the newest ones more, so a generous cap is not free: a long answer eats the same budget the prompt needs.

Key parameters

  • Maximum Number of Tokens: a number, with -1 meaning the default.
Use cases
a summarizer that keeps cutting off mid-sentence is usually hitting this ceiling rather than failing.
05

Response Format

options.responseFormat

What you see in n8n

Notes & use cases

Pick the shape of what comes back. Left alone the model answers in prose, which is fine for a human reader and painful for the node that has to parse it afterwards.

Key parameters

  • Response Format: text (Text) returns a regular text response, json_object (JSON) enables JSON mode, which should guarantee the generated message is valid JSON.
Use cases
an extraction workflow that writes straight into a database sets JSON mode and stops babysitting malformed answers.
06

Presence Penalty

options.presencePenalty

What you see in n8n

Notes & use cases

Close cousin of the frequency setting, aimed at subject matter rather than wording. Positive values penalize tokens that already appeared at all, which pushes the model toward new topics.

Key parameters

  • Presence Penalty: a number. Higher values increase the chance the model moves on to something new.
Use cases
a brainstorming step that keeps circling back to the same two angles opens up when this value rises.
07

Sampling Temperature

options.temperature

What you see in n8n

Notes & use cases

Randomness, in one dial. Lowering it results in less random completions, and as the value approaches zero the model becomes deterministic and repetitive.

Key parameters

  • Sampling Temperature: a number. Low for classification and extraction, higher when varied phrasing is the point.
Use cases
a ticket classifier is set near zero so the same ticket never lands in two different categories on two runs.
08

Timeout (Ms)

options.timeout

What you see in n8n

Notes & use cases

The ceiling on how long a single request may take, counted in milliseconds. Useful the day one call hangs and an execution sits open behind it.

Key parameters

  • Timeout (Ms): a number, the maximum amount of time a request is allowed to take.
Use cases
a nightly batch over several hundred rows gets a tight timeout so one stuck call fails fast instead of stalling the queue.
09

Max Retries

options.maxRetries

What you see in n8n

Notes & use cases

How many times n8n tries again after a failed request, before the node gives up and the execution errors out. This one pairs badly with a long timeout: retries multiply the wait.

Key parameters

  • Max Retries: a number, the maximum number of retries to attempt on failure.
Use cases
an agent answering a live request keeps retries low, because a user waiting on a reply would rather see an error than a long silence.
10

Top P

options.topP

What you see in n8n

Notes & use cases

The other way to control diversity, through nucleus sampling: 0.5 means half of all likelihood-weighted options are considered. Lower values ignore the less probable choices.

Key parameters

  • Top P: a number. Altering this or the temperature is generally recommended, but not both at once.
Use cases
a workflow already tuned through temperature leaves this untouched, since moving both makes the result impossible to reason about.
Need help

Need help automating Azure OpenAI Chat Model with n8n?

A person reads every message.

FAQ

Questions people ask next

01Is the n8n Azure OpenAI Chat Model node included with n8n?
Yes. It belongs to the n8n AI package, shipped with n8n itself, so there is nothing to install and nothing extra to pay on the n8n side. It behaves the same on n8n Cloud, the hosted offer run by n8n, and on a self-hosted instance installed through Docker or npm under the Community Edition and its Sustainable Use license. What does cost money is the Azure side: the model provider bills its own API calls under its own terms, and n8n adds nothing to that. A workflow built on one hosting option runs identically on the other.
02What do you need for it to work?
A credential and a deployment name. The node offers two authentication methods, API Key through azureOpenAiApi and Azure Entra ID (OAuth2) through azureEntraCognitiveServicesOAuth2Api, and the credential is created once from the Credentials menu, then reused across every workflow. Then fill Model (Deployment) Name with the deployment as published in Azure, such as gpt-4 or gpt-35-turbo. That field is required, so an empty value blocks the node. Last piece: a root node. This is a sub-node, it has no main input and never executes on its own.
03What are the limits of this node?
Version 1 of the node exposes 10 parameters: the deployment name, plus nine options covering penalties, token ceiling, response format, temperature, timeout, retries and Top P. That is the whole surface. One node points at one deployment, so serving several models means several nodes or an expression in the name field. The node also does not support the NO_PROXY environment variable, which matters on a self-hosted instance sitting behind a proxy. Older workflows may still show an earlier version of the node with fewer options.
04What do you have to connect at minimum, and where do you start?
At minimum, one root node and one credential. The node attaches to the Model port, typed ai_languageModel, of a root node such as AI Agent, Basic LLM Chain or Question and Answer Chain, and that port cannot stay empty. Basic LLM Chain is the gentler starting point: it sends a prompt and returns an answer, with no tools and no decision loop to debug. Once that runs, moving up to AI Agent adds the parts that need a working model underneath them anyway. Structured Output Parser and Auto-fixing Output Parser come after, when the answer has to hold a fixed shape.
05n8n or Make for an Azure OpenAI workflow?
It depends on where the data has to live. Make is hosted only, with no self-hosting option, and charges per operation. n8n runs either on Cloud or on your own servers, which is the deciding factor when the prompts carry data that cannot leave a given infrastructure, and its cost model is not counted per operation. On the visual side, Make lays out a linear chain of modules while n8n builds a graph where sub-nodes hang off a root node, which is exactly the model this chat model node belongs to. Both build the workflow visually.
Hack'celeration Lab

Get our weekly integration tips.

No spam. Unsubscribe anytime.