Get startedGet started for free

Raise custom error messages

Acme Events processes campaign requests with a budget field. Invalid data like negative or missing budgets can break automations and corrupt Acme's CRM.

In this exercise, you'll validate the budget field to catch bad data early. After the Code node, add an If node to check if budget is less than 0 OR empty. Route invalid records (false branch) to a Stop and Error node with a custom message, ensuring the workflow halts when budgets don't meet Acme's criteria.

This exercise is part of the course

Introduction to Workflow Automation with n8n

View Course

Hands-on interactive exercise

Turn theory into action with one of our interactive exercises

Start Exercise