Skip to content

Filtering on Outlook node does not work when multiple folders are selected #21561

Description

@CMLabay

Bug Description

When using the Outlook - Message - Get Many node, there is bug related to filtering on multiple email folders.
When only one folder is selected, the filtering works as expected.
However, when multiple folders are selected, all messages are retrieved (up to the limit).

The images below, show a filter query on 'categories', and then Folders To Include is set to include two folders, and one folder, respectively.

Expected Result:
Only messages in the specified category are returned when more than one folder is included.

Actual Result
When more than one folder is included, messages from any category are retrieved.

With multiple folders
Image
With a single folder

Image

To Reproduce

  1. Add an Outlook node and connect a credential
  2. Select the resource - Message
  3. Select the operation - Get Many
  4. Click - Add Filters button
  5. Click the Add Filter dropdown, and select Filter Query
  6. add a category filter - categories/any(c: c eq 'your category')
  7. Click the Add Filter dropdown, and select Folders To Include
  8. add Inbox, and Archive folders
  9. Click Execute Step

Expected behavior

Only messages that have the category 'your category' should be retrieved from both the Inbox and Archive folders.

Debug Info

Debug info

core

  • n8nVersion: 1.116.1
  • platform: docker (self-hosted)
  • nodeJsVersion: 22.18.0
  • nodeEnv: production
  • database: postgres
  • executionMode: scaling (single-main)
  • concurrency: -1
  • license: enterprise (production)
  • consumerId: 4f81c6aa-3aa2-4946-a155-39f89d2d208d

storage

  • success: all
  • error: all
  • progress: false
  • manual: true
  • binaryMode: s3

pruning

  • enabled: true
  • maxAge: 336 hours
  • maxCount: 10000 executions

client

  • userAgent: mozilla/5.0 (macintosh; intel mac os x 10_15_7) applewebkit/537.36 (khtml, like gecko) chrome/142.0.0.0 safari/537.36
  • isTouchDevice: false

Generated at: 2025-11-04T21:34:59.080Z

Operating System

Mac 15.7.1 (24G231)

n8n Version

1.116.1

Node.js Version

v22.18.0

Database

SQLite (default)

Execution mode

main (default)

Hosting

self hosted

Metadata

Metadata

Assignees

No one assigned

    Labels

    status:in-linearIssue or PR is now in Linearstatus:team-assignedA team has been assigned the issue or PRtriage:completeTriage has been completed and issue is ready for internal teams

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions