I’m trying to create an ai agent that answers questions based on my database (like a customer support representative) and when it doesn’t know the answer to a question, it emails me with the customer’s email, question, and the conversation thread.
I’ve setup this workflow in n8n and it answers questions based on my database. If it doesn’t know the answer, it responds to the customer with “Let me have someone on the team look into this and we will get back to you ASAP. What email would you like us to follow up with?”. This is what currently works.
However, I can’t figure out how to get it to email me whenever someone asks a question that it doesn’t know the answer to. How do I make it do this too?
Here is my current workflow:
As you can see, I’ve tried setting up an If node after the Q&A chain but that ends up with the following response in the Q&A section: [No response. Make sure the last executed node outputs the content to display here]
I’ve also tried using a different type of AI Agent (shown at top of workflow) but that didn’t work either.
One way of doing this could be to use the AI Agent and connect both the Vector Store and a Send Email tool to the same AI Agent like this:
I’ve tested this out and seems to work for me alright, although it’s not 100% reliable when it comes to when the Agent decides to forward the request. Try it out and let me know if this helps for what you have in mind!
Thanks for this idea! I was able to get the email to send when it didn’t know the answer but the AI agent didn’t collect their email so there is no way for me to respond to them.
Do you know how to get it to collect their email first?
Also, it didn’t include the entire conversation so there probably won’t be enough context for me to answer the question.
Do you know how I can make sure the email includes the entire conversation?