- Home
- Resources
- Integrations
- Azure OpenAI Chat Model
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
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.
What credential does the node need?
- 01
Pick an authentication method
Open the node and look at Authentication. Two choices sit there:
azureOpenAiApi, labeled API Key, andazureEntraCognitiveServicesOAuth2Api, 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. - 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.
- 03
Name the deployment and test
Fill Model (Deployment) Name with the deployment name as it exists in Azure, for example
gpt-4orgpt-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.
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)
- Model
ai_languageModel
01Model
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.
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.
Parameters index
Authentication
authenticationWhat 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, andazureEntraCognitiveServicesOAuth2Api(Azure Entra ID (OAuth2)) delegates access to Entra ID instead.
Model (Deployment) Name
modelWhat 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-4orgpt-35-turbo. An expression works too when the value travels with the item, as in{{ $json.deployment }}, which lets one workflow serve several deployments.
Frequency Penalty
options.frequencyPenaltyWhat 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.
Maximum Number of Tokens
options.maxTokensWhat 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
-1meaning the default.
Response Format
options.responseFormatWhat 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.
Presence Penalty
options.presencePenaltyWhat 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.
Sampling Temperature
options.temperatureWhat 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.
Timeout (Ms)
options.timeoutWhat 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.
Max Retries
options.maxRetriesWhat 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.
Top P
options.topPWhat 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.
Need help automating Azure OpenAI Chat Model with n8n?
A person reads every message.
Questions people ask next
01Is the n8n Azure OpenAI Chat Model node included with n8n?
02What do you need for it to work?
03What are the limits of this node?
04What do you have to connect at minimum, and where do you start?
05n8n or Make for an Azure OpenAI workflow?
Get our weekly integration tips.
No spam. Unsubscribe anytime.