Connected enterprise systems representing an n8n business automation workflow

Build a Useful Business Workflow with n8n

Tutorials

Workflow Automation

Build a real enquiry-routing workflow that collects a request, cleans its data, identifies urgent work, and emails the correct team—without hiding the important operational decisions behind unnecessary complexity.

Level: Beginnern8n Form TriggerData validationConditional routingEmail notificationRead: 15–20 min

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.

Keep the first version narrow: automate one clear decision and one dependable outcome. Add CRM records, spreadsheets, AI classification, or chat notifications only after the basic flow works.

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:

FieldTypeRequired?Reason
NameTextYesIdentifies the requester.
Business emailEmailYesSupports follow-up.
CompanyTextNoAdds useful business context.
RequestTextareaYesExplains the required outcome.
PriorityDropdownYesProvides 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

  1. Add the n8n Form Trigger node.
  2. Set the form title to Request Business Support.
  3. Add the five fields from the table above. Make Name, Business email, Request, and Priority required.
  4. For Priority, add two options: Standard and Urgent.
  5. 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.

Check the actual output: open the successful execution and inspect the JSON field names. Later expressions must use those exact names, including capitalization and spaces.

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 fieldExpression 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:

  1. priority is equal to Urgent.
  2. request contains outage, 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

TestExpected result
Priority = UrgentOnly the priority email is sent.
Standard + request contains “outage”Priority email is sent.
Standard normal requestOnly the general email is sent.
Uppercase email and surrounding spacesEmail is trimmed and converted to lowercase.
Company omittedEmail displays “Not provided.”
Required field omittedForm 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

  1. Give every node a meaningful name.
  2. Save the workflow and run the test matrix once more.
  3. Replace test recipients with approved operational addresses.
  4. Activate or publish the workflow using the control shown by your n8n version.
  5. Open the production form URL in a private browser window and submit one final request.
  6. 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.
Automation does not remove accountability: the business remains responsible for the routing rule, data access, response times, and actions taken after the notification.

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.

Explore Workflow Automation Discuss an n8n Workflow

Free consultation