AI Agents

Gmail automation

19 nodes 227 108 Automatic trigger
Download

Workflow Description

An advanced Gmail automation template that receives incoming emails and analyzes them using a language model before organizing results automatically based on message content and context.

How it works

  1. 1.Receive incoming Gmail messages automatically when they arrive in the inbox
  2. 2.Send message content to an LLM processing chain powered by OpenAI
  3. 3.Analyze email text and categorize it according to defined criteria using structured output parsing
  4. 4.Consolidate processed results and segment them into actionable categories for follow-up

Use cases

  • Automatically sort and classify customer emails by priority and subject matter
  • Extract and organize important data from messages for customer relationship management purposes

Requirements

  • Active Gmail account with API access permissions to read messages and send replies
  • Valid OpenAI API key to operate language models for text analysis

Service Value

Ideal as a smart automation service combining integrations and AI to produce ready-to-use results.

Apps Used

Gmail LLM Chain OpenAI Output Parser

Details

Trigger Automatic trigger
Nodes 19
Apps 4
Views 227
Downloads 108

How to Use

  1. 1.Click "Download Template"
  2. 2.Open your n8n dashboard
  3. 3.Go to Workflows > Import from File
  4. 4.Select downloaded file and configure credentials

Nodes Used (19)

/

Sticky Note

Sticky Note

#1

Sticky Note1

Sticky Note

#2

Sticky Note2

Sticky Note

#3

Sticky Note4

Sticky Note

#4

Sticky Note5

Sticky Note

#5

Sticky Note6

Sticky Note

#6

Sticky Note7

Sticky Note

#7

Sticky Note8

Sticky Note

#8

Gmail trigger

Gmail

#9

Get message content

Gmail

#10

Assign labels for message

LLM Chain

#11

OpenAI Chat

OpenAI

#12

JSON Parser

Output Parser Structured

#13

Set label values

Set

#14

Get all labels

Gmail

#15

Split out assigned labels

Split Out

#16

Merge corresponding labels

Merge

#17

Aggregate label IDs

Aggregate

#18

Add labels to message

Gmail

#19