IMAP Email Node Archive Mail

I was thinking of creating an workflow that would get the email from an Archive folder in an email client. The only problem is, that the IMAP Email Node will only process message that are unread before they are move to the Archived folder. Any ideas whether this is at all possible?

Hey @dickhoning, this would be the node’s default behaviour.

You can use the Custom email rules option to customize which emails it should process:


@MutedJam thanks, but unfortunately, there does not seem to be an option for my issue, which is taking in already read/seen message …

Hey @dickhoning,

What happens if you skip the Unseen part in the search filter?

@Jon when I drag an email message from my Inbox to my Archive folder via my email client, the nothing happens with the following settings … with or without the [“UNSEEN”] Custom email rule option …

Hey @dickhoning,

If you have an unseen email in Archive does that work?

Hey @dickhoning, I did some more testing on this and something like ["ALL", ["SINCE", "April 20, 2010"]] in the Custom email rules field also caused already seen messages to trigger the IMAP Email node. It did, however, only work for messages just moved to the actual INBOX, not any other folders like Archive or a newly created folder for me.

So maybe you could simply create a separate IMAP account for use with n8n which lets you use the top level of your INBOX? So instead of moving a message into the Archive folder for parsing, you could simply move it to the additional account.

Hi @MutedJam thanks for thinking out of the box for me … but uh … I’m afraid that this is not going to work in this case. What I’m really looking for in this use case, is the possibility of processing mail messages that are moved into an ‘Archive’ folder. This so that users can drag messages that they want to archive in their ERP system. Additionally, I’m looking for a method to delete an archived mail.

Might be worth raising a feature request then. I tried playing around with this node a bit more (e.g. specifying a subfolder using something like INBOX.n8n as the mailbox name where n8n is the subfolder name, but the trigger would not run for messages simply moved into that folder). Sorry I don’t have any better news here :frowning:

There is a chance this is specific to my email provider (I don’t really know much about the IMAP protocol unfortunately), so it might be worth testing this on your end as well.

I have just given this a quick test and I have a mailbox called Archive that contains 3 read emails.

In my IMAP node I have…

This has resulted in all 3 emails appearing in my worklfow. I am not sure what the differences are maybe it is where I am using GMail for my testing.

Did this work for you when your workflow is active and an existing message gets moved into “Archive” @jon? For me it was only working when manually executing the workflow (I was using these guys instead of Gmail though and n8n was a subfolder of INBOX in my case).

Yup if I moved those 3 into Inbox then set the logging of my flow to show in execution log and active it, When I move the 3 back into Archive I can see it run.


1 Like

That’s pretty neat. So I guess the tl;dr is that it can work if you’re using the right provider and/or your Archive folder is an entirely separate mailbox.

I consider this good news!

Just to be complete, Just did the same test using GMX as the mail provider and it also works.

1 Like

Nice, with your latest test I could see the different structure between GMX/Gmail and Telekom @jon.

Telekom seems to allow subfolders of INBOX only whereas GMX and Gmail allow the use of top level inboxes.

@dickhoning, could you confirm whether you tried setting a custom rule like ["ALL"] as in Jon’s screenshot above? If this is still not working for you, could you confirm your email provider?

1 Like

@MutedJam rule [“ALL”] works :+1: … the million dollar question now is; ‘is there an option to move the archived message to another folder?’

1 Like

Hey @dickhoning,

Sounds like that would need a feature request to add a Move action on the IMAP node.

I will submit a request for this …

1 Like