AI-powered email automation for business: Summarize & respond with RAG
This workflow is ideal for businesses looking to automate their email responses, especially for handling inquiries about company information. It leverages AI to ensure accurate and professional communication. How It W...
Template notes
This workflow is ideal for businesses looking to automate their email responses, especially for handling inquiries about company information. It leverages AI to ensure accurate and professional communication.
How It Works 1. Email Trigger: - The workflow starts with the Email Trigger (IMAP) node, which monitors an email inbox for new messages. When a new email arrives, it triggers the workflow.
2. Email Preprocessing: - The Markdown node converts the email's HTML content into plain text for easier processing by the AI models.
3. Email Summarization: - The Email Summarization Chain node uses an AI model (DeepSeek R1) to generate a concise summary of the email. The summary is limited to 100 words and is written in Italian.
4. Email Classification: - The Email Classifier node categorizes the email into predefined categories (e.g., "Company info request"). If the email does not fit any category, it is classified as "other".
5. Email Response Generation: - The Write email node uses an AI model (OpenAI) to draft a professional response to the email. The response is based on the email content and is limited to 100 words. - The Review email node uses another AI model (DeepSeek) to review and format the drafted response. It ensures the response is professional and formatted in HTML (e.g., using <br, <b, <i, <p tags where necessary).
6. Email Sending: - The Send Email node sends the reviewed and formatted response back to the original sender.
7. Vector Database Integration: - The Qdrant Vector Store node retrieves relevant information from a vector database (Qdrant) to assist in generating accurate responses. This is particularly useful for emails classified as "Company info request". - The Embeddings OpenAI node generates embeddings for the email content, which are used to query the vector database.