Gmail to Vector Embeddings with PGVector and Ollama

Automated workflow: Gmail to Vector Embeddings with PGVector and Ollama. This workflow integrates 15 different services: stickyNote, textSplitterRecursiveCharacterTextSplitter, code, gmailTrigger, splitOut. It contains 20 nodes and follows best practices for error handling and security.

Integrations Used (2)

Workflow Structure (17 nodes)
100%
Set
Set before and after dates
Gmail
Get a batch of messages
Set
Extract email fields
Postgres
Store structured
No Op
Embeddings Ollama
No Op
Store vectorized
No Op
Default Data Loader
If
Was manually triggered?
No Op
No Operation, do nothing
Manual Trigger
Manual Trigger
Postgres
Create the table
Code
Explode interval into weeks
Split Out
Split Out
Split In Batches
Loop Over Items
Stop And Error
Error Handler
Gmail Trigger
Gmail Trigger
No Op
Recursive Character Text Splitter
Node Types:
default
trigger
logic
transform
action
code
Requires credentials

Prerequisites

No credentials required!

This workflow can be imported and used immediately.

Complexity

Advanced

Expert level. Custom code, complex logic, many integrations.

Setup time: ~35 min
Score: 75/100
Custom Code
Conditional Logic
Loops
6 Integrations

When to Use This Workflow

Email Automation

Automate email responses, forwarding, or organization based on rules.

Handle routine email tasks automatically and focus on what matters.

Real-time Response

React instantly when events happen - new orders, form submissions, or API calls.

Zero delay between trigger and action for time-sensitive workflows.

Error Reduction

Eliminate human error from routine processes with consistent automation.

Improve accuracy and reliability across your workflows.

workflow.json
{
  "id": "ZiIoKEClTk83g1Jt",
  "meta": {
    "instanceId": "workflow-8bfd2626",
    "versionId": "1.0.0",
    "createdAt": "2025-09-29T07:07:54.451560",
    "updatedAt": "2025-09-29T07:07:54.451597",
    "owner": "n8n-user",
    "license": "MIT",
    "category": "automation",
    "status": "active",
    "priority": "high",
    "environment": "production"
  },
  "name": "Gmail to Vector Embeddings with PGVector and Ollama",
  "tags": [
    "automation",
    "n8n",
    "production-ready",
    "excellent",
...

Workflow Details

Nodes
21
Trigger
Event
Source
community
Added
Sep 29, 2025

Need Help?

Check out the official n8n documentation for detailed guides.

Related Workflows

Suspicious_login_detection

Automated workflow: Suspiciouslogindetection. This workflow integrates 15 different services: webhook, stickyNote, httpR...

Webhook
Postgres
Http-request
Gmail
43 nodesWebhook

Qualify replies from Pipedrive persons with AI

About the workflow The workflow reads every reply that is received from a cold email campaign and qualifies if the lead...

Pipedrive
Openai
Gmail
11 nodesEvent
Curated

Agent Workflow

Automated workflow: Agent Workflow. This workflow integrates 97 different services: vectorStoreInMemory, if, gumroadTrig...

Bitly
Dropbox
Gmail
Google-calendar
113 nodesEvent

Readpdf Workflow

Automated workflow: Readpdf Workflow. This workflow integrates 11 different services: stickyNote, code, gmailTrigger, re...

Readpdf
Openai
Google-drive
Gmail
19 nodesEvent

Openai Workflow

Automated workflow: Openai Workflow. This workflow integrates 15 different services: webhook, stickyNote, code, gmailTri...

Openai
Gmail
Google-sheets
Webhook
49 nodesEvent

Postgrestrigger Workflow

Automated workflow: Postgrestrigger Workflow. This workflow integrates 7 different services: filter, stickyNote, code, s...

Postgres
Google-sheets
10 nodesEvent