n8n-io/n8n · error · NodeOperationError
At least one attribute must be specified
Error message
At least one attribute must be specified
What it means
Thrown by the Information Extractor node when schemaType is 'fromAttributes' but the 'attributes.attributes' fixedCollection is empty. The node builds a Zod schema from the user-supplied attribute definitions; with zero attributes the schema (and the extraction task) would be empty, so it refuses to proceed.
Source
Thrown at packages/@n8n/nodes-langchain/nodes/chains/InformationExtractor/InformationExtractor.node.ts:251
0,
)) as BaseLanguageModel;
const schemaType = this.getNodeParameter('schemaType', 0, '') as
| 'fromAttributes'
| 'fromJson'
| 'manual';
let parser: OutputFixingParser<object>;
if (schemaType === 'fromAttributes') {
const attributes = this.getNodeParameter(
'attributes.attributes',
0,
[],
) as AttributeDefinition[];
if (attributes.length === 0) {
throw new NodeOperationError(this.getNode(), 'At least one attribute must be specified');
}
parser = OutputFixingParser.fromLLM(
llm,
StructuredOutputParser.fromZodSchema(makeZodSchemaFromAttributes(attributes)),
);
} else {
let jsonSchema: JSONSchema7;
if (schemaType === 'fromJson') {
const jsonExample = this.getNodeParameter('jsonSchemaExample', 0, '') as string;
// Enforce all fields to be required in the generated schema if the node version is 1.2 or higher
const jsonExampleAllFieldsRequired = this.getNode().typeVersion >= 1.2;
jsonSchema = generateSchemaFromExample(jsonExample, jsonExampleAllFieldsRequired);
} else {
const inputSchema = this.getNodeParameter('inputSchema', 0, '') as string;
jsonSchema = jsonParse<JSONSchema7>(inputSchema);View on GitHub (pinned to 5ac6606e81)
Solutions
- On the Information Extractor node, add at least one attribute row under 'Attributes' (each with a name and description).
- If you have no attributes to define, switch the Schema Type to 'fromJson' or 'manual' and supply a JSON schema instead.
- Verify the attributes were not lost during a workflow import/export.
Example fix
// before
if (attributes.length === 0) {
throw new NodeOperationError(this.getNode(), 'At least one attribute must be specified');
}
// after — suggest the alternative schema sources
if (attributes.length === 0) {
throw new NodeOperationError(this.getNode(), {
message: 'At least one attribute must be specified when Schema Type is From Attributes.',
description: 'Add attribute rows, or switch Schema Type to From JSON / Manual.',
});
} Defensive patterns
Strategy: validation
Validate before calling
if (schemaType === 'fromAttributes') {
const attributes = this.getNodeParameter('attributes.attributes', 0, []) as AttributeDefinition[];
if (attributes.length === 0) {
throw new Error('Add at least one attribute, or switch Schema Type to From JSON / Manual');
}
} Type guard
function hasAttributes(a: unknown[]): a is AttributeDefinition[] {
return Array.isArray(a) && a.length > 0;
} Prevention
- When choosing 'From Attributes', immediately add at least one attribute row.
- Switch to From JSON / Manual if you have no discrete attributes.
- Validate workflow imports include the attributes fixedCollection.
When it happens
Trigger: User selected 'From Attributes' as the schema source on the Information Extractor but added zero attribute rows. The attributes array length is 0 and the guard throws.
Common situations: User forgot to add attributes; attributes were removed but schema source not switched; workflow imported with the attributes fixedCollection cleared.
Related errors
- Text for item ${itemIndex} is not defined
- At least one category must be defined
- The ‘text‘ parameter is empty.
- Invalid message type. Only imageBinary and imageUrl are supp
- No binary data set.
AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12).
Data as JSON: /api/errors/4d8b5557d36edc08.
Report an issue: GitHub.