Skip to content
NEWMarketplace and the trig8n Agent: sell what you build, and get plans and changes that are tested before you see them. See what is new

Library / RAG & Knowledge Bases

RAG & Knowledge Bases

Embed Gmail Emails into PGVector with Ollama

When a new Gmail message arrives or you run it manually, it splits the email text, embeds it with local Ollama and stores it in Postgres PGVector.

What it does

# Gmail to Vector Embeddings with PGVector and Ollama ## Overview 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. ## Workflow Details - Total Nodes: 20 - Node Types: 15 - Error Handling: ✅ Implemented - Security: ✅ Hardened (no sensitive data) - Documentation: ✅ Complete ## Node Breakdown - Embeddings Ollama: embeddingsOllama - Default Data Loader: documentDefaultDataLoader - Recursive Character Text Splitter: textSplitterRecursiveCharacterTextSplitter - Gmail Trigger: gmailTrigger - Loop Over Items: splitInBatches - Split Out: splitOut - Was manually triggered?: if - Manual Trigger: manualTrigger - No Operation, do nothing: noOp - Sticky Note: stickyNote - ... and 10 more nodes ## Usage Instructions 1. Configure Credentials: Set up all required API keys and credentials 2. Update Variables: Replace any placeholder values with actual data 3. Test Workflow: Run in test mode to verify functionality 4. Deploy: Activate the workflow for production use ## Security Notes - All sensitive data has been removed or replaced with placeholders - Error handling is implemented for reliability - Follow security best practices when configuring credentials ## Troubleshooting - Check error logs if workflow fails - Verify all credentials are properly configured - Ensure all required services are accessible

The steps

  1. Embeddings Ollama
  2. Default Data Loader
  3. Recursive Character Text Splitter
  4. Gmail Trigger
  5. Loop Over Items
  6. Split Out
  7. Was manually triggered?
  8. Manual Trigger
  9. No Operation, do nothing
  10. Set before and after dates
  11. Extract email fields
  12. Store structured
  13. Store vectorized
  14. Create the table

17 steps in total.

Similar automations