Processing Historical Emails with n8n

Hey all,

I have setup a great workflow to sort my invoices that came in via Mail using the IMAP Trigger. Now I would love to use this also with all Emails I have received in the past, in addition to new emails as they arrive.

I understand that the EmailReadImap node is designed to trigger workflows for new emails, but I’m wondering if there’s a way to use it or another method to process historical emails as well.

Here are some steps I have in mind:

  1. Connect to my email server via IMAP using the EmailReadImap node.
  2. Download all existing emails from the server.
  3. Process these emails through a n8n workflow.

Would this approach work, or is there a better way to accomplish this within n8n? Also, if there are any best practices or examples of how others have tackled similar tasks, that would be incredibly helpful.

Thank you in advance for any insights or suggestions you may have!

Information on your n8n setup

  • Operating System: Ubuntu 20.02
  • n8n Version: 1.8.2
  • Running n8n via Docker

Hi @tabacchi :wave: Welcome to the community :tada:

As the IMAP node is a trigger node, you won’t be able to pull in historical data through it like you’re expecting, as this would only be used to trigger a workflow execution for a single email. What email provider are you using? You may be able to use a different node (such as Gmail or Outlook), or interact with the service in a different way to try to achieve what you’re looking to do :+1:

1 Like

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