AI Agents

Connect Google Sheets with Gmail

21 nodes 228 134 Scheduled trigger
Download

Workflow Description

An automation template that reads data from Google Sheets on a scheduled basis, uses an AI agent powered by OpenAI to analyze and generate custom email content, then sends emails through Gmail in organized batches for safe, efficient delivery.

How it works

  1. 1.Activate the scheduled trigger to run automation at predefined intervals
  2. 2.Retrieve data rows from the connected Google Sheets spreadsheet
  3. 3.Pass data to an AI agent running OpenAI's model for intelligent processing
  4. 4.Split results into safe batches before delivery to prevent overload
  5. 5.Parse and format responses using the structured output parser
  6. 6.Send formatted emails through Gmail automatically in controlled batches

Use cases

  • Send automated email alerts whenever key data changes or milestones are reached in your spreadsheet
  • Generate daily custom reports from customer or sales data and deliver them via email
  • Automate follow-up communications with AI-evaluated opportunities from your leads list

Requirements

  • Connected Google account with read/write permissions for both Sheets and Gmail
  • Valid OpenAI API key with sufficient credits for recurring agent queries
  • Well-organized Google Sheets with clear column headers containing the data to process

Service Value

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

Apps Used

OpenAI AI Agent Google Sheets Gmail Split In Batches Output Parser

Details

Trigger Scheduled trigger
Nodes 21
Apps 6
Views 228
Downloads 134

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 (21)

/

If

If

#1

OpenAI Chat Model3

OpenAI

#2

Agent Classification

Agent

#3

Get Sustainability News

Google Sheets

#4

Send to your mailing list

Gmail

#5

Generate Email HTML

Code

#6

Parse Article Blocks

HTML Page

#7

Extract Articles Blocks

HTML Page

#8

Trigger at 08:30 am

Schedule Trigger

#9

Query EU News Website

HTTP Request

#10

Split Out by Article Block

Split Out

#11

Loop Over Articles

Split In Batches

#12

Sustainability Flag

Set

#13

Merge Article + Flag

Merge

#14

Record Results

Google Sheets

#15

Structured Output Parser

Output Parser Structured

#16

Sticky Note1

Sticky Note

#17

Sticky Note

Sticky Note

#18

Sticky Note2

Sticky Note

#19

Sticky Note3

Sticky Note

#20

Sticky Note4

Sticky Note

#21