n8n OpenAI nodeConfigure OpenAI in n8n.
The OpenAI node turns a model call into a workflow step, with one credential behind it. It carries 16 operations spread over 6 resources: text, image, audio, file, conversation and video. The n8n OpenAI node runs on each incoming item, like any other action node, so it fits a pipeline rather than a chat.
Verified Trustpilot reviews · AI, automation & growth agency
What does the n8n OpenAI node actually do?
The n8n OpenAI node is the action node that calls OpenAI from inside a workflow. Pick a resource (Text, Image, Audio, File, Conversation, Video), pick one of its 16 operations, and n8n sends the request with your stored credential and hands the answer to the next node. It executes once per incoming item, which means a batch of 40 rows produces 40 calls.
Three shapes of work cover most of what the node gets used for. The first is text on a schedule: a row arrives from Google Sheets, text.response drafts a summary, the result goes back into the sheet. The second is media production: image.generate builds a visual from a prompt, audio.generate reads a script out loud, video.generate renders a short clip, and each one returns a binary file the rest of the workflow can store or send. The third is inbound processing: audio.transcribe turns a voicemail into text, image.analyze answers a question about an attachment, text.classify flags content that breaks usage policies before a human reads it.
A conversation is the piece people miss. conversation.create opens a thread, and a model response can be attached to it through the Conversation ID option, so a second call knows what the first one said. Without it, every run starts from nothing, which is fine for classification and wrong for a support thread that spans several messages.
Pick a different tool when the job is not a single call. If the model has to decide which action to take next, the AI Agent node is the root node for that, with sub-nodes plugged into its ports. Sub-nodes are the small nodes you attach to a root node, one type per port. The OpenAI node has no such port: it runs on its own, on each item. If you need a search-and-answer step against the live web, Perplexity has its own node. And for an OpenAI endpoint this node does not expose, the HTTP Request node reuses the same credential.
Two limits are worth knowing before you build. Assistant operations are deprecated in OpenAI node V2, which arrived in n8n 1.117.0, because the node moved to the Responses API. And the model provider bills its own API calls under its own terms, whatever your n8n plan is. The node adds nothing on top, but it does not shield you from the provider's meter either.
Output goes wherever the workflow goes next: a draft into Gmail, a transcript into a sheet, a generated image into a storage node. If you want the wider picture of the platform before committing, the n8n review covers what it does well and where it hurts.
What do you connect before the node runs?
- 01
Create the OpenAI credential
Open the Credentials menu in n8n and create an OpenAI credential, or select one that already exists. Every operation of the node uses the same Credential to connect with field, so you set this up once and reuse it in every workflow, on n8n Cloud or on a self-hosted instance. A credential in n8n is a stored set of secrets, kept apart from the workflow itself.
- 02
Or switch to Gateway credits on Cloud
On n8n Cloud there is a second route: select Use Gateway credits in the node's credential field and the node runs without an OpenAI account of your own. That option belongs to n8n Cloud, so a self-hosted instance stays on the credential route. Pick one before you build, because switching later means touching every node that calls OpenAI.
- 03
Test on one operation, then build
Before wiring the rest of the workflow, run a cheap operation on its own.
file.listneeds no input and returns the files that belong to the organization, which proves the credential answers. Then move to the operation you actually want. The node has no Authentication selector: the credential field is the only thing standing between the workflow and the API.
Which operation does what?
The OpenAI node exposes 16 operations across 6 resources. For each one: the node as you configure it in n8n, the required fields, and our field notes.
| Resource | Create | Get | Update | Remove | Analyze Image | Classify Text for Violations | Delete a File | Edit Image | Generate an Image | List Files | Message a Model | Transcribe a Recording | Translate a Recording | Upload a File |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Text | ✓ | ✓ | ||||||||||||
| Image | ✓ | ✓ | ✓ | |||||||||||
| Audio | ✓ | ✓ | ✓ | |||||||||||
| File | ✓ | ✓ | ✓ | |||||||||||
| Conversation | ✓ | ✓ | ✓ | ✓ | ||||||||||
| Video | ✓ |
Operations index
Text
2 operationsMessage a model
text.responseWhat you see in n8n
Notes & use cases
Sends one or more messages to a model through the Responses API and returns its answer.
Key parameters
- Model: required, picked from the list or given by expression, such as
{{ $json.model }}. - Messages: each entry carries a Role (
user,assistantorsystem) and a Prompt, and can hold an image or a file instead of text through Type. - Conversation ID: attaches the response to an existing thread. It cannot be combined with Previous Response ID.
- Simplify Output: on, you get the answer alone; off, the raw payload.
system message that fixes the tone once and for all.Classify text for violations
text.classifyWhat you see in n8n
Notes & use cases
Checks whether a piece of content complies with usage policies. The answer carries flagged, a list of categories and the matching category_scores.
Key parameters
- Text Input: the text to check, usually
{{ $json.message }}straight from the trigger. - Use Stable Model: on, the stable version of the model is used instead of the latest one, with accuracy that may be slightly lower.
- Simplify Output: returns a simplified response rather than the raw data.
flagged set to true to a human.Image
3 operationsAnalyze image
image.analyzeWhat you see in n8n
Notes & use cases
Feeds one or several images to a model and answers a question about them, in text.
Key parameters
- Model: required, the model doing the reading.
- Input Type:
urlto pass URL(s) separated by commas, orbase64to read the binary from Input Data Field Name. - Detail:
lowanswers faster and consumes fewer tokens,highgoes into detail,autolets the model decide from the image size. - Length of Description (Max Tokens): fewer tokens, shorter description. A token is the unit a model counts text in.
Generate an image
image.generateWhat you see in n8n
Notes & use cases
Creates an image from a text prompt and returns it as a binary file, or as a link when you ask for one.
Key parameters
- Model:
dall-e-2,dall-e-3orgpt-image-1. - Prompt: up to 1000 characters for
dall-e-2and 4000 fordall-e-3. - Number of Images, Resolution and Style:
naturalstays closer to a photograph,vividpushes towards dramatic results. - Respond with Image URL(s): on, you get links instead of binary files; off, Put Output in Field names the output field.
Edit image
image.editWhat you see in n8n
Notes & use cases
Reworks an image you supply, following the instruction in the prompt, instead of starting from a blank canvas.
Key parameters
- Prompt: required, up to 1000 characters for
dall-e-2and 32000 forgpt-image-1. - Images: one or more binary fields, each a png, webp or jpg under 50MB, up to 16 images.
- Image Mask: a png whose fully transparent areas mark what to repaint, same dimensions as the image, under 4MB. With several images, it applies to the first one.
- Background and Input Fidelity: transparency and how closely the model matches the input style, both for
gpt-image-1only.
Audio
3 operationsGenerate audio
audio.generateWhat you see in n8n
Notes & use cases
Reads a text out loud and returns the audio as a binary file.
Key parameters
- Model:
tts-1ortts-1-hd. - Text Input: the text to voice, 4096 characters maximum.
- Voice:
alloy,echo,fable,nova,onyxorshimmer. - Response Format and Audio Speed: the container (
mp3,opus,aac,flac) and the pace of the reading.
Transcribe a recording
audio.transcribeWhat you see in n8n
Notes & use cases
Takes an audio file from the incoming item and writes out what it says, in the language it was spoken.
Key parameters
- Input Data Field Name: defaults to
data, and points at the binary property holding the file in flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav or webm. - Language of the Audio File: an ISO-639-1 code, which improves accuracy and latency when you already know it.
- Output Randomness (Temperature): lower values keep the transcript closer to the audio.
whisper-1 by default.Translate a recording
audio.translateWhat you see in n8n
Notes & use cases
Same input, different output: the audio comes back as English text, whatever language was spoken in it.
Key parameters
- Input Data Field Name: defaults to
data, and accepts the same formats as a transcription, flac through webm. - Output Randomness (Temperature): defaults to
1.0, and the range runs from0.0for deterministic to1.0for maximum randomness.
whisper-1 default apply here too.File
3 operationsDelete a file
file.deleteFileWhat you see in n8n
Notes & use cases
Removes a file from the server, permanently. Nothing else in the workflow gets touched.
Key parameters
- File: required, either picked by name from the dropdown or given as an ID, often
{{ $json.id }}coming out of a listing step.
List files
file.listWhat you see in n8n
Notes & use cases
Returns the files that belong to the organization, one item per file.
Key parameters
- Purpose: narrows the result to one intent,
assistants,fine-tune,visionoruser_data. Left onany, everything comes back.
Upload a file
file.uploadWhat you see in n8n
Notes & use cases
Pushes a file from the workflow to OpenAI so later operations can point at it by ID.
Key parameters
- Input Data Field Name: defaults to
data, and names the binary property holding the file. Individual files go up to 512 MB, or 2 million tokens for Assistants. - Purpose:
assistants,fine-tune,visionoruser_data. Fine-tuning only accepts.jsonlfiles.
Conversation
4 operationsCreate a conversation
conversation.createWhat you see in n8n
Notes & use cases
Opens a thread that later responses can attach themselves to, and returns its ID.
Key parameters
- Messages: the opening content, each entry with a Role and a Prompt. A
systemmessage takes precedence over instructions given asuser. - Metadata: up to 16 key-value pairs, keys of 64 characters maximum, values of 512, for anything you need to search on later.
Get a conversation
conversation.getWhat you see in n8n
Notes & use cases
Fetches an existing conversation so the workflow can read what it holds.
Key parameters
- Conversation ID: required, in the
conv_1234567890form, typically stored earlier and pulled back with{{ $json.conversationId }}.
Remove a conversation
conversation.removeWhat you see in n8n
Notes & use cases
Deletes a conversation that is no longer needed. The thread and what it held go away.
Key parameters
- Conversation ID: required, the
conv_1234567890identifier of the thread to remove.
Update a conversation
conversation.updateWhat you see in n8n
Notes & use cases
Changes the metadata carried by an existing conversation, without touching its messages.
Key parameters
- Conversation ID: required, the thread to update.
- Metadata: required here, a set of up to 16 key-value pairs, keys limited to 64 characters and values to 512.
Video
1 operationGenerate a video
video.generateWhat you see in n8n
Notes & use cases
Renders a short clip from a text prompt and puts the result in an output field as binary data.
Key parameters
- Model, Prompt and Seconds: all three required, the last one being the clip duration.
- Size:
720x1280,1280x720,1024x1792or1792x1024, the last two supported by Sora 2 Pro only. - Wait Timeout: how long n8n waits for the render, in seconds, default
300. Output Field Name names where the file lands.
Need help automating OpenAI with n8n?
A person reads every message.