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.
Este exercício faz parte do curso
Introduction to Workflow Automation with n8n
Exercício interativo prático
Transforme a teoria em ação com um de nossos exercícios interativos
Começar o exercício