[BUG] Trigger IMAP-Node with Changed Credentiels does not trigger

Hey all,

I noticed some strange behavior after chaneging the Credentiels for a Mailbox with a IMAP node/ the Workflow:

the IMAP-Node has the following Atributes configeured:

  • Action: mark as read
  • Format: resolves
  • Property Prefix Name: attachment_
  • Custom Email Rules: [ [“UNSEEN”], [“TO”, “[email protected]”] ]

What did change:
The Mailserver of the saved account via home/credentials; testing there worked.

Observed behavior:
After the IMAP-Account was changed the Workflow did not Trigger after an E-Mail arrived.
The Workflow did trigger when “listening for test”.
We observed that in the Webinterface of the Postbox an E-Mail recived by the account (for clarification [email protected] is an alias) gets marked as read if the workflow is active, but the Workflow is not executed. If the workflow is deactivated the Email is not marked as read in the Webinterface.
Deleting the trigger IMAP-Node and creating a new one (with diffrent Name) did not fix the Problem.

How we fixed:
I created a new workflow copyed all Nodes excluding the IMAP Node and pasted them, created a new Imap node and used the same Settings and the same account. The new Workflow works as supposed to.

Version:
We use n8n on Cloudron: the Bug encounterd on a version before 1.54.2 and i reproduced it today on 1.54.2.

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:

Hey @N0ah,

Are you running in queue mode at all? In theory if you change the credentials just disabling the workflow and enabling it again should bring it back which is what I did recently when I changed my password.

I wonder if there was something in the JSON data of the old workflow that was causing an issue, Do you still have both workflows and can you export and share them both?

Hey @Jon

sorry for the late reply, i was on vacation.
Sadly i dont have the Old one, however since the new one is an copy of the old one it should not make much of a diffrence:

1 Like

I actually have the same issue with a very similar setup. Changed the credentials to a different account, kept the same node (also tried deleting the initial one, and then choosing the new credentials with a new one) and still nothing. Executing it manually for testing purposes works without a hitch, but the node simply doesn’t execute when new mail arrives.

EDIT: I think I resolved the issue (might work for you as well). I simply renamed the node from its standard name to a new one. Don’t ask me why and how, but it did the trick.

This is the fragment in one of the last columns of the table:


sqlite> select staticData from workflow_entity;

staticData

{"node:Email Trigger (IMAP)":{"lastMessageUid":2239}}

{"node:Email Trigger (IMAP)":{"lastMessageUid":2236}}

sqlite>

The UID of the last email fetched is stored inside the workflow definition inside the database but not exposed anywhere. It does not get reset when changing connection or credentials. What I’ve seen is that deleting the IMAP node and creating a new one with a different name resets this ID, which makes the workflow trigger as expected.

1 Like