I'm encountering an issue with the Information Extractor node. The problem arises when attempting to validate a date field using the format: "date" option within the node's schema. The issue seems to be related to the version of Zod currently used by n8n, which is 3.22.4. This version of Zod does not support date format validation, which is a feature introduced in Zod version 3.23.0. This incompatibility is causing the date format validation to fail.
To Reproduce
Create a Workflow:
In n8n version 1.54.0, start by creating a new workflow.
Add the Information Extractor Node:
Incorporate an Information Extractor node into the workflow.
Define the Schema:
Within the Information Extractor node, define the following schema that includes a start_date field:
{
"start_date": {
"type": "string",
"format": "date",
"description": "Start date of availability"
}
}
Execute the Workflow:
Run the workflow to observe the behavior.
Observed Error:
Upon execution, the following error message is encountered:
z.string(...).date is not a function [line 5]
TypeError
This issue arises because the zod version currently used in n8n (v3.22.4) does not support the date format in schemas. Support for this feature was introduced in zod version v3.23.0.
For more details, refer to the related issue on GitHub: Zod Issue #3387.
Expected behavior
The Information Extractor node should successfully validate the start_date field as a date, given the format: "date" specification in the schema.
Bug Description
I'm encountering an issue with the Information Extractor node. The problem arises when attempting to validate a date field using the
format: "date"
option within the node's schema. The issue seems to be related to the version of Zod currently used by n8n, which is3.22.4
. This version of Zod does not support date format validation, which is a feature introduced in Zod version3.23.0
. This incompatibility is causing the date format validation to fail.To Reproduce
Create a Workflow:
Add the Information Extractor Node:
Define the Schema:
start_date
field:Execute the Workflow:
Observed Error:
Upon execution, the following error message is encountered:
This issue arises because the
zod
version currently used in n8n (v3.22.4
) does not support thedate
format in schemas. Support for this feature was introduced inzod
versionv3.23.0
.For more details, refer to the related issue on GitHub: Zod Issue #3387.
Expected behavior
The Information Extractor node should successfully validate the
start_date
field as a date, given theformat: "date"
specification in the schema.Operating System
Alpine Linux v3.20
n8n Version
1.52.0
Node.js Version
20.15.0
Database
PostgreSQL
Execution mode
queue