Email Trigger (IMAP) Node Reads Email, But Doesn't Execute Additional Nodes

@Jon, I think I may have resolved my issue.

I deleted the credentials for the problematic email mailbox and created new ones. I also created a new workflow (workflow #2) consisting of the default Email Trigger (IMAP) node with the new credentials and the default Code node. I tested it and it worked.

I deleted the Email Trigger (IMAP) node from my original workflow (workflow #1) and created a new default Email Trigger (IMAP) node using the new credentials for the same email mailbox. I tested it and it worked too.

However I then renamed the Email Trigger (IMAP) node in my original workflow (workflow #1) back to its original name from the default name. The name of this node is the same name as in an inactive workflow (workflow #3) from which I duplicated it. I tested the original workflow (workflow #1) and then it didn’t work again!

Next I renamed the Email Trigger (IMAP) node in the inactive workflow (workflow #3) to a different name. I tested the original workflow (workflow #1) and it didn’t work.

Then I deleted the Email Trigger (IMAP) node from the inactive workflow (workflow #3). I tested the original workflow (workflow #1) and it didn’t work.

Finally, I renamed the Email Trigger (IMAP) node in the original workflow (workflow #1) to a different name and it worked again.

So strange! Any thoughts as to what is going on?

Hey @MortgageRockstar,

I wonder if the static data we store to know if an email has been checked is causing the issue. Maybe we need to rethink how we handle emails and instead of using message ids we just rely on the date the email was sent.

The static data is something the debug output will contain, Should have that ready soon I got caught up last week with other issues.

Thanks for your response, @Jon.

My workflow now works with the the renaming of the Email Trigger (IMAP) node, but I’m happy to continue to help you track down the issue I experienced if you like.

@Jon , did you happen to ever look into why a node named the same yet in separate workflows resulted in the Email Trigger (IMAP) node not working for me?

I have not tested it, but I wonder if this same issue exists with other types of nodes. Have you heard of anything similar?

Hey @MortgageRockstar,

I didn’t but thinking about it most users will have a node with the same name in differnet workflows with no issue so I wouldn’t expect there to be a problem there and I suspect it is unrelated.

Hey @Jon, I’m not sure if it’s related, but I’m also having an issue with this node. When I click the Test Step button, it listens, and I receive the data. However, in production mode, I don’t get any response; nothing happens. Additionally, I encountered another problem: after initiating the Test Step , I couldn’t halt the process using the Stop Listening button. Instead, I had to return to the workflow page to stop it.

Hey @Ruslan_Yanyshyn,

I would expect it to be unrelated, when in production mode if you enable debug logging are you seeing anything in the log for it connecting?

Thanks @Jon, yes I see this error
I did’t mention that my n8n instance operate in queue mode

Why does it only happen in production mode?

Here are the logs from the n8n container when the email was received by IMAP account ;

2024-03-15T18:01:07.255Z | verbose  | Email Read Imap:update 2 "{\n  uid: 16,\n  modseq: '43',\n  file: 'LoggerProxy.js',\n  function: 'exports.verbose'\n}"
2024-03-15T18:01:41.046Z | debug    | Wait tracker querying database for waiting executions "{ file: 'WaitTracker.js', function: 'getWaitingExecutions' }"
2024-03-15T18:01:50.964Z | debug    | Add editor-UI session "{ sessionId: '3q4x8cmoogl', file: 'abstract.push.js', function: 'add' }"
2024-03-15T18:01:51.499Z | debug    | Received message from editor-UI "{\n  sessionId: '3q4x8cmoogl',\n  msg: { type: 'workflowOpened', workflowId: 'u0AwDvWeXU5Qd5As' },\n  file: 'abstract.push.js',\n  function: 'onMessageReceived'\n}"
2024-03-15T18:01:53.864Z [Rudder] debug: no existing flush timer, creating new one
2024-03-15T18:02:03.866Z [Rudder] debug: in flush
2024-03-15T18:02:03.866Z [Rudder] debug: cancelling existing flushTimer...
2024-03-15T18:02:41.048Z | debug    | Wait tracker querying database for waiting executions "{ file: 'WaitTracker.js', function: 'getWaitingExecutions' }"

I don’t have any logs related to this workflow in any of the worker nodes. Looks like the process wasn’t transfered to the worker nodes at all.

In my Error Trigger I got this error:

error
message:There was a problem with the trigger node "Email Trigger (IMAP)", for that reason did the workflow had to be deactivated

Hey @Ruslan_Yanyshyn,

That is unusual, in your set up did you enable debug for the workers as well? Does your user also own the workflow and the credenital or was it created by another user and shared to you?

It was odd, but deleting and remaking the workflow under a new name fixed everything.

1 Like