# Draft Labeled Gmail Thread Replies

Source: https://openflow.run/en/templates/draft-labeled-gmail-thread-replies/
Content language: en
Template revision: 4ae2934012d3865e7d296909b9a06728464f1991

Communication

Draft a reply to the latest message in each labeled Gmail conversation and remove the processing label.

[Use in Open Flow](https://console.openflow.run/flows?importUrl=https%3A%2F%2Fraw.githubusercontent.com%2Foomol-lab%2Fawesome-workflow-templates%2F4ae2934012d3865e7d296909b9a06728464f1991%2Fworkflows%2Fdraft-labeled-gmail-thread-replies%2Ftemplates%2Fdraft-labeled-gmail-thread-replies.openflow.json)

*   [Open Flow JSON](https://github.com/oomol-lab/awesome-workflow-templates/blob/4ae2934012d3865e7d296909b9a06728464f1991/workflows/draft-labeled-gmail-thread-replies/templates/draft-labeled-gmail-thread-replies.openflow.json)
*   [n8n JSON](https://github.com/oomol-lab/awesome-workflow-templates/blob/4ae2934012d3865e7d296909b9a06728464f1991/workflows/draft-labeled-gmail-thread-replies/templates/draft-labeled-gmail-thread-replies.n8n.json)

![Draft Labeled Gmail Thread Replies workflow in Open Flow](https://openflow.run/template-previews/draft-labeled-gmail-thread-replies/light.webp)

Draft a reply to the latest message in each labeled Gmail conversation and remove the processing label.

## Setup

Connect the same Gmail mailbox on all Gmail nodes and configure an AI model. Create a processing label. Enter its name in **Find labeled conversations** and its matching label ID in **Remove processing label**. Enable persistent State. Prevent overlapping runs and use one format.

## Behavior

Each minute, read labeled conversations, draft a reply to each latest message in the original thread and remove the processing label after the draft is confirmed. No message is sent. Email content is sent to the model; review drafts before sending.

If a draft or label update has an unknown result, inspect Gmail. In Open Flow enter the pending key in **Resolve prior writes**, set resolution to confirmed or absent, rerun and clear those fields.

In n8n

In n8n select the same label on the thread search and removal nodes, configure Gmail, a Data Table with item\_key and status text columns, and an AI model. In n8n inspect the pending Data Table row; complete a missing label update manually and mark it done, or delete the pending-draft row only after confirming no draft exists.

Inspiration & credits

## Changes to the source

Process each thread independently, replace the private Assistant and checkpoint both external writes.

Adapted from [Compose reply draft in Gmail with OpenAI Assistant](https://github.com/enescingoz/awesome-n8n-templates/blob/827110332c21cbe000ab13f6d292d5adb1f1f8db/Gmail_and_Email_Automation/Compose%20reply%20draft%20in%20Gmail%20with%20OpenAI%20Assistant.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

*   [**Gmail**`gmail`](https://openflow.run/en/integrations/gmail/)

## What you’ll need

*   Gmail connection
*   Existing Gmail processing label
*   AI model
*   Persistent State

*   gmail
*   email
*   ai
*   drafts

[View on GitHub](https://github.com/oomol-lab/awesome-workflow-templates/blob/4ae2934012d3865e7d296909b9a06728464f1991/workflows/draft-labeled-gmail-thread-replies/README.md)
