An n8n workflow takes a daily inventory file and updates a staging sheet. If the file lacks a report date, stop before the write step. Route that validation condition to a Stop And Error node with a specific message, such as Inventory export is missing report_date. The message can name the missing field without including the imported data.
Create a separate workflow that starts with Error Trigger and sends a message to a test channel or writes to a test log. Select this error workflow in the importer settings. Include the originating workflow name and the error message. An execution link can help an operator open the run when n8n provides one, but keep the message useful if the link is missing.
Test from the real trigger path
Run the active importer through its trigger using a file without a date. Check that it reports the validation problem once and leaves the staging sheet unchanged. Then deliver a valid fixture and check that it writes the expected rows. Trigger failures can provide different fields from ordinary execution failures, so use a test message with a missing execution link before sharing the alert with the team.
Make the alert useful when execution details are missing
In the notification workflow, take the workflow name from workflow.name. For a failure after the importer starts, use the message in execution.error.message. A trigger failure can instead carry a message under trigger.error.message. Add the execution link only when the alert data includes one. Give the operator a fallback instruction to open the named importer and check its recent activity.
For the missing-date fixture, the alert should name the importer, state that report_date is missing, and tell the operator to correct the source file before retrying. Compare the staging row count before and after the failed run to confirm that the validation stopped the write.
