Two errors is not a bad build. Two errors is a build. The picture people carry in of this work is somebody typing a description and a finished system appearing, and that picture is what makes people give up at the first red border. The loop is build, run, read what came back, change one thing, run again, and that loop does not stop when it starts working.
Step 10Problem 1
The first run: the request is not authorised
What you seeClick Test workflow at the bottom of the canvas and the get the reviews node gets a red border. Click the red node and the panel shows what came back.
What you are readingTwo things come off that screen and they are the same two on every error you will ever see here. There is a number and there is a message. The number tells you whose fault it is: a number in the four hundreds means the problem is at your end, in the request you sent, and a number in the five hundreds means the problem is at their end and there is nothing for you to fix. This one is in the four hundreds, so it is yours. The message says the request is not authorised, which means the site did not accept who you said you were.
What actually happenedThe key was right. The name was wrong. The documentation asks for the key under one label and the header credential had been filled in with the label nearly every other service uses, typed from habit without reading the page. This is the single most common mistake in the whole business and it will get you at least once.
The fix
- Open the get the reviews node.
- Open the header auth credential from the Credential dropdown.
- Put the documentation tab next to it and compare the Name field character for character. Not the Value. The Name.
- Correct the Name, save the credential, and run it again.
The lessonThe fastest way to deal with almost any error in this thing: screenshot it, drop it into a model chat with one line saying what you were doing, and ask what is wrong. It comes back with what to change and where.
Step 11Problem 2
The second error: it says there are no reviews, and there are reviews
What you seeThe get the reviews node goes green. The request worked. And the agent output says it found no reviews.
What you are readingClick the tool and open the output panel. This is where the JSON at the top of this sheet stops being theory. Look at the shape of what came back. The answer did not arrive as a list of reviews. It arrived as one thing, with a count on it, and a page number, and a status. And then there is a name called reviews, with the whole list stepped in underneath it. That stepping in is exactly the thing to watch for. The reviews are in there. They are one level down, and they belong to that name. The agent was handed the outside of the parcel and told you the parcel was empty.
What actually happenedNothing is broken. The site wrapped its answer, which almost every API does, and nobody told the agent which part of the wrapper to look inside.
The fix
- Open the get the reviews node and scroll to the bottom.
- Switch Optimize Response on. It is off by default.
- Expected Response Type appears. Leave it on JSON.
- Field Containing Data appears underneath. Type the name the list sits under, which here is reviews. The placeholder in that box reads "e.g. records" and the hint under it says leave blank to use the whole response, which is what was happening before.
- Include Fields is optional and worth knowing: leave it on All, or set it to Selected and list only the fields you actually need, which cuts what the model has to read and what it costs you.
- Run it again. All green, and the output panel fills with drafted replies.
The lessonThat is the shape of nearly every problem you will hit. The thing you connected works. What it hands back is not in the shape the next thing wanted. Almost all of the debugging in this kind of build is fitting the output of one thing to the input of another, and the way you find it is always the same: open the panel and read what came back.
After the runProblem 3
The near miss: it told a customer something was fixed when it was not
What you seeNothing goes red. The run is green and the drafts look good. Read them anyway, and one of them, a reply to a man angry about waiting three weeks for a part, contains a sentence saying the garage has fixed the problem with parts. The ledger says open.
What you are readingLook at the step log for that run. read the ledger was used, once, at the start. The agent read the ledger. The information was in front of it. It still wrote that the problem was fixed, because that is the reassuring thing a reply normally says.
What actually happenedGo back and look at what the instructions said: read the ledger before writing anything. They never said the status column is the only thing allowed to decide that sentence. The agent did nothing wrong. A tool was connected and it was assumed the tool would settle it, and a connected tool is not a used tool.
The fix
- Open the AI Agent node and the System Message under Options.
- Scroll to CONSTRAINTS and add the line in the box below it, as a rule with no room in it.
- Save and run the same review again. This time the reply says what is being done and does not claim it is finished.
The lessonThis is what guardrails from watching means. That rule could not have been written before the run, because before the run nobody knew the agent would reach for that sentence. It was found by reading what it wrote, and reading what it wrote is the only place it was ever going to show up. If a reply like that goes out, the business has told an angry customer in writing that something is solved when it is not, and the next time he waits three weeks he has that sentence to wave at them.
What you seeWhat it means, and what to do
A number in the 400sThe problem is in the request you sent. Your key, your address, your parameter names. Read the message next to the number and check them against the documentation.
A number in the 500sThe problem is at their end. There is nothing for you to fix. Wait and run it again.
401 or 403Authentication. Either the key is wrong, or the header Name is wrong, or the key does not have permission for that particular function. Check the Name first, because that is the one that is usually wrong.
429Too many requests, too quickly. You have hit the site’s rate limit. Run it less often, or ask for fewer things at a time.
A message about quota, credit or billing from the modelYour API balance, not your chat subscription. Two separate accounts. Fix it on the billing page of the model provider’s developer platform, not in n8n.
The agent never uses a tool you connectedIts Description is vague, or its Description is still the automatic one. Rewrite it to say plainly what the tool is for and when to reach for it, and name the tool in the TOOLS section of the System Message using exactly the name on the node.
The agent goes round and roundLower Max Iterations under Options on the agent node. It is 10 by default. Then work out what it kept retrying and why, because the number is a stop, not a cure.
The column boxes do not appear on the Google Sheets toolSet Document and Sheet using From list rather than by URL or ID, and check the tab has a header row in row 1.
The workflow ran at the wrong hourTimezone. On a self-hosted Docker install that is GENERIC_TIMEZONE in the run command. The Schedule Trigger is doing what it was told.
The whole thing stops working after you change the modelIt usually will not, and if it does, it is the instructions rather than the wiring. A smaller or cheaper model needs the System Message to be blunter. Shorten the sentences and make the constraints absolute.