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.

Hola a todos,

Gracias por reportar esto — hemos identificado y corregido varios errores en el nodo IMAP Email Trigger que podrían causar este comportamiento.

Qué estaba pasando: Cuando el servidor IMAP devolvía ciertos formatos de correo electrónico, el disparador podía fallar silenciosamente y desactivar el flujo de trabajo en segundo plano. Los correos electrónicos seguían siendo marcados como leídos (ya que esto sucedía antes del fallo), pero el flujo de trabajo nunca se ejecutaba. Esto afectaba particularmente al formato Simple — cambiar a Resolved podría funcionar como solución alternativa, como algunos de ustedes descubrieron.

Qué corregimos:

  • Se añadió una verificación de seguridad para encabezados de correo electrónico mal formados en formato Simple — anteriormente un encabezado faltante causaría el fallo del disparador y desactivaría silenciosamente el flujo de trabajo

  • Se corrigió la lógica de marcar como leído para que solo marque correos que fueron realmente procesados y emitidos al flujo de trabajo

  • Se corrigió el procesamiento duplicado al recibir lotes grandes de correos (20+)

  • Se añadió protección de concurrencia contra notificaciones rápidas de correo electrónico

Solución alternativa hasta que se implemente la corrección: Si aún experimentas esto, intenta cambiar el parámetro Format a Resolved. También asegúrate de que la opción Force Reconnect Every Minutes esté configurada (bajo Options) — esto ayuda con servidores IMAP que no envían notificaciones de nuevo correo de forma confiable.

La corrección está en el PR #30375 y debería publicarse pronto. ¡Gracias por los reportes detallados!

¡Excelente ver al equipo de n8n investigando esto a fondo! Gracias @garrit por el análisis detallado de lo que realmente estaba sucediendo y por la solución en el PR #30375.

Solo para resumir los puntos clave para cualquiera que llegue a este hilo:

Causa raíz: Cuando el servidor IMAP devolvía ciertos encabezados de correo electrónico malformados, el disparador se bloqueaba silenciosamente y desactivaba el flujo de trabajo en segundo plano. Los correos electrónicos seguían marcados como leídos, pero nada se ejecutaba.

Solución alternativa (hasta que se lance la corrección):

  • Cambia el parámetro Format a Resolved en lugar de Simple
  • Activa Force Reconnect Every Minutes bajo Options

Corrección permanente: Se cubre en PR #30375, mantente atento al registro de cambios para la versión en la que se lance y actualiza cuando esté disponible.

¡Excelente persistencia de la comunidad en esto para investigarlo adecuadamente!

Funciona. He estado lidiando con este problema durante varias horas. Cuando cambié el formato a Resuelto, simplemente funcionó. ¡¡Gracias!!