Developer & DevOps

Gmail to using and

20 nodes 219 126 Automatic trigger
Download

Workflow Description

An automation template that receives Gmail messages, processes them by splitting text content into manageable chunks, generates semantic embeddings using a local model, and stores both data and vectors in Postgres with vector search capabilities for intelligent retrieval.

How it works

  1. 1.Trigger on new Gmail messages
  2. 2.Split message content into chunks using recursive character splitting
  3. 3.Generate vector embeddings from text using Ollama
  4. 4.Store data and embeddings in Postgres with pgvector support

Use cases

  • Build semantic search engine over email content
  • Archive and retrieve email documents using intelligent vector similarity

Requirements

  • Gmail account with API access enabled
  • Postgres database with pgvector extension installed and configured

Service Value

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

Apps Used

Embeddings Document Default Data Loader Text Splitter Gmail Split In Batches Postgres Vector Store

Details

Trigger Automatic trigger
Nodes 20
Apps 7
Views 219
Downloads 126

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

/

Embeddings Ollama

Embeddings Ollama

#1

Default Data Loader

Document Default Data Loader

#2

Recursive Character Text Splitter

Text Splitter Recursive Character Text Splitter

#3

Gmail Trigger

Gmail

#4

Loop Over Items

Split In Batches

#5

Split Out

Split Out

#6

Was manually triggered?

If

#7

Manual Trigger

Manual Trigger

#8

No Operation, do nothing

No Op

#9

Sticky Note

Sticky Note

#10

Sticky Note1

Sticky Note

#11

Sticky Note2

Sticky Note

#12

Set before and after dates

Set

#13

Extract email fields

Set

#14

Sticky Note3

Sticky Note

#15

Store structured

Postgres

#16

Store vectorized

Vector Store P G Vector

#17

Create the table

Postgres

#18

Explode interval into weeks

Code

#19

Get a batch of messages

Gmail

#20