# Review Unread Spam Email Drafts

Source: https://openflow.run/en/templates/review-unread-spam-email-drafts/
Content language: en
Template revision: 4ae2934012d3865e7d296909b9a06728464f1991

Productivity

Classify incoming email and prepare review-only replies for messages classified as spam.

[Use in Open Flow](https://console.openflow.run/flows?importUrl=https%3A%2F%2Fraw.githubusercontent.com%2Foomol-lab%2Fawesome-workflow-templates%2F4ae2934012d3865e7d296909b9a06728464f1991%2Fworkflows%2Freview-unread-spam-email-drafts%2Ftemplates%2Freview-unread-spam-email-drafts.openflow.json)

*   [Open Flow JSON](https://github.com/oomol-lab/awesome-workflow-templates/blob/4ae2934012d3865e7d296909b9a06728464f1991/workflows/review-unread-spam-email-drafts/templates/review-unread-spam-email-drafts.openflow.json)
*   [n8n JSON](https://github.com/oomol-lab/awesome-workflow-templates/blob/4ae2934012d3865e7d296909b9a06728464f1991/workflows/review-unread-spam-email-drafts/templates/review-unread-spam-email-drafts.n8n.json)

![Review Unread Spam Email Drafts workflow in Open Flow](https://openflow.run/template-previews/review-unread-spam-email-drafts/light.webp)

Classify incoming email and prepare review-only replies for messages classified as spam.

## Setup

Connect the same IMAP mailbox to both Open Flow Actions and configure an AI model.

## Behavior

Every five minutes, retrieve up to ten unread inbox messages. The source passes only messages classified as SPAM to its drafting step, so this template retains that condition. Other categories are skipped. The result contains sender, subject, category and a review draft; no reply is sent and messages remain unread, so later runs can process them again. Email text is sent to the configured model. Inspect execution results for drafts.

In n8n

For n8n install the self-hosted community node n8n-nodes-imap version 3.0.1, connect an IMAP credential and configure both AI models.

Inspiration & credits

## Changes to the source

Replace the source unsupported scheduled IMAP trigger operation with scheduled IMAP search Actions and the n8n community IMAP node; use a configurable model.

Adapted from [AI Email Auto-Responder with Ollama](https://github.com/enescingoz/awesome-n8n-templates/blob/827110332c21cbe000ab13f6d292d5adb1f1f8db/Gmail_and_Email_Automation/AI%20Email%20Auto-Responder%20with%20Ollama.json) in [enescingoz/awesome-n8n-templates](https://github.com/enescingoz/awesome-n8n-templates).

Source collection notice: © 2024–2026 Enes Cingoz, [CC BY 4.0](https://github.com/enescingoz/awesome-n8n-templates/blob/827110332c21cbe000ab13f6d292d5adb1f1f8db/LICENSE). The source export does not identify a separate template author or license. See [repository licensing](https://github.com/oomol-lab/awesome-workflow-templates/blob/4ae2934012d3865e7d296909b9a06728464f1991/README.md#licensing) for the scope of OOMOL contributions and third-party material.

## Apps used

*   [**IMAP Mailbox**`generic_imap`](https://openflow.run/en/integrations/generic_imap/)

## What you’ll need

*   IMAP account
*   AI model

*   imap
*   email
*   ai
*   drafts

[View on GitHub](https://github.com/oomol-lab/awesome-workflow-templates/blob/4ae2934012d3865e7d296909b9a06728464f1991/workflows/review-unread-spam-email-drafts/README.md)
