How to Build GPT-5 AI Agents in n8n Workflows

83.8K views
•
August 8, 2025
by
Nate Herk | AI Automation
YouTube video player
How to Build GPT-5 AI Agents in n8n Workflows

TL;DR

Connect GPT-5 to an n8n AI Agent by adding an OpenAI Chat Model, creating an API credential, and selecting GPT-5 from the model list. OpenAI API access requires separate billing from a paid ChatGPT subscription, and model changes should be tested through n8n evaluations before existing automations are migrated.

Transcript

So, OpenAI just dropped GBT5, which has taken the internet by storm today. It's been all over my LinkedIn, my ex, whatever I'm looking at. All I see is GBT5, and I see that it is killing all the other models in stuff like coding. So, of course, what I'm going to do today is break down these benchmarks and talk about why you need to switch out GBT5 ... Read More

Key Insights

  • GPT-5 is described as stronger than earlier GPT models in reasoning, coding, image handling, safe question answering, instruction following, factuality, long-context processing, and external tool use, all of which can affect an AI agent's reliability inside n8n workflows.
  • GPT-5 pricing is stated as $1.25 per million input tokens, approximately half the input cost of GPT-4o, while their output pricing is described as equal. The mini and nano variants are presented as still cheaper options for automation workloads.
  • The SWE-bench result is reported at almost 75 percent, meaning GPT-5 solved nearly three out of four real-world coding problems drawn from GitHub and exceeded the referenced OpenAI o3 reasoning model on that benchmark.
  • The Aider Polyglot result is reported at 88 percent, indicating that GPT-5 handled almost nine out of ten multilingual code-editing tasks in the cited benchmark and showed improved reliability for developers working across programming languages.
  • GPT-5 can be connected to n8n by adding an AI Agent node, attaching an OpenAI Chat Model, creating an OpenAI API credential, and selecting GPT-5 from the available model list before testing the agent through n8n's chat interface.
  • OpenAI API billing is separate from a paid ChatGPT subscription, so an existing $20-per-month ChatGPT plan does not automatically fund API requests. Billing information must be added in the API dashboard for the n8n credential to work.
  • OpenRouter provides access to models from OpenAI, Anthropic, Google, and other providers through a single platform. The presenter uses it for evaluations because it consolidates API access and billing instead of requiring a separate account setup for every provider.
  • n8n evaluations can compare GPT-5 with another model before a workflow is migrated. The presenter recommends changing models in a test environment first, then using explicit evaluation results to determine which option performs better for the intended automation.

Install to Summarize YouTube Videos and Get Transcripts

Explore YouTube Video Summarizer or Get YouTube Transcript Extractor

Questions & Answers

Q: How do you connect GPT-5 to an n8n AI Agent?

Add an AI Agent node in n8n, then use its chat model connector to add an OpenAI Chat Model. Create a new credential, paste in a secret API key generated through the OpenAI API platform, and save it. Finally, search the model list for GPT-5, select it, and send a test message through the agent's chat window.

Q: Do ChatGPT subscriptions include OpenAI API access for n8n?

A paid ChatGPT subscription does not automatically provide funded API access for an n8n workflow. The transcript specifically notes that even someone paying $20 per month for ChatGPT must separately add billing information to the OpenAI API dashboard. The secret API key connects n8n to the platform, while API usage is charged through that separate billing setup.

Q: Why is GPT-5 relevant to n8n AI automation?

GPT-5 is relevant because the model is described as improving instruction following, tool use, factuality, long-context handling, reasoning, coding, and image processing. Those abilities align with common n8n agent requirements, including interpreting complex prompts, choosing external tools, working across multiple messages, generating content, and taking actions through customized workflows with fewer errors.

Q: How much does GPT-5 input usage cost in the transcript?

The stated GPT-5 price is $1.25 per million input tokens. The presenter describes that amount as approximately half the input cost of GPT-4o and says the two models have the same output price, although the specific output amount is not provided. GPT-5 mini and nano are also described as substantially cheaper alternatives for automation tasks.

Q: What coding benchmark results are reported for GPT-5?

GPT-5 is reported to score almost 75 percent on SWE-bench, which the presenter interprets as solving nearly three out of four real-world coding problems sourced from GitHub. It is also reported to score 88 percent on Aider Polyglot, representing almost nine out of ten real-world, multilingual code-editing tasks in that evaluation.

Q: Why should GPT-5 be tested before replacing an existing model?

The presenter recommends switching models in a test environment before changing production automations. Even though GPT-5 and its smaller variants appear cheaper and perform strongly on the cited benchmarks, a controlled evaluation can reveal whether the model follows the specific workflow's instructions, calls the correct tools, and produces acceptable results for the actual business task.

Q: How can OpenRouter simplify model evaluations in n8n?

OpenRouter is presented as a platform that connects users to many AI models through one service. It can reduce account and billing fragmentation because a builder does not need separate arrangements for OpenAI, Anthropic, Google, and every other provider. In the demonstration, it is used to access models and prepare direct evaluations within n8n.

Q: What GPT-5 experiments are planned for the n8n demonstration?

The demonstration is organized around four activities: connecting GPT-5 to an n8n AI Agent, running an evaluation against another selected model, adding GPT-5 to an assistant with many available tools and giving it a demanding prompt, and testing image prompt generation against another result. The transcript ends while the evaluation setup is beginning, so final comparative outcomes are not provided.

Summary & Key Takeaways

  • GPT-5 is presented as an improved model for reasoning, coding, image handling, instruction following, factuality, long-context tasks, and external tool use. These capabilities are relevant to n8n because AI agents must interpret prompts, retain workflow context, select connected tools, and return dependable results while executing customized business automations.

  • To connect GPT-5, add an AI Agent node in n8n, attach an OpenAI Chat Model, and create a credential using a secret key from the OpenAI API platform. API access is separate from ChatGPT subscriptions, so billing information must be configured before the model can successfully answer messages inside the workflow.

  • The planned demonstrations cover connecting GPT-5 to an n8n agent, evaluating it against another model, testing a tool-rich assistant with a demanding prompt, and comparing image prompt generation. OpenRouter is introduced as an alternative that provides access to models from multiple companies through one account and a shared billing setup.


Read in Other Languages (beta)

Share This Summary 📚

Explore More Summaries from Nate Herk | AI Automation 📚