1. What You Will Build
Imagine a consultancy, software company, or internal operations team receiving requests through a shared form. Ordinary requests should reach the general team. Urgent requests—such as an outage or a blocked operation—must be clearly marked and sent to a priority mailbox.
n8n Form Trigger
-> Edit Fields (clean and standardize)
-> If (is this urgent?)
-> true: Send Email to priority team
-> false: Send Email to general team
This small workflow teaches the foundation of most useful automations: trigger, validate, transform, decide, act, and monitor.
2. What You Need
- An n8n Cloud workspace or a properly secured self-hosted n8n instance.
- An SMTP or supported email account that n8n may use to send notifications.
- Two receiving addresses for testing: a general inbox and a priority inbox. They may temporarily be the same address.
- Permission to process the form data you plan to collect.
For a first attempt, n8n Cloud avoids infrastructure setup. Self-hosting gives more control, but it also makes you responsible for HTTPS, authentication, backups, upgrades, encryption keys, network access, and monitoring.
Create a new workflow and name it Business Enquiry Routing – Tutorial. Clear names make execution logs and later support much easier.
3. Define the Rules Before Adding Nodes
Write the rule in plain language first:
A request is priority when the visitor selects “Urgent” or the description contains the word “outage.” Everything else follows the standard route.
Decide the minimum information required:
| Field | Type | Required? | Reason |
|---|---|---|---|
| Name | Text | Yes | Identifies the requester. |
| Business email | Yes | Supports follow-up. | |
| Company | Text | No | Adds useful business context. |
| Request | Textarea | Yes | Explains the required outcome. |
| Priority | Dropdown | Yes | Provides Standard and Urgent choices. |
Do not collect passwords, access tokens, payment-card data, medical data, or other sensitive information in a general enquiry form.
4. Create the Form Trigger
- Add the n8n Form Trigger node.
- Set the form title to Request Business Support.
- Add the five fields from the table above. Make Name, Business email, Request, and Priority required.
- For Priority, add two options: Standard and Urgent.
- Select Test Step or open the node’s test form URL, submit realistic sample data, and return to the editor.
The Form Trigger provides separate test and production behavior. Use the test URL while editing. The production URL is intended for an active workflow.
5. Clean and Standardize the Submitted Data
Add an Edit Fields (Set) node after the Form Trigger. Rename it Normalize Enquiry. Create clear output fields instead of passing unpredictable labels through the rest of the workflow.
| Output field | Expression idea |
|---|---|
requesterName | {{ $json["Name"].trim() }} |
requesterEmail | {{ $json["Business email"].trim().toLowerCase() }} |
company | {{ ($json["Company"] || "Not provided").trim() }} |
request | {{ $json["Request"].trim() }} |
priority | {{ $json["Priority"] }} |
receivedAt | {{ $now }} |
If your form produces different field labels, drag the values from the input panel instead of copying these expressions blindly. Execute this node and confirm that every output field contains the expected value.
6. Route Urgent Requests with an If Node
Add an If node after Normalize Enquiry and rename it Priority?. Configure an OR decision with these conditions:
priorityis equal toUrgent.requestcontainsoutage, using a case-insensitive comparison when the selected operation supports it.
Run two examples:
- Urgent: “Our customer portal has an outage.” This must leave the true output.
- Standard: “We need an inventory dashboard proposal.” This must leave the false output.
Rule-based routing is deliberately used here because it is easy to explain, test, and audit. AI classification can be added later for ambiguous requests, but it should include confidence handling and a safe fallback.
7. Send Clear Email Notifications
Add one email-sending node to each If output. Depending on your account, use Send Email with SMTP or the supported Gmail/Microsoft Outlook node. Create credentials through n8n’s credential interface; never paste secrets into expressions or node names.
True output: priority notification
To: priority-team@example.com
Subject: [URGENT] {{ $json.company }} — new business request
Name: {{ $json.requesterName }}
Email: {{ $json.requesterEmail }}
Company: {{ $json.company }}
Received: {{ $json.receivedAt }}
Request:
{{ $json.request }}
False output: standard notification
To: enquiries@example.com
Subject: New enquiry from {{ $json.company }}
Name: {{ $json.requesterName }}
Email: {{ $json.requesterEmail }}
Company: {{ $json.company }}
Received: {{ $json.receivedAt }}
Request:
{{ $json.request }}
During testing, send both branches to an address you control. Replace test recipients only after content and routing have been reviewed.
8. Test the Workflow Systematically
| Test | Expected result |
|---|---|
| Priority = Urgent | Only the priority email is sent. |
| Standard + request contains “outage” | Priority email is sent. |
| Standard normal request | Only the general email is sent. |
| Uppercase email and surrounding spaces | Email is trimmed and converted to lowercase. |
| Company omitted | Email displays “Not provided.” |
| Required field omitted | Form prevents submission. |
For each test, inspect the complete execution path and node output—not only the received email. Failed and successful executions should be understandable to someone who did not build the workflow.
9. Activate It Safely
- Give every node a meaningful name.
- Save the workflow and run the test matrix once more.
- Replace test recipients with approved operational addresses.
- Activate or publish the workflow using the control shown by your n8n version.
- Open the production form URL in a private browser window and submit one final request.
- Confirm that the production execution and email both succeed.
A production trigger does not behave like the editor’s temporary test listener. If a production URL returns nothing, first confirm that the correct workflow version is active.
10. Production Checklist
- Ownership: assign a named owner for workflow failures and business-rule changes.
- Credentials: use least-privilege service credentials and rotate them under an approved process.
- Privacy: collect only necessary fields and define execution-data retention.
- Abuse protection: protect public forms and webhooks with suitable rate limits, validation, and upstream controls.
- Error handling: create an error workflow or alert so failed executions do not disappear silently.
- Change control: export or version workflows before material edits; test changes away from production where practical.
- Monitoring: review failed executions, delivery failures, unexpected volume, and routing accuracy.
- Human fallback: give users another contact route when automation is unavailable.
11. Troubleshooting
The expression returns undefined
Inspect the previous node’s JSON. Match the real field name exactly or drag the value from the input panel.
Both tests follow the wrong branch
Confirm the If node uses OR rather than AND, check for extra spaces, and verify case-sensitivity.
The test form works but the production form does not
Confirm that the workflow is active and that you are using its production URL.
Email authentication fails
Recheck the selected credential, provider permissions, SMTP host and port, TLS requirements, and sender restrictions.
The workflow runs twice
Check whether the form was submitted twice, whether more than one workflow listens to the same source, and whether retry behavior duplicated a non-idempotent action.
Official n8n References
12. Where to Go Next
Once this workflow is dependable, add one improvement at a time: save enquiries to a CRM or approved data store, send an acknowledgement to the requester, add an SLA timer, or route by service category. Test each new branch as carefully as the first.
