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

Answer Tour Itinerary Emails with OpenAI and Pinecone

When a customer email arrives by IMAP, an AI agent searches a Pinecone vector store of tour packages and replies by SMTP with a tailored itinerary.

What it does

## Steps 1. Connect to your Email using the Email Trigger (IMAP) - that reads for any incoming emails from customers. 2. Text Classfier: to classify the type of emails - first time package request, follow-up email or other email and route accordingly 3. Code: Extract the email content and standardise to JSON format return { ID: email.attributes.uid, Date: emailDate, Subject: emailSubject, EmailContent: emailContent, SenderEmail: senderEmail, SenderName: senderName, } 4. Tour Recomendation AI Agent: Give appropiate System Prompt and the references to the Tools available. 5. OpenaAI Model: ChatGPT-4o 6. Simple memory - upto 5 context window length 7. Answer Quetions with Vector Store: Add specific role and instructions to extract the tour packages from the pinecone database. 8. Send Email: Construct the Email response back to the customer with the packages.

The steps

  1. Email Trigger (IMAP)
  2. OpenRouter Chat Model
  3. OpenAI Chat Model
  4. Simple Memory
  5. Answer questions with a vector store
  6. Pinecone Vector Store
  7. Embeddings OpenAI1
  8. OpenAI Chat Model1
  9. Tour Recommendation AI Agent
  10. Format email content
  11. Route Workflow by Email Type
  12. Package Response Email

Similar automations