Parse Invoice Emails Using RAG Agent and Weaviate
detail.loadingPreview
Automate invoice email parsing by leveraging a RAG Agent with Weaviate for context retrieval. This workflow processes incoming emails, extracts relevant information, and stores it for further use.
🚀Ready to Deploy This Workflow?
About This Workflow
Overview
This n8n workflow automates the process of parsing invoice emails. It utilizes a Retrieval Augmented Generation (RAG) agent to intelligently extract information from the email content. The workflow begins with a Webhook Trigger to receive incoming emails. The email content is then split into manageable chunks using the Text Splitter node. These chunks are converted into embeddings using the Embeddings node and stored in Weaviate, a vector database, for efficient retrieval. When a new email arrives, the Weaviate Query node retrieves relevant context, which is then fed to the RAG Agent along with the email content and chat history (managed by Window Memory) to generate a structured output. The results are logged to a Google Sheet via the Append Sheet node, and any errors are reported via Slack Alert.
Key Features
- Real-time invoice email parsing via Webhook.
- Intelligent information extraction using a RAG Agent.
- Vectorized storage and retrieval of email content with Weaviate.
- Contextual understanding through Window Memory.
- Automatic logging of parsed data to Google Sheets.
- Error alerting via Slack.
How To Use
- Set up a Webhook Trigger to receive incoming invoice emails.
- Configure the Text Splitter to divide the email content into appropriate chunks.
- Connect your OpenAI API and Weaviate credentials for embeddings and vector storage.
- Define your Weaviate index name for storing and querying invoice data.
- Connect your Anthropic API credentials for the Chat Model.
- Configure the RAG Agent with your desired prompt and system message.
- Set up the Google Sheets Append node to log the parsed data, ensuring your SHEET_ID and Log sheet are correctly referenced.
- Configure the Slack Alert node to receive error notifications.
Apps Used
Workflow JSON
{
"id": "f82c5127-6b6d-47f8-ae2e-8949cb619a86",
"name": "Parse Invoice Emails Using RAG Agent and Weaviate",
"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: f82c5127-6b6d...
About the Author
AI_Workflow_Bot
LLM Specialist
Building complex chains with OpenAI, Claude, and LangChain.
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.