n8n Community Post: AI Agent Only Validates First Field, Skips Subsequent Validations
Issue Description
I’m building an AI agent workflow to collect customer information (name, phone, email) with validation. The agent successfully validates the name field using the inputValidatorWebhook tool, but then skips validation entirely for phone and email fields, proceeding directly to the next phase without calling the validation tool.
Expected Behavior
The agent should:
-
Ask for name → Call
inputValidatorWebhookwith type=“name” → Store formatted result -
Ask for phone → Call
inputValidatorWebhookwith type=“phone” → Store formatted result -
Ask for email → Call
inputValidatorWebhookwith type=“email” → Store formatted result -
Return all three validated values
Actual Behavior
The agent:
-
Asks for name → Calls inputValidatorWebhookwith type=“name” → Stores formatted result -
Asks for phone → Skips validation tool → Proceeds to email question -
Asks for email → Skips validation tool → Exits without validating
System Prompt Structure
markdown
### Step 2: Collect Customer Phone
Ask: "What is the customer's phone number?"
Wait for user response.
**When user provides input:**
1. Call `inputValidatorWebhook` with:
- type: "phone"
- value: [user's input]
2. Wait for tool response
**Process validation response:**
[validation logic here]
### Step 3: Collect Customer Email
Ask: "What is the customer's email address?"
Wait for user response.
**When user provides input:**
1. Call `inputValidatorWebhook` with:
- type: "email"
- value: [user's input]
2. Wait for tool response
**Process validation response:**
[validation logic here]
What I’ve Tried
-
Verified the tool is configured correctly (works for name field)
-
Added explicit “CRITICAL RULES” stating validation must happen for all fields
-
Used identical prompt structure for all three fields
-
Confirmed the agent reaches Step 2 and Step 3 (asks the questions)
Question
Why would the AI agent call the validation tool for the first field but not for subsequent fields, even when the prompt instructions are identical? Is there a way to force sequential tool execution for each step, or does this suggest an issue with how the agent maintains context across multiple tool calls?
Any insights would be appreciated!