n8n ChatGPT Integration: Connect ChatGPT and Build AI Workflows
Connect an OpenAI model to n8n, test your first prompt, and turn it into a practical workflow. Learn what you need, how API billing differs from ChatGPT Plus, and how to build safely.
- Step-by-step API setup
- Chat model and agent explained
- Costs and safeguards covered
What is n8n ChatGPT integration?
Use an OpenAI model inside a workflow that connects your apps.
Connecting ChatGPT-style AI to n8n usually means adding an OpenAI model or supported OpenAI operation to a workflow. n8n can pass a prompt or other data to the model, then route the response to another step, such as a review, spreadsheet, email, or support system.
This guide focuses on beginner-friendly setup and workflow ideas. For API operations, node details, and deeper configuration, see our technical n8n OpenAI integration guide. You can also explore the broader n8n AI automation guide.
How n8n and ChatGPT work together
Your workflow supplies input, the model returns output, and n8n decides what happens next.
Trigger and data
A manual run, form, message, or app event starts the flow.
Instructions
n8n sends the relevant text and context to the model.
Model output
The model generates a response that your workflow can inspect.
Next step
Validate, review, store, or send the result to another service.
What you need before connecting ChatGPT to n8n
- An n8n workspace or instance with the relevant integration available.
- Access to OpenAI Platform or another supported AI access method.
- An API credential for the standard OpenAI API connection.
- A small workflow idea and safe test input.
New to n8n? Start with the n8n tutorial for beginners to learn triggers, nodes, and data flow.
ChatGPT Plus and the OpenAI API are different
A ChatGPT subscription and API access are separate products with separate billing.
| ChatGPT subscription | OpenAI API |
|---|---|
| Used in the ChatGPT product. | Used by connected apps and workflows such as n8n. |
| Does not automatically provide API credentials. | Requires supported API authentication and usage billing. |
| Subscription features and limits depend on the plan. | Usage costs depend on API models and features used. |
For the standard n8n API setup: create and configure API credentials through the OpenAI Platform. A ChatGPT Plus login is not an API key.
How to connect ChatGPT to n8n using the API
Interface labels can differ by n8n version. Check current provider documentation when setting up credentials.
- 1
Create an OpenAI Platform account
Use the platform account and project intended for API usage.
- 2
Review API billing and limits
Check usage billing, project limits, and spending controls before testing.
- 3
Open your n8n workflow
Create or open a workflow where you can run a safe test.
- 4
Add an OpenAI node or chat model
Choose a node that fits the task: a direct model operation or a model connection for AI workflows.
- 5
Create credentials in n8n
Enter the supported API credential in n8n’s credential manager. Keep keys private and out of workflow text.
- 6
Choose an available model
Select a model available to your API project and appropriate for your task and budget.
- 7
Test the connection
Run a small prompt and inspect the execution output and usage.
Build your first ChatGPT workflow in n8n
Start with a manual prompt, then add an app after you understand the result.
- 1
Add a Manual Trigger
Use it to start a test run while building.
- 2
Add an Edit Fields node
Create a sample text field to use as the prompt input.
- 3
Connect the OpenAI operation
Select your saved credentials and a supported model.
- 4
Write a focused prompt
State the task, relevant context, and the format you want returned.
- 5
Run and inspect
Check the model output, execution data, and usage before adding more steps.
- 6
Connect another application
After validating the response, route it to a review, database, or notification step.
n8n ChatGPT integration examples for business
Treat these as workflow ideas; validate model output before using it in consequential processes.
Email summarization
Summarize a message for a person to review.
Support assistant
Draft an answer using approved information and offer human handoff.
Lead qualification
Organize enquiry details and suggest a category for review.
Content drafting
Prepare outlines or drafts that go through editorial review.
Document summaries
Extract key points from suitable text while respecting data policies.
WhatsApp assistant
Classify incoming questions or prepare a response for approval. See n8n WhatsApp automation.
Feedback analysis
Group comments by theme and inspect the source before acting.
For more examples, see our n8n workflow templates and AI automation guide.
Build an AI agent with ChatGPT and n8n
An agent adds tool selection to a model-powered workflow.
A simple agent setup connects an AI Agent node to a chat model and one or more tools. The model interprets the request; tools provide defined capabilities. Memory can optionally provide conversation context.
Limit tool permissions, test when the agent should and should not use each tool, and put human approval before sensitive actions. Learn more in our n8n AI agent tutorial and AI chatbot tutorial.
OpenAI Node vs OpenAI Chat Model
These options serve related but different roles in n8n.
| Compare | OpenAI Node | OpenAI Chat Model |
|---|---|---|
| Main purpose | Perform supported OpenAI operations. | Provide a language model to supported AI chains and agents. |
| Typical fit | Direct OpenAI tasks in a workflow. | AI agents and conversational workflows. |
| What to check | Available operations in your n8n version. | Compatibility with the AI node or agent you connect. |
Node features and labels change over time. Check current n8n docs and your installed version.
Chat Completions API vs Responses API
You may encounter different API operations in n8n tutorials. Chat Completions uses a list of messages; conversation history may need to be managed by your workflow. Responses API supports newer response workflows and tool capabilities. What is available depends on the current n8n node version and model.
Older tutorials may show legacy operations or different labels. Before following steps, compare them with the current n8n and OpenAI documentation. For a deeper API-focused walkthrough, visit n8n OpenAI integration.
How much does n8n ChatGPT integration cost?
Total costs depend on hosting, model usage, and connected services.
| Cost area | What to consider |
|---|---|
| n8n Cloud | Subscription, plan limits, and any applicable credits. |
| Self-hosted n8n | Server, hosting, maintenance, and backups. |
| OpenAI API | Model and feature usage based on requests and input/output. |
| Other apps | Optional CRM, email, database, or storage service charges. |
Control usage: test with small inputs, avoid repeated unnecessary calls, select an appropriate model, and monitor provider usage and spending controls.
Common n8n ChatGPT integration problems
Use the execution details to find where the connection or data flow failed.
Invalid API key
Check that the credential is current, copied correctly, and selected in the node.
Billing or usage limit
Review API billing and project usage separately from your ChatGPT subscription.
Model unavailable
Verify model access and select an available model for your API project.
No response returned
Inspect prompt mapping, operation settings, and the execution error.
Agent skips its tool
Check tool connections, descriptions, permissions, and agent instructions.
Plus login used as API credential
Use supported API authentication; ChatGPT Plus does not automatically provide API access.
Best practices for reliable ChatGPT automation
- Store API credentials securely; do not hard-code keys in workflow text.
- Validate inputs before sending them to a model.
- Write focused prompts and request a predictable output format when needed.
- Validate model output before using it in another application.
- Add error handling and monitor executions and provider usage.
- Limit AI agents to only the tools and permissions they need.
- Use human approval for sensitive or irreversible actions.
- Avoid sending unnecessary personal or confidential information.
- Test with realistic examples before activating the workflow.
Frequently asked questions
Can I integrate ChatGPT with n8n?
Yes. You can connect supported OpenAI operations or models to workflows using the authentication method available in your setup.
How do I connect ChatGPT to n8n?
For the standard API setup, configure OpenAI API credentials in n8n, select an available operation or model, and test with a small prompt.
Can I use ChatGPT Plus with n8n?
A ChatGPT Plus subscription is separate from API access and does not automatically provide an API key. Check current supported authentication options.
Is the n8n ChatGPT integration free?
Costs depend on n8n hosting, API usage, and connected services. Review current pricing for each provider.
Can I build an AI chatbot with ChatGPT and n8n?
Yes. You can combine a chat input, model, workflow logic, and optional tools or memory. Add boundaries and review for important responses.
Can ChatGPT automatically run n8n workflows?
A workflow can use model output to choose a configured path or tool, but access and actions depend on the workflow you build. Use controls and approval where needed.
What is the difference between n8n and ChatGPT?
ChatGPT is an AI product; n8n is a workflow automation platform that can connect AI models with apps and process steps.
Do I need coding skills?
No. Many workflows can be made visually. Code or expressions can help with advanced customization.
Which is better: OpenAI Node or OpenAI Chat Model?
It depends on whether you need a direct OpenAI operation or a model connection for an AI workflow or agent. Check current node documentation.
Explore more n8n AI guides
Continue with the n8n AI automation guide, learn to build an n8n AI agent, or explore the n8n AI chatbot tutorial. For reusable starting points, browse n8n workflow templates.
n8n Automation AI is an independent educational resource and is not affiliated with or endorsed by n8n GmbH.
Official documentation and resources
External references are grouped here near the end of the page.
- n8n OpenAI node documentation
- n8n OpenAI Chat Model documentation
- n8n OpenAI credentials documentation
- OpenAI API documentation
- OpenAI API pricing
Node features, model availability, APIs, and pricing can change. Verify current instructions before deploying a workflow.
Turn one useful prompt into a workflow
Start small, inspect the output, and add connected actions when ready.
