diff --git a/packages/nodes-base/nodes/Notion/GenericFunctions.ts b/packages/nodes-base/nodes/Notion/GenericFunctions.ts index 73190752e323b..6dced42752b0a 100644 --- a/packages/nodes-base/nodes/Notion/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Notion/GenericFunctions.ts @@ -559,12 +559,16 @@ export function mapFilters(filtersList: IDataObject[], timezone: string) { } if (value.type === 'formula') { - const vpropertyName = value[`${camelCase(value.returnType as string)}Value`]; + if (['is_empty', 'is_not_empty'].includes(value.condition as string)) { + key = value.returnType; + } else { + const vpropertyName = value[`${camelCase(value.returnType as string)}Value`]; - return Object.assign(obj, { - ['property']: getNameAndType(value.key as string).name, - [key]: { [value.returnType]: { [`${value.condition}`]: vpropertyName } }, - }); + return Object.assign(obj, { + ['property']: getNameAndType(value.key as string).name, + [key]: { [value.returnType]: { [`${value.condition}`]: vpropertyName } }, + }); + } } return Object.assign(obj, {