IMAP Email trigger never finds emails

I’m trying to make a new workflow that starts with an IMAP email. The credentials add properly and verify, but when testing, it never finds any new email.

I am using MXRoute as an email provider. I tried 2 different email addresses on different domains, nothing worked.

Here’s the log:

n8n-1  | 2024-08-01T07:36:28.267Z | debug    | Executing hook on node "Email Trigger (IMAP)" (hookFunctionsPush) "{\n  executionId: '10',\n  pushRef: '559quydriw',\n  workflowId: 'xmk55d8zitOOmdBT',\n  file: 'WorkflowExecuteAdditionalData.js',\n  function: 'nodeExecuteAfter'\n}"
n8n-1  | 2024-08-01T07:36:28.267Z | error    | The session "559quydriw" is not registered. "{\n  pushRef: '559quydriw',\n  file: 'abstract.push.js',\n  function: 'sendToOne'\n}"
n8n-1  | 2024-08-01T07:36:28.268Z | verbose  | Workflow execution finished successfully "{\n  workflowId: 'xmk55d8zitOOmdBT',\n  file: 'LoggerProxy.js',\n  function: 'exports.verbose'\n}"
n8n-1  | 2024-08-01T07:36:28.268Z | debug    | Executing hook (hookFunctionsSave) "{\n  executionId: '10',\n  workflowId: 'xmk55d8zitOOmdBT',\n  file: 'WorkflowExecuteAdditionalData.js',\n  function: 'workflowExecuteAfter'\n}"
n8n-1  | 2024-08-01T07:36:28.269Z | debug    | Save execution data to database for execution ID 10 "{\n  executionId: '10',\n  workflowId: 'xmk55d8zitOOmdBT',\n  finished: true,\n  stoppedAt: 2024-08-01T07:36:28.268Z,\n  file: 'sharedHookFunctions.js',\n  function: 'updateExistingExecution'\n}"
n8n-1  | 2024-08-01T07:36:28.327Z | debug    | Executing hook (hookFunctionsPush) "{\n  executionId: '10',\n  pushRef: '559quydriw',\n  workflowId: 'xmk55d8zitOOmdBT',\n  file: 'WorkflowExecuteAdditionalData.js',\n  function: 'workflowExecuteAfter'\n}"
n8n-1  | 2024-08-01T07:36:28.330Z | debug    | Save execution progress to database for execution ID 10  "{\n  executionId: '10',\n  workflowId: 'xmk55d8zitOOmdBT',\n  file: 'WorkflowExecuteAdditionalData.js',\n  function: 'workflowExecuteAfter'\n}"
n8n-1  | 2024-08-01T07:36:28.330Z | error    | The session "559quydriw" is not registered. "{\n  pushRef: '559quydriw',\n  file: 'abstract.push.js',\n  function: 'sendToOne'\n}"
n8n-1  | 2024-08-01T07:36:28.716Z [Rudder] debug: no existing flush timer, creating new one
n8n-1  | 2024-08-01T07:36:29.157Z | debug    | Email Read Imap: Shutting down workflow - connected closed "{ file: 'LoggerProxy.js', function: 'exports.debug' }"
n8n-1  | 2024-08-01T07:36:30.418Z | debug    | Wait tracker querying database for waiting executions "{ file: 'WaitTracker.js', function: 'getWaitingExecutions' }"
n8n-1  | 2024-08-01T07:36:38.717Z [Rudder] debug: in flush
n8n-1  | 2024-08-01T07:36:38.717Z [Rudder] debug: cancelling existing flushTimer...
n8n-1  | 2024-08-01T07:36:59.357Z | debug    | Skipped browserId check on /rest/push "{ file: 'auth.service.js', function: 'resolveJwt' }"
n8n-1  | 2024-08-01T07:37:30.417Z | debug    | Wait tracker querying database for waiting executions "{ file: 'WaitTracker.js', function: 'getWaitingExecutions' }"
n8n-1  | 2024-08-01T07:38:00.191Z | debug    | Skipped browserId check on /rest/push "{ file: 'auth.service.js', function: 'resolveJwt' }"
n8n-1  | 2024-08-01T07:38:30.418Z | debug    | Wait tracker querying database for waiting executions "{ file: 'WaitTracker.js', function: 'getWaitingExecutions' }"
n8n-1  | 2024-08-01T07:38:33.029Z | debug    | [Pruning] Found no executions to hard-delete "{ file: 'pruning.service.js', function: 'hardDeleteOnPruningCycle' }"
n8n-1  | 2024-08-01T07:38:33.030Z | debug    | [Pruning] Hard-deletion scheduled for next 15 min "{ file: 'pruning.service.js', function: 'scheduleHardDeletion' }"
n8n-1  | 2024-08-01T07:39:00.734Z | debug    | Skipped browserId check on /rest/push "{ file: 'auth.service.js', function: 'resolveJwt' }"
n8n-1  | 2024-08-01T07:39:30.418Z | debug    | Wait tracker querying database for waiting executions "{ file: 'WaitTracker.js', function: 'getWaitingExecutions' }"
n8n-1  | 2024-08-01T07:40:01.659Z | debug    | Skipped browserId check on /rest/push "{ file: 'auth.service.js', function: 'resolveJwt' }"

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Can you check if any other IMAP clients work with the same set of credentials?

Yes, works fine in Thunderbird.

I don’t have a MXRoute account. Would it be possible for you to create a temporary user/credentials for testing that I could use to debug this?

Sure, is there some way I can send it to you securely?

you can send me a private message

I think I may not have enough privileges here to send a DM?

I tried the community node n8n-nodes-imap and it can successfully connect and download emails. Is there some setting that would help with the trigger node?

Try using a different flag during verification - default is [“UNSEEN”] in property Custom Email Rules.
Here is the documentation: node-imap

Here are those supported by this node:

  • ‘ALL’ - All messages.
  • ‘ANSWERED’ - Messages with the Answered flag set.
  • ‘DELETED’ - Messages with the Deleted flag set.
  • ‘DRAFT’ - Messages with the Draft flag set.
  • ‘FLAGGED’ - Messages with the Flagged flag set.
  • ‘NEW’ - Messages that have the Recent flag set but not the Seen flag.
  • ‘SEEN’ - Messages that have the Seen flag set.
  • ‘RECENT’ - Messages that have the Recent flag set.
  • ‘OLD’ - Messages that do not have the Recent flag set. This is functionally equivalent to “!RECENT” (as opposed to “!NEW”).
  • ‘UNANSWERED’ - Messages that do not have the Answered flag set.
  • ‘UNDELETED’ - Messages that do not have the Deleted flag set.
  • ‘UNDRAFT’ - Messages that do not have the Draft flag set.
  • ‘UNFLAGGED’ - Messages that do not have the Flagged flag set.
  • ‘UNSEEN’ - Messages that do not have the Seen flag set.`

You need to try it because, from my observations, different email providers implement flags differently.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.