# Create an IMAP manipulation node

**URL:** <https://community.n8n.io/t/create-an-imap-manipulation-node/4932>\
**Category:** Feature Requests\
**Created:** [March 24, 2021, 9:56am UTC](https://community.n8n.io/t/create-an-imap-manipulation-node/4932 "2021-03-24T09:56:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Couto](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/couto/32/3892_2.png) [@Couto](https://community.n8n.io/u/Couto)\
**Post date:** [March 24, 2021, 9:56am UTC](https://community.n8n.io/t/create-an-imap-manipulation-node/4932/1 "2021-03-24T09:56:58Z")

</div>

This comes as follow up of: [IMAP mark as read only after the workflow is done - #8 by harshil1712](http://community.n8n.io/t/imap-mark-as-read-only-after-the-workflow-is-done/4911/8)

Right now, IMAP Read Email offers the possibility to mark an email as read.  
However, I would like to mark emails as read, _after_ the workflow has successfully completed.

When wroking with Gmail, usually something like this solves the problem:

 ![Screenshot 2021-03-24 at 09.28.20](https://europe1.discourse-cdn.com/n8n/original/2X/8/8807ac3f85640262a79d45c01d90b0632cc843c2.png)

But not everyone uses Gmail as their email server (I also want to use protonmail), so that solution will not work.

I would suggest to create an IMAP manipulation node, where we can pass a query to filter a specific/or set of emails, and do operations on then (remove labels per example).

I believe that node-imap allows for search queries (not entirely sure tbh), so we could use that to pull emails a second time and perform operations on those emails. This is not the cleanest solution, but I believe it would work.

---

<div class="post-metadata">

**Author:** ![Miguel\_Fernandez](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/miguel_fernandez/32/25623_2.png) [@Miguel\_Fernandez](https://community.n8n.io/u/Miguel_Fernandez)\
**Post date:** [June 22, 2023, 8:10pm UTC](https://community.n8n.io/t/create-an-imap-manipulation-node/4932/2 "2023-06-22T20:10:57Z")

</div>

Good one. I had created this other feature request.

> [@Mark emails as read](http://community.n8n.io/t/mark-emails-as-read/27101):
>
> 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. Sha…

I’d say they’re related.

---

<div class="post-metadata">

**Author:** ![AutoBot](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/autobot/32/33559_2.png) [@AutoBot](https://community.n8n.io/u/AutoBot)\
**Post date:** [December 31, 2023, 5:53pm UTC](https://community.n8n.io/t/create-an-imap-manipulation-node/4932/3 "2023-12-31T17:53:19Z")

</div>

I created an n8n community node, `n8n-nodes-imap`, which is now available for use. Here’s a snapshot of what you can expect from this node:

### Operations

**Mailbox Operations:**

- **Get List of Mailboxes** : This function allows you to retrieve a list of all your mailboxes, complete with essential status information like message count.
- **Get Status of a Mailbox** : Gain detailed insights into the status of any mailbox, including the total number of messages and other pertinent details.
- **Create a Mailbox** : You can now set up new mailboxes directly within your workflow.
- **Rename a Mailbox** : Adjust the names of your mailboxes as required.
- **Delete a Mailbox** : To prevent accidental data loss, this feature is currently disabled, as I haven’t identified a significant use case in standard workflows.

**Email Operations:**

- **Get List of Emails in a Mailbox**
- **Download Attachments from an Email**
- **Move an Email to Another Mailbox**

I encourage you to test this node and share your experiences or suggestions.

Github repo: [GitHub - umanamente/n8n-nodes-imap: This is an n8n community node that adds support for IMAP email servers. · GitHub](https://github.com/umanamente/n8n-nodes-imap)
