Automate Follow-Up Emails with a RAG Agent in n8n
detail.loadingPreview
This n8n workflow automates follow-up emails using a Retrieval-Augmented Generation (RAG) agent. It leverages Webhook Trigger, Text Splitter, OpenAI Embeddings, Weaviate, and an Anthropic Chat Model to create contextually relevant responses.
🚀Ready to Deploy This Workflow?
About This Workflow
Overview
This n8n workflow is designed to automate the process of sending follow-up emails by integrating a Retrieval-Augmented Generation (RAG) agent. It starts with a Webhook Trigger to receive incoming requests, followed by a Text Splitter to process the content. OpenAI's Embeddings node generates vector representations of the text, which are then stored and retrieved from Weaviate (a vector database). A Vector Tool makes these retrieved contexts available to the RAG Agent, which, powered by an Anthropic Chat Model and Window Memory, generates intelligent follow-up responses. The workflow also includes logging to a Google Sheet via Append Sheet and error alerting to Slack using Slack Alert.
Key Features
- Trigger email automation via webhook.
- Process and embed incoming text data using OpenAI.
- Store and retrieve contextual information from Weaviate.
- Utilize a RAG agent with an Anthropic chat model for intelligent response generation.
- Maintain conversation history with Window Memory.
- Log execution status to Google Sheets.
- Alert on errors via Slack.
How To Use
- Set up the
Webhook Triggerwith your desired path (e.g.,follow-up-emails). - Configure the
Text SplitterandEmbeddingsnodes, ensuring your OpenAI API credentials are set. - Set up your
Weaviateinstance and provide the necessary API credentials and index name (follow-up_emails). - Configure the
Chat Modelnode with your Anthropic API credentials. - Set up the
RAG Agentnode, defining its system message and integrating theVector ToolandWindow Memory. - Configure the
Append Sheetnode to log results to your Google Sheet, providing the necessary Sheet ID and Log sheet name. - Set up the
Slack Alertnode with your Slack API credentials to receive error notifications. - Trigger the webhook to initiate the workflow.
Apps Used
Workflow JSON
{
"id": "75cba396-aa2a-4c02-bd4a-96ee14e1b143",
"name": "Automate Follow-Up Emails with a RAG Agent in n8n",
"nodes": 0,
"category": "Email Automation",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: 75cba396-aa2a...
About the Author
N8N_Community_Pick
Curator
Hand-picked high quality workflows from the global community.
Statistics
Verification Info
Related Workflows
Discover more workflows you might like
Automated Archiving of Promotional Emails
This workflow automatically archives promotional emails based on their content. It uses a Webhook Trigger to receive email data, then processes and stores embeddings in Pinecone, enabling smart retrieval for archiving.
Automate Gmail PDF Attachments to Google Drive with OpenAI
Automatically send specific PDF attachments from Gmail to Google Drive, leveraging OpenAI for content filtering. This workflow uses the 'On email received' node to trigger, 'OpenAI' to analyze PDF content, and 'Google Drive' to store matched files.
Automated Email Phishing Detection and Jira Ticketing
Detect potential phishing emails using Gmail or Outlook triggers and OpenAI analysis, then automatically create Jira tickets with detailed findings. This workflow enhances security by streamlining the reporting and investigation of suspicious emails.