/** * Remove Duplicates Node - Version 2 * Delete items with matching field values */ export interface RemoveDuplicatesV2Params { operation?: 'removeDuplicateInputItems' | 'removeItemsSeenInPreviousExecutions' | 'clearDeduplicationHistory'; /** * The fields of the input items to compare to see if they are the same * @displayOptions.show { operation: ["removeDuplicateInputItems"] } * @default allFields */ compare?: 'allFields' | 'allFieldsExcept' | 'selectedFields' | Expression; /** * Fields in the input to exclude from the comparison * @displayOptions.show { compare: ["allFieldsExcept"] } */ fieldsToExclude?: string | Expression | PlaceholderValue; /** * Fields in the input to add to the comparison * @displayOptions.show { compare: ["selectedFields"] } */ fieldsToCompare?: string | Expression | PlaceholderValue; /** * How to select input items to remove by comparing them with key values previously processed * @displayOptions.show { operation: ["removeItemsSeenInPreviousExecutions"] } * @default removeItemsWithAlreadySeenKeyValues */ logic?: 'removeItemsWithAlreadySeenKeyValues' | 'removeItemsUpToStoredIncrementalKey' | 'removeItemsUpToStoredDate'; /** * Use an input field (or a combination of fields) that has a unique ID value * @hint The input field value to compare between items * @displayOptions.show { logic: ["removeItemsWithAlreadySeenKeyValues"], /operation: ["removeItemsSeenInPreviousExecutions"] } */ dedupeValue?: string | Expression | PlaceholderValue; /** * Use an input field (or a combination of fields) that has an incremental value * @hint The input field value to compare between items, an incremental value is expected * @displayOptions.show { logic: ["removeItemsUpToStoredIncrementalKey"], /operation: ["removeItemsSeenInPreviousExecutions"] } */ incrementalDedupeValue?: number | Expression; /** * Use an input field that has a date value in ISO format * @hint The input field value to compare between items, a date is expected * @displayOptions.show { logic: ["removeItemsUpToStoredDate"], /operation: ["removeItemsSeenInPreviousExecutions"] } */ dateDedupeValue?: string | Expression; /** * How you want to modify the key values stored on the database. None of these modes removes input items. * @displayOptions.show { operation: ["clearDeduplicationHistory"] } * @default cleanDatabase */ mode?: 'cleanDatabase' | Expression; /** * Options * @displayOptions.show { operation: ["removeDuplicateInputItems", "removeItemsSeenInPreviousExecutions", "clearDeduplicationHistory"] } * @default {} */ options?: { /** Whether to disallow referencing child fields using `parent.child` in the field name * @displayOptions.show { /operation: ["removeDuplicateInputItems"] } * @displayOptions.hide { /compare: ["allFields"] } * @default false */ disableDotNotation?: boolean | Expression; /** Whether to remove any fields that are not being compared. If disabled, will keep the values from the first of the duplicates. * @displayOptions.show { /operation: ["removeDuplicateInputItems"] } * @displayOptions.hide { /compare: ["allFields"] } * @default false */ removeOtherFields?: boolean | Expression; /** If set to ‘workflow,’ key values will be shared across all nodes in the workflow. If set to ‘node,’ key values will be specific to this node. * @displayOptions.show { /operation: ["clearDeduplicationHistory", "removeItemsSeenInPreviousExecutions"] } * @default node */ scope?: 'workflow' | 'node' | Expression; /** History Size * @hint The max number of past items to store for deduplication * @displayOptions.show { /logic: ["removeItemsWithAlreadySeenKeyValues"], /operation: ["removeItemsSeenInPreviousExecutions"] } * @default 10000 */ historySize?: number | Expression; }; } interface RemoveDuplicatesV2NodeBase { type: 'n8n-nodes-base.removeDuplicates'; version: 2; } export type RemoveDuplicatesV2ParamsNode = RemoveDuplicatesV2NodeBase & { config: NodeConfig; }; export type RemoveDuplicatesV2Node = RemoveDuplicatesV2ParamsNode;