What I Learned Comparing Claude and GPT Before Choosing One for an n8n Workflow

While building an LLM comparison tool, one thing has consistently surprised me: there is no model that is simply “best” for every topic. Depending on the task, one model or the other can produce the better result.

That matters in n8n. Once an LLM is placed inside an automation, the choice is not only about which answer sounds better. Format reliability, latency, and cost can all affect whether the workflow succeeds.

I tested one small, realistic customer-support step before building the complete workflow. The task was to classify a customer message, draft a reply, and return JSON for the next n8n node.

The workflow idea

The intended workflow would:

  1. Receive a support message.
  2. Ask an LLM to classify it and draft a reply.
  3. Check that the response has the expected format.
  4. Route urgent billing cases to a human.
  5. Continue valid responses and send invalid ones to a retry or review path.

To make the comparison fair, I sent every model the same prompt and customer message:

You are the classification and reply-drafting step in an n8n
customer-support workflow.

Return valid JSON only: no markdown, code fences, commentary, or extra
keys. Use exactly this schema and key order:
{"priority":"low|normal|urgent","category":"billing|bug|account|other",
"summary":"18 words maximum","reply":"70 words maximum",
"needs_human":true|false}

Mark priority as urgent when the customer is blocked on work due within
24 hours. Set needs_human to true for a payment or credit problem that
the customer cannot fix with basic account steps.

Customer message: "I bought a $50 credit pack about 30 minutes ago, but
my balance still says zero. I signed out and back in and refreshed twice.
I have a client demo in two hours and need to compare two models before
then. Can you get the credits added?"

For each response, I checked four things:

  • Was the priority urgent?
  • Was the category billing?
  • Was needs_human set to true?
  • Could the untouched response be parsed as JSON in the requested structure?

What happened in five runs

I ran the prompt five times with Claude Haiku 4.5 and GPT-5.6 Luna on July 25, 2026.

Both models made the correct routing decision in all five runs. The important difference was the output format. In this small test, Claude wrapped its responses in Markdown json code fences. The JSON inside was valid, but the complete raw response could not be passed directly to JSON.parse().

GPT returned the JSON without a Markdown wrapper in all five runs.

Model Correct routing Strict-format passes Average latency Average estimated model cost
Claude Haiku 4.5 5/5 0/5 1.76 s $0.00074
GPT-5.6 Luna 5/5 5/5 2.32 s $0.00107

This is not a universal benchmark. It is a five-run snapshot of one prompt. Provider load affects latency, and pricing and token usage affect cost.

For this particular step, GPT looked like the safer starting choice because its raw response satisfied the complete format contract. Claude was faster and slightly cheaper. With reliable structured-output handling, it might still be the better choice for a workflow where speed or cost matters more.

That is exactly what I find interesting: the “winner” can change when the topic or workflow requirement changes.

How I would test before choosing a model

I am still learning the best way to implement validation and fallback handling in n8n, so I do not want to pretend that I already have the perfect production pattern. Based on this experiment, however, I would not choose a model from a single good-looking response.

My practical checklist would be:

  1. Test the smallest real task from the workflow, not a generic prompt.
  2. Keep the prompt and settings identical for every model.
  3. Run 10–20 varied examples, including ambiguous and urgent cases.
  4. Score decision quality and the untouched output format separately.
  5. Record latency and estimated cost for each run.
  6. Add a validation and retry or human-review path before allowing the output to control later nodes.
  7. Repeat the test whenever the prompt or model changes.

The main lesson for me is that n8n builders should test different models before committing to one. The best choice depends on the actual topic and on what the workflow values most: response quality, strict formatting, speed, cost, or some balance between them.

I would also be interested to learn how experienced n8n builders handle this. Do you validate LLM JSON in a Code node, use structured-output features, retry with the same model, or fall back to another model?

Disclosure: I built Prompt Compare, the workspace I used for this experiment. It currently supports OpenAI and Anthropic models; Gemini was not part of this test. I used AI as an editing aid to organize this post, and I reviewed and revised the observations and conclusions in my own words.

3 curtidas

Thank you so much for sharing this! It really underlines what I’ve experienced as well: there’s no one-size-fits-all solution, and choosing the right model based on the specific use case makes a lot of sense.

Regarding your question: I used to put a post-processing node behind every LLM node to make sure the downstream workflow wouldn’t break because of unexpected formatting. That was the cleanest way I found to build robust workflows back then.

Nowadays, I’m using a tool that enforces the schema I define, which makes this much easier to handle. It’s specifically built for document processing, so if you’re interested, just let me know!