You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

UiPath中Get Outlook Mail Message过滤属性报错的解决咨询

修复UiPath Get Outlook Mail Messages的SQL过滤条件报错

问题根源

你的过滤条件存在两个核心问题:

  • 直接使用[Received]不符合Outlook SQL查询的语法规范,必须使用对应的MAPI属性标签或标准URN格式属性名
  • 日期格式写法不被Outlook解析,需要严格遵循yyyy-MM-dd HH:mm:ss格式

修复方案

方案1:使用MAPI属性标签

替换原过滤代码为:

"@SQL=""http://schemas.microsoft.com/mapi/proptag/0x0037001f"" LIKE '%asean prs%' AND ""http://schemas.microsoft.com/mapi/proptag/0x0E060040"" >= '" + DateTime.Today.ToString("yyyy-MM-dd 00:00:00") + "'"
  • 0x0037001f对应邮件主题属性
  • 0x0E060040对应邮件接收时间属性
  • 日期统一用yyyy-MM-dd HH:mm:ss格式,确保Outlook能正确解析

方案2:使用更易读的URN格式

如果觉得MAPI标签难记,可改用URN格式的属性名:

"@SQL=""urn:schemas:httpmail:subject"" LIKE '%asean prs%' AND ""urn:schemas:httpmail:datereceived"" >= '" + DateTime.Today.ToString("yyyy-MM-dd 00:00:00") + "'"

优化写法(可选)

用String.Format让代码结构更清晰:

String.Format("@SQL=""urn:schemas:httpmail:subject"" LIKE '%asean prs%' AND ""urn:schemas:httpmail:datereceived"" >= '{0}'", DateTime.Today.ToString("yyyy-MM-dd 00:00:00"))

内容的提问来源于stack exchange,提问作者alvin

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.21 20:54:25