Mark emails as read

Describe the problem/error/question

Hi there, in my workflow I have an IMAP trigger that detects some incoming emails and I then process them. However, not all emails are relevant to the process, so I only want to mark as read those which, after being processed, meet certain conditions.

I cannot use the IMAP trigger to do this, because triggers do not accept incoming flows. How might I solve this? Here’s a dummy workflow just to illustrate what I would like to do.

Share the output returned by the last node

Information on your n8n setup

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

Hi @Miguel_Fernandez, I am afraid this is not something n8n currently supports.

While the IMAP trigger node can start workflows for incoming emails (and can optionally mark messages as read when the workflow is started), there is no regular IMAP node allowing you to update individual emails later in your workflow.

I shall convert your question into a feature request, so you can vote on having this implemented going forward.

In the meantime, perhaps you want to consider using Gmail or Outlook? These services do have regular nodes, allowing you to perform the “mark as read” operation at any stage in your workflow.

@MutedJam brilliant! thank you. I’ll try the Gmail and Outlook nodes then.
Just for context, I found this SO thread where someone asks about a very similar thing, except in Node.js.

1 Like

Jep, this definitely sounds like a doable feature. n8n does actually use imap-simple (which is built on node-imap). Let’s see how interesting this is for the community.

Don’t forget to vote on this yourself (the “Vote” button is at the very top of the topic) :slight_smile:

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