Resources · n8n integration

n8n Email Trigger (IMAP) nodeConfigure Email Trigger (IMAP) in n8n.

The n8n Email Trigger (IMAP) node opens a workflow the moment a new email lands in a mailbox. It signs in to an IMAP server with an email address and a password, watches the mailbox you name, and passes the message on. Four parameters shape what it returns and what happens to the mail after.

Verified Trustpilot reviews · AI, automation & growth agency

Why automate

What does the n8n Email Trigger (IMAP) node do?

It turns a mailbox into the starting point of an automation. IMAP is the standard protocol for reading email on a server, and this node speaks it directly: give it a user account credential, name a mailbox, and every message that matches becomes an execution. It is a trigger node, meaning it sits first in the workflow and nothing runs until it fires. The node ships with n8n and has no operations to pick from, only parameters.

The first scenario is the inbox that feeds a spreadsheet. Orders, forms and alerts arrive as mail, the node returns each one with Format set to simple, and the fields go straight into a row on Google Sheets. Set Action to read so a message never gets picked up twice.

The second is the shared mailbox nobody watches on weekends. Point Mailbox Name at Support, keep a narrow filter in Custom Email Rules, and push a short summary to Slack as soon as something lands. The team reads the channel, not four separate inboxes.

The third is the attachment pipeline. Suppliers email invoices as PDFs, Download Attachments saves each file as binary data on the item, and the rest of the workflow renames and files it. The Property Prefix Name option decides what those binary fields are called, which matters when a single mail carries several documents.

Prefer a dedicated node when one exists for the provider. For a Google mailbox, the Gmail node authenticates with OAuth and exposes labels, threads and drafts that IMAP never surfaces. This node earns its place on a provider with no n8n node at all: a hosting mailbox, a legacy domain, a ticketing address on an internal server.

Two limits are worth knowing before you build. The node reads mail and nothing else, so sending, deleting or moving a message happens elsewhere in the workflow. And an email is not a clean API payload: the body arrives as text or as a base64url encoded string depending on Format, and parsing it is your job. If that sounds like a lot of moving parts, the n8n review covers where the tool fits and where it does not.

Connect

What do you need to connect it?

  1. 01

    Create the mailbox side first

    The credential authenticates with a user account, so the mailbox has to allow IMAP access. On a personal Google account created before June 2024 you may need to enable IMAP in the mail settings, then turn on 2-Step Verification and generate an app password. Most providers publish their own IMAP instructions, and that page is where the host name and the port live.

  2. 02

    Fill in the IMAP credential

    In n8n, open Credentials and create an IMAP credential. User is the email address you are reading mail for. Password is either the mailbox password or the app password your provider told you to generate. Host is the IMAP server address, usually shaped like imap.provider.com, and imap.gmail.com for Gmail.

  3. 03

    Set the port and the transport

    Port defaults to 993 and stays there unless your provider or your mail administrator says otherwise. Turn the SSL/TLS toggle on so the connection is encrypted. Allow Self-Signed Certificates only comes into play on an internal server with its own certificate, so check with the administrator before enabling it. A credential is saved once and reused by every workflow.

Parameters

How is each parameter set?

The Email Trigger (IMAP) node has 4 parameters. For each one: the node as you configure it in n8n, what the parameter changes, and our field notes.

01

Mailbox Name

mailbox

What you see in n8n

Notes & use cases

Names the mailbox the node listens to on the IMAP server. Change it and the same credential watches a different folder, which is how one account serves several workflows.

Key parameters

  • Mailbox Name: a text field holding the folder name as the server spells it, INBOX by convention on most providers, or a name you created such as Invoices.
Use cases
route incoming mail with a server-side rule into a dedicated folder, then point one workflow at that folder so the main inbox stays untouched.
02

Action

postProcessAction

What you see in n8n

Notes & use cases

Decides what happens to a message once n8n has received it. This is the parameter that keeps a workflow from processing the same email over and over.

Key parameters

  • Action: pick read (Mark as Read) and the message is marked as read on the server after the trigger fires.
  • Action set to nothing (Nothing) leaves the mail untouched and unread, so it will be processed multiple times.
Use cases
keep read for anything that writes somewhere, and reach for nothing only while testing, when you want to replay the same message.
03

Format

format

What you see in n8n

Notes & use cases

Chooses the shape of the email handed to the next node. Pick it early.

Key parameters

  • Format as simple returns the full email, though it will not gather inline attachments.
  • Format as resolved returns the full email with all data resolved and attachments saved as binary data.
  • Format as raw returns the body in the raw field as a base64url encoded string, leaving the payload field unused.
  • Download Attachments: turn it on only when you need the files, since it adds processing.
  • Property Prefix Name: the prefix for each attachment property, with an index appended, so attachment_ gives attachment_0.
Use cases
a supplier sends a PDF invoice monthly, and resolved gives a predictable binary field to store.
04

Options

options

What you see in n8n

Notes & use cases

A collection opened with Add option. Nothing here is required, and an option you do not add keeps its default value, so the panel stays short until you need it.

Key parameters

  • Custom Email Rules: custom fetching rules that decide which emails the node picks up, following the search criteria of the node-imap library.
  • Fetch Only New Emails: fetches just the mail arrived since the last run, rather than everything matching the rules, which default to ["UNSEEN"].
  • Force Reconnect Every Minutes: an interval in minutes that forces the connection to the server to be reopened.
Use cases
a long-running listener on a quiet mailbox benefits from a reconnect interval, because the session does not sit idle for hours.
Need help

Need help automating Email Trigger (IMAP) with n8n?

A person reads every message.

FAQ

Questions people ask next

01Is the n8n Email Trigger (IMAP) node free to use?
Yes. It is a core node shipped with n8n, so there is nothing to install and no extra cost on the n8n side. It behaves the same on n8n Cloud, the hosted offer run by n8n, and on a self-hosted instance installed with Docker or npm, under the Community Edition and its Sustainable Use licence. A workflow built on one runs on the other without changes. What you do need is a mailbox on a provider that supports IMAP, and whatever that mailbox costs is between you and your email provider.
02What credentials does it need?
An IMAP credential using a user account. You supply four values: the User, which is the email address you are reading mail for, the Password, either the mailbox password or an app password your provider asks you to generate, the Host, the IMAP server address shaped like imap.provider.com, and the Port, which defaults to 993. On top of that you choose whether to use SSL/TLS and whether to allow self-signed certificates, the second one only for an internal server. The credential is created once in n8n and reused by any workflow that needs it.
03What are the limits of this node?
It receives email, and that is all it does. There is one operation, receiving a message, and no way to send, move or delete mail from this node, so anything else in your process needs another node. It also cannot reach Outlook.com or Microsoft 365 mailboxes, because Microsoft dropped Basic Authentication for IMAP on Exchange Online in 2022, and an app password does not get around that. The page describes version 2 of the node, the highest in the catalogue. An older workflow may show an earlier version with fewer options.
04When should you use it instead of a provider node?
Use it when no dedicated node exists for the mailbox. A hosting provider mailbox, a legacy domain, an internal mail server or a generic contact address are all cases where IMAP is the only door in. When the provider does have a node, take that one: for Google mail, the Gmail node authenticates with OAuth and works with labels, threads and drafts, none of which IMAP exposes. For Microsoft mailboxes the choice is made for you, since the Microsoft Outlook Trigger node and its Message Received event replace IMAP entirely.
05n8n or Make for watching a mailbox?
It depends on where the mail should live. n8n can run on your own server with Docker or npm, so the messages and their attachments never leave infrastructure you control, which matters when the mailbox carries contracts or personal data. Make is hosted only, with no self-hosting option, and bills per operation, so a busy mailbox has a cost that grows with volume. Make is often quicker to assemble for a simple visual scenario. n8n gives you the code node, the self-hosted option and a flat cost once the server is there.
Hack'celeration Lab

Get our weekly integration tips.

No spam. Unsubscribe anytime.