Notion node: ‘Get Many’ with formula filter fails with ‘Unable to filter based on a formula of unknown type’

用户在 n8n 工作流中配置 Notion 节点:

Notion node: 'Get Many' with formula filter fails with 'Unable to filter based on a formula of unknown type'

Notion node: ‘Get Many’ with formula filter fails with ‘Unable to filter based on a formula of unknown type’

快速结论:该报错发生在 n8n Notion 节点使用 “Get Many” 操作并针对 Formula 类型属性设置筛选条件时。即使已经明确指定 Return Type,请求仍然失败。优先检查 n8n 版本是否低于 2.21.3,并确认该问题在 Issue #27420 中声称修复但实际未生效。

问题场景

用户在 n8n 工作流中配置 Notion 节点:

  • Resource 设置为 Database Page
  • Operation 设置为 Get Many
  • Filter 设置为手动构建(Build Manually)
  • Property Name or ID 选择类型为 Formula 的属性
  • Return Type 指定为任意值(例如 TextCheckbox
  • Condition 设置后执行节点

报错原文

Bad request - please check your parameters
Unable to filter based on a formula of unknown type

原因分析

这是 n8n Notion 节点的已知缺陷。Issue 讨论中明确指出,此前在 #27420 评论中声称已修复,但实际并未生效。**可能原因**是 n8n 在构建 Notion API 请求时,Formula 类型的属性筛选未能正确传递 Return Type 参数,导致 Notion API 返回“unknown type”错误。问题与用户手动指定 Return Type 无关——即使用户在界面中选择了正确的 Return Type,请求体中仍可能未正确嵌入该参数。

环境排查

  • n8n 版本:Issue 中报告的版本为 2.21.3(self-hosted Docker)
  • Node.js 版本:24.14.1
  • 运行平台:Docker(self-hosted)
  • 数据库:SQLite
  • 许可证:企业版(production)
  • Notion 节点类型版本:2.2

解决步骤

  1. 确认问题是否为已知 bug:访问 Issue #30524 跟踪进展,该问题已被标记为 status:in-linearteam-assigned,表示开发团队已立项调查。
  2. 临时绕过方案(基于 Issue 讨论推断,未在评论中明确给出):
    • 在 Notion 节点中将 Filter 切换为 Raw Expression 模式,手动构造包含正确 Return Type 的过滤条件 JSON 对象。
    • 将 Formula 属性的筛选需求转移到 Notion 的数据库视图(View)层级实现,在 n8n 中仅查询视图而非全部页面。
  3. 等待官方修复:关注 Linear 工单 GHC-8368 和 Issue #30524 的更新,当修复发布后升级 n8n 版本。

验证方法

如果尝试临时绕过方案:

  1. 配置一个简单的测试工作流,仅包含 Notion 节点(Database Page → Get Many),筛选条件使用一个非 Formula 类型属性(如 Text 或 Select),确认节点正常执行。
  2. 然后使用 Raw Expression 模式构造 Formula 过滤条件,再次执行,若成功返回数据则说明临时方案有效。
  3. 等待官方修复后,将 n8n 升级到包含修复的版本,重复原始操作场景,确认不再收到 Unable to filter based on a formula of unknown type 错误。

参考来源

n8n-io/n8n #30524

GamsGo AI

AI 工具推荐

想把多个 AI 模型放在一个入口?

GamsGo AI 集成 ChatGPT、DeepSeek、Gemini、Claude、Midjourney、Veo 等常用模型,适合写作、绘图、视频和日常 AI 工作流。

了解 GamsGo AI

推广链接:通过此链接购买,我可能获得佣金,不影响你的价格。

celebrityanime
celebrityanime
文章: 12159

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注