IMAP not triggering

Describe the problem/error/question

When I add an IMAP node to check a subfolder, the new mails are marked as read, due to the config, but the node has not triggered. When I “unread” them and trigger the node manually, it works. Just automatic trigger is not working correctly

Please share your workflow

Information on your n8n setup

  • 1.94.0
  • Database: SQLite
  • EXECUTIONS_PROCESS: not set explicitly
  • **Running n8n via Docker
  • Operating system: Debian 11.3

IMAP Email Trigger Operation
The node connects to the IMAP server and uses the IDLE command (if available) to listen for new messages in real time.

If IDLE is not supported, you can use periodic polling.

Each new message that matches the filters triggers the flow.

Try the following:

Make sure you use the correct folder name, as interpreted by the IMAP server.

Example: Gmail: “[Gmail]/Inbox” or “INBOX/Subfolder”

Prevent other clients (such as Outlook) from automatically marking emails as read

As mentioned, mails are marked read by the node, it just does not trigger when enabled. It triggers only when running manually. Hence I assume filters and folder name are correct.
There is no other client marking the mails read.
The IMAP server is Fastmail.

Same Problem here. IMAP Trigger ist working correct in Test Mode, in active Mode Mails get marked as Read but nothings happens in the Workflow.

I have the same issue. I use n8n Version 1.88.0 (self hosted). IMAP from fastmail.
For gmail IMAP it worked fine.

Any solution found for this one? I am facing the exact same issue. Only Gmail IMAP Sseems working properly

Delete and recreate the workflow, I just tried and it works

I encountered a very strange problem. The email trigger of the archived workflow was still triggered.

Hey there,

I also have issues with the IMAP trigger on n8n stable @ docker. In manual test it sort of randomly succeeds, than again listening forever without input when adding new mails to the source folder and also not working when activated … :frowning:

I’m facing the same issue now. In addition, my workflow is running when I’m clicking on ‘Execute workflow’ but it’s neither getting published nor unpublished.

You can unarchive a workflow by following these steps. Go to workflows. On top right, you see ‘filter’ icon (beside ‘search’ and ‘create folder’ icons). Click on it. You will see a check box with label ‘Show archived workflows’. Check the box and you’ll see archived workflows. open the corresponding workflow, unarchive it (just like you archived it). stop the trigger and delete it if you wish to.

Same problem using the payed version of n8n on the cloud. I’m using IMAP of a Hostinger Mail Server.

From my tests, it seems the parameter Format=Resolved works, but Format=Simple don’t

I’m using self hosted version with Hostinger and it isn’t working for me too. When I add credentials it shows “Connection tested successfully” but node is not triggering. I’ve tested it with “INBOX” and “INBOX.subfolder”, Custom Email Rules both [“UNSEEN”] and [“ALL”]

And it seems that the Customer **(Un)**Success department is not very interested in fixing the IMAP problem, or even showing up here to provide any update or feedback.

嗨各位,

感謝你們回報這個問題 — 我們已識別並修正了 IMAP 電子郵件觸發節點中的多個錯誤,這些錯誤可能導致這種行為。

發生的狀況:當 IMAP 伺服器返回特定電子郵件格式時,觸發器可能會靜默崩潰並在背景中停用工作流程。電子郵件仍會被標記為已讀(因為這發生在崩潰之前),但工作流程將永遠不會執行。這特別影響簡單格式 — 切換到已解決格式可能可以解決問題,就像你們中的一些人發現的那樣。

我們的修正:

  • 為簡單格式中格式錯誤的電子郵件標頭添加了安全檢查 — 之前缺少標頭會導致觸發器崩潰並靜默停用工作流程

  • 修正了標記為已讀的邏輯,只標記實際被處理並發送到工作流程的電子郵件

  • 修正了接收大批量電子郵件(20+)時的重複處理

  • 針對快速電子郵件通知添加了並行保護

修正發布前的解決方案:如果你仍然遇到這個問題,請嘗試將格式參數切換為已解決。同時確保已設定「每分鐘強制重新連接」選項(在選項下)— 這有助於無法可靠發送新郵件通知的 IMAP 伺服器。

修正已在 PR #30375 中,應該很快就會上線。感謝你們提供的詳細回報!

很高興看到 n8n 團隊深入研究這個問題!感謝 @garrit 對實際發生的情況所做的詳細分析,以及在 PR #30375 中提供的修復。

只是為了總結一下關鍵要點,方便任何看到這個討論串的人:

根本原因: 當 IMAP 伺服器返回某些格式不正確的電子郵件標題時,觸發器會無聲地當機並在後台停用工作流程。電子郵件仍然被標記為已讀,但沒有任何內容執行。

暫時解決方案(直到修復發布):

  • 將 Format 參數改為 Resolved 而不是 Simple
  • 在選項下啟用 Force Reconnect Every Minutes

永久修復: 涵蓋在 PR #30375 中,請注意更新日誌以了解它將在哪個版本中發布,並在推出後進行更新。

很棒的社區堅持,讓這個問題得到了妥善調查!

這行得通。我已經為這個問題苦惱了好幾個小時。當我將格式改為「已解決」時,它就開始工作了。謝謝!!