GenAiHub

Last checked 5 August 2026 — responded normally.

Classify emails and draft responses with Gmail, GPT-5-mini, and Sheets

Email Automation Workflow Template

Live
Open / InstallLast updated August 5, 2026

Description

Email Automation Workflow Template This n8n template demonstrates how to automate email classification, labeling, draft generation, and logging using Gmail, OpenAI, and Google Sheets. Use cases include customer support management, sales inquiry handling, and keeping track of incoming emails efficiently in a structured way. Good to know Gmail OAuth2 credentials are required for sending, labeling, and drafting emails. OpenAI credentials are needed for generating draft responses. Google Sheets must have Logs and Errors sheets with the correct columns (Original Email, Decision, Output Email for Logs; Node with Error, Error Message, Time, Execution ID, Workflow ID for Errors). The workflow is designed to handle multiple emails simultaneously and continues even if a node fails. How it works The workflow is triggered by new emails in Gmail. Emails are classified into categories: Support, Sales, Complaints, Information, or Other. Based on the classification: Support and Sales emails → Draft response generated with OpenAI and labeled in Gmail. Complaints, Information, and Other → Emails labeled accordingly. All processed emails and generated outputs are logged in Google Sheets (Logs). Any workflow errors are captured in the Errors sheet for debugging. How to use Test with a sample email to confirm classification, draft generation, labeling, and logging work correctly. Update Google Sheets nodes with your document ID and sheet names. Requirements Gmail account with OAuth2 credentials OpenAI account for draft generation Google Sheets account for logging Customizing this workflow Add new email categories or refine existing ones. Adjust draft responses or templates for Support/Sales. Integrate with other apps or systems for more advanced automation (e.g., CRM updates, notifications). An n8n automation workflow template by Sergio Afonso.

Community Metrics

Views
1,856
Avg Rating
N/A
Ratings
0
Likes
0
Comments
—

Author

Sergio Afonso

Platform

web

Pricing model

free

Categories

  • Automation
  • AI

Tags

  • n8n
  • workflow
  • google-sheets
  • telegram
  • gmail
  • ai-agent
  • openai-chat-model
  • structured-output-parser
  • text-classifier

Capabilities

  • 7 nodes
  • 1,856 views

Information

TypeWorkflow
Sourcen8n
AddedAugust 25, 2025

Comments

?

Others in the same category, ranked by how often they are opened.