Skip to main content

Triage Gmail emails, draft AI replies, and log to Google Sheets with GPT-4o

Workflow preview

Workflow preview
100%
Triage Gmail emails, draft AI replies, and log to Google Sheets with GPT-4o preview
Open on n8n.io

1. Workflow Overview

Quick overview Automatically triage your Gmail inbox using OpenAI GPT 4o. Each new email is classified as Urgent or Not Urgent. Urgent emails get an AI drafted reply saved to Gmail Drafts. All emai...

Best for

  • Ticket Management automation workflows
  • AI Summarization automation workflows
  • intermediate n8n builders looking for reusable templates

Tools used

n8n-nodes-base.stickynote, n8n-nodes-base.gmailtrigger, n8n-nodes-base.set, @n8n/n8n-nodes-langchain.openai, n8n-nodes-base.if, n8n-nodes-base.gmail, n8n-nodes-base.googlesheets

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Muhammad Adeel.

Original n8n.io source

1.1 Workflow description

Title
Triage Gmail emails, draft AI replies, and log to Google Sheets with GPT-4o
Workflow name
Triage Gmail emails, draft AI replies, and log to Google Sheets with GPT-4o

Quick overview

Automatically triage your Gmail inbox using OpenAI GPT-4o. Each new email is classified as Urgent or Not Urgent. Urgent emails get an AI-drafted reply saved to Gmail Drafts. All emails are logged to Google Sheets for tracking.

How it works

  1. Triggers every minute when a new email arrives in Gmail.
  2. Extracts the sender, subject, body text, message ID, and thread ID from the email.
  3. Sends the email details to OpenAI GPT-4o to classify the message as URGENT or NOT_URGENT.
  4. If the email is urgent, OpenAI GPT-4o generates a concise reply and the workflow saves it as a Gmail draft in the original thread.
  5. Appends a row to Google Sheets for each email, marking the urgency and whether a draft was created.

Setup

  1. Connect a Gmail OAuth2 credential and adjust any trigger filters (such as labels) to control which emails are processed.
  2. Add an OpenAI API credential with access to the gpt-4o model for both the classification and reply-drafting steps.
  3. Connect a Google Sheets OAuth2 credential, set the target spreadsheet ID and sheet name, and create the columns Timestamp, Sender, Subject, Urgency, and Draft Created.

Requirements

  • Gmail account connected via OAuth2
  • OpenAI API key with GPT-4o access
  • Google account with Google Sheets OAuth2 connected
  • A Google Sheet with headers: Timestamp | Sender | Subject | Urgency | Draft Created

Customization

  • Change the Gmail Trigger to watch a specific label (e.g. "Clients" or "Support") instead of the full inbox to narrow the scope
  • Edit the urgency classification prompt in the Classify Email Urgency node to add a MEDIUM priority tier and add a third IF branch
  • Modify the reply tone in the Draft Urgent Reply node prompt — change "professional" to "friendly", "concise", or "formal"
  • Add a Slack or Telegram node after the IF node to send yourself an instant notification when an urgent email is detected
  • Replace the Google Sheets log with Notion, Airtable, or a CRM of your choice

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 2 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 3 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 4 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 5 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 6 - When New Email Arrives

Type / Role
n8n-nodes-base.gmailTrigger - gmailTrigger
Config choices
Version 1

Block 7 - Extract Email Details

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3

Block 8 - AI Determines Urgency

Type / Role
@n8n/n8n-nodes-langchain.openAi - openAi
Config choices
Version 1

Block 9 - Assign Urgency Label

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3

Block 10 - Check Email Urgency

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2

Block 11 - Draft Urgent Reply with AI

Type / Role
@n8n/n8n-nodes-langchain.openAi - openAi
Config choices
Version 1

Block 12 - Create Draft in Gmail

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2

Block 13 - Log Urgent Email to Sheets

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4

Block 14 - Log Non-Urgent Email to Sheets

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4

3. Summary Table

Workflow Triage Gmail emails, draft AI replies, and log to Google Sheets with GPT-4o
Complexity intermediate
Nodes 14
Categories Ticket Management, AI Summarization
Author Muhammad Adeel
Published 26 May 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/15953/15953.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Triage Gmail emails, draft AI replies, and log to Google Sheets with GPT-4o do?

Quick overview Automatically triage your Gmail inbox using OpenAI GPT 4o. Each new email is classified as Urgent or Not Urgent. Urgent emails get an AI drafted reply saved to Gmail Drafts. All emai...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Ticket Management, AI Summarization use case.