/** * Extract from File Node - Version 1 * Convert binary data to JSON */ export interface ExtractFromFileV1Params { operation?: 'csv' | 'html' | 'fromIcs' | 'fromJson' | 'ods' | 'pdf' | 'rtf' | 'text' | 'xml' | 'xls' | 'xlsx' | 'binaryToPropery'; /** * Input Binary Field * @hint The name of the input field containing the file data to be processed * @displayOptions.show { operation: ["csv", "html", "rtf", "ods", "xls", "xlsx"] } * @default data */ binaryPropertyName?: string | Expression | PlaceholderValue; /** * Options * @displayOptions.show { operation: ["csv", "html", "rtf", "ods", "xls", "xlsx"] } * @default {} */ options?: { /** Set the field delimiter, usually a comma * @displayOptions.show { /operation: ["csv"] } * @default , */ delimiter?: string | Expression | PlaceholderValue; /** Encoding * @displayOptions.show { /operation: ["csv"] } * @default utf-8 */ encoding?: 'ascii' | 'latin1' | 'ucs-2' | 'ucs2' | 'utf-8' | 'utf16le' | 'utf8' | Expression; /** Whether to detect and exclude the byte-order-mark from the CSV Input if present * @displayOptions.show { /operation: ["csv"] } * @default false */ enableBOM?: boolean | Expression; /** Whether to handle unclosed quotes in CSV fields as part of the field's content instead of throwing a parsing error * @displayOptions.show { /operation: ["csv"] } * @default false */ relaxQuotes?: boolean | Expression; /** Whether the first row of the file contains the header names * @displayOptions.show { /operation: ["ods", "xls", "xlsx", "csv", "html"] } * @default true */ headerRow?: boolean | Expression; /** Whether to include empty cells when reading from file. They will be filled with an empty string. * @displayOptions.show { /operation: ["ods", "xls", "xlsx", "csv", "html"] } * @default false */ includeEmptyCells?: boolean | Expression; /** Stop handling records after the requested number of rows are read. Use -1 if you want to load all rows. * @displayOptions.show { /operation: ["csv"] } * @default -1 */ maxRowCount?: number | Expression; /** The range to read from the table. If set to a number it will be the starting row. If set to string it will be used as A1-style notation range. * @displayOptions.show { /operation: ["ods", "xls", "xlsx"] } */ range?: string | Expression | PlaceholderValue; /** Whether to return RAW data, instead of parsing it * @default false */ rawData?: boolean | Expression; /** In some cases and file formats, it is necessary to read as string to ensure special characters are interpreted correctly * @default false */ readAsString?: boolean | Expression; /** Name of the sheet to read from in the spreadsheet * @displayOptions.show { /operation: ["ods", "xls", "xlsx"] } * @default Sheet */ sheetName?: string | Expression | PlaceholderValue; /** Start handling records from the requested line number. Starts at 0. * @displayOptions.show { /operation: ["csv"] } * @default 0 */ fromLine?: number | Expression; /** Skip Records With Errors * @displayOptions.show { /operation: ["csv"] } * @default {"value":{"enabled":true,"maxSkippedRecords":-1}} */ skipRecordsWithErrors?: { /** Value */ value?: { /** Whether to skip records with errors when reading from file * @default false */ enabled?: boolean | Expression; /** The maximum number of records that can be skipped, will throw an error if exceeded. Set to -1 to remove limit. * @default -1 */ maxSkippedRecords?: number | Expression; }; }; /** Whether to strip the BOM (Byte Order Mark) from the file, this could help in an environment where the presence of the BOM is causing issues or inconsistencies * @displayOptions.show { encoding: ["utf8", "cesu8", "ucs2"] } * @default true */ stripBOM?: boolean | Expression; /** Keep Source * @default json */ keepSource?: 'json' | 'binary' | 'both' | Expression; /** Whether to join the text from all pages or return an array of text from each page * @default true */ joinPages?: boolean | Expression; /** Maximum number of pages to include * @default 0 */ maxPages?: number | Expression; /** Prowide password, if the PDF is encrypted */ password?: string | Expression | PlaceholderValue; }; /** * The name of the output field that will contain the extracted data * @displayOptions.show { operation: ["binaryToPropery", "fromJson", "text", "fromIcs", "xml"] } * @default data */ destinationKey?: string | Expression | PlaceholderValue; } interface ExtractFromFileV1NodeBase { type: 'n8n-nodes-base.extractFromFile'; version: 1; } export type ExtractFromFileV1ParamsNode = ExtractFromFileV1NodeBase & { config: NodeConfig; }; export type ExtractFromFileV1Node = ExtractFromFileV1ParamsNode;