Why this matters
A form is easy to build. The hard part is what happens next. A $2,500 installation and a $90 repair should not land in the same place, and an emergency should reach the owner right away, whatever the budget.
Without rules, someone reads every request and decides by hand. With an If node and a Switch node, n8n decides for you.
In this module you help Harbor Point Handyman. Their service form already works, and two actions are ready: an email to the owner and a row in the request log. You add the part that decides.
What you’ll build
A workflow where every request finds its own way. A Switch sends Emergency requests straight to the owner and Repair requests on to an If node, and anything else goes to a Fallback output. The If node sends budgets over $1,000 to the owner and everything else to the log.
You check the data on each branch, so you know a request was not dropped, and publish.
What you need
- Nothing to start the practiceThe form, the email and the log are practice copies. Harbor Point Handyman and the request are made up.
- An n8n account, to do it for realSign up with this link (affiliate link: I may earn a commission, at no cost to you).
- A form with Name, Service and Budget fieldsBuilt with the n8n form trigger. Service is a drop-down with Repair, Installation and Emergency. Budget is a number.
- A Google Sheet for the request logMake one with a column for each field, such as Name, Service and Budget, in row 1. Connect Google Sheets in the Append row in sheet step by choosing Sign in with Google.
- Gmail connectedIn the Send a message step, create the Gmail credential and sign in with Google. Use the owner’s real address in the To field.
Concepts
3 ideas you’ll use in the practice.
If asks a yes or no question
An If node has one condition and two outputs, true and false. Each item goes down one branch or the other, never both.
Here the condition is: Budget, Number, is greater than 1000. Drag the Budget field into the first box, choose the comparison, type the limit, and click Execute step to try it on the test request. Connect true to the owner’s email and false to the log.
Switch sends each item to one of several outputs
A Switch in Rules mode has one rule per output. Rule one: Service is equal to Repair. Rule two: Service is equal to Emergency. Switch on Rename Output and name them Repair and Emergency, so you can read the canvas.
Put it on the line between the form and the If node. Repair still goes through the budget check. Emergency goes straight to the owner.
Always set a Fallback Output
By default an item that matches no rule is dropped, and nobody knows. Under Options, add Fallback Output and choose Extra Output. Now installations and anything unexpected come out of a Fallback output, and you connect it to the log.
If a number arrives as text, for example from a webhook, switch on Convert types where required so the comparison still works.
Practice
Do every step yourself in a practice copy of the real tool. It checks your work, and “Do it for me” finishes any step you get stuck on.
Do it for real
Now repeat it in your own account. Tick each step as you go.
Quick check
3 questions to check you’ve got it.
1. A request with a $2,500 budget goes through the If node. Which branch does it take?
- False
- True
- Both
Show the answer
True. 2500 is greater than 1000. An item takes one branch or the other, never both.
2. Why set the Switch’s Fallback Output to Extra Output?
- So requests that match no rule are not silently dropped
- To make the form faster
- To rename the outputs
Show the answer
So requests that match no rule are not silently dropped. The default is None, which ignores unmatched items. Extra Output gives them their own output to connect.
3. Where does the Switch go if repairs must still get the budget check?
- After the If node
- Between the form and the If, with Repair connected to the If
- In place of the form
Show the answer
Between the form and the If, with Repair connected to the If. The form feeds the Switch, and the Repair output feeds the If node.
n8n: Summarize Customer Emails with OpenAI
Your workflow can route work. Last, add your first AI step: a one-line summary and next step for every customer email, with OpenAI.
Start module 10 →