How to setup gmail node "get many" messages from multiple labels (i.e if mail from either label1 or label2 or label2)

Hi Community,
I have the following issue, i thought its pretty basic but can’t get a way out of it.

Describe the problem/error/question

In gmail node > get many messages" > filter > Label, if i assigned multiple labels (eg 4 labels) from the selection dropdown, it does not work. Upon testing, it appeared it will only recognize 1 label, if I only assign one label, it returns results successfully. Is it possible to set the filter to run by OR operator? that is either label1 or label2 or label3 or label4?

What is the error message (if any)?

No error, if I set more than one label , it will not return any result.

Please share your workflow

This is just a single node, not even a workflow yet.
See screenshot of the filter setup:

But if I change to one label, it works:

Information on your n8n setup

  • n8n version: Version 1.76.1
  • Database (default: SQLite): NONE
  • **n8n EXECUTIONS_PROCESS setting (default: own, main):**default
  • **Running n8n via (Docker, npm, n8n cloud, desktop app):**Docker
  • Operating system: Win 11

thanks!

The Bird

Welcome to the community @jerry_Cole !

Tip for sharing information

Pasting your n8n workflow


Ensure to copy your n8n workflow and paste it in the code block, that is in between the pairs of triple backticks, which also could be achieved by clicking </> (preformatted text) in the editor and pasting in your workflow.

```
<your workflow>
```

That implies to any JSON output you would like to share with us.

Make sure that you have removed any sensitive information from your workflow and include dummy or pinned data with it!


You are right. It appears that “AND” logic is used - all the fillters have to match. To implement “OR” logic you can use a GMail node for each of the lables andf Merge the outcome of asll of them as in the image below, for example.

Thanks @ihortom for confirming.