Imap node don't trigger with gmail label mailbox name

The issue

Hello everyone,

I have issue to trigger workflow with IMAP node that is listening mailbox from label of Gmail.

When I execute node manually I get the emails from the label perfectly fine. Even the action mark the emails as read works well.

Now the main problem.

When I set workflow as active and send emails to the mailbox, the workflow won’t start. In the executions there is no sign of execution. But the funny part is that the action “mark as read” set the emails in the label mailbox as readed.

But here is the tricky part, when I set mailbox to INBOX instead of label then the workflow execute as it’s should.

But obviously I don’t want to have these emails in my INBOX. In the gmail I have filter that mark all the emails from certein adress to this label and skip the INBOX.

Any Idea what to do with this and how to avoid to have theese email in my main Inbox?

Thank you very much!

Here is the IMAP Node

n8n setup

  • n8n version: 0.163.1
  • Database you’re using: SQLite
  • Running n8n with the execution process: Main
  • Running n8n via: Docker

Hi @Michal_Dovrtel, welcome to the community!

I am not sure if Gmail labels translate 1:1 into IMAP mailboxes so I reckon this could be a factor preventing your workflow from working as expected.

Would you perhaps be able to alternatively use a polling approach with the purpose-built Gmail node? E.g. run the Message > Get All operation using the labels you’re interested in every minute (or even shorter, if needed)?

Thank you for your response.

Well this approach also accorred to me, but I was worry that this will unnecessarily load the server :smiley: But I will give it a shot, and see whats happend :slight_smile:

Thank you!

1 Like

Fair point, though unless you are using n8n.cloud (where each plan only allows a limited number of workflow executions) a simple email checking workflow shouldn’t cause a huge load on your n8n server.

The Gmail API also allows a lot of requests each day, so shouldn’t be problematic either.

1 Like