Hello. I’m trying to compile a AI agent with n8n and face a problem that stops me from moving forward. I’m using the n8n cloud and want to compile an AI agent that can do the following tasks: It should automatically retrieve emails from the server, read them and understand what the customer’s enquiry is. It should then process this enquiry independently, either by answering the customer’s question or by pulling a link from the Gambio shop (ideally via an API) and sending it to the customer. As customers may write in different languages, the AI agent should also recognise the language and respond in the customer’s language. The AI agent should then send the response to the customer independently. In order to do so, I asked various chat bots and they all lead me to the point where I would have to change in the Basic LLM Chain the Prompt (User Message) from {{ $json.chatInput }} to .body. Also I should somehow navigate at User to Nodes → Manual → Output Data → JSON → body which doesn’t show up. I’m stuck and need some advice what I can do to move forward.
Without the workflow’s code or an image it’s hard to spot where your problem lies. However, from what I understood from the first part of your message, you want the workflow to be something similar to:
- Receive mails from customers using an Email Trigger
- An AI Agent receives this Email as user prompt (This agent has a system message explaining its goal in detail)
- The AI Agent then uses various tools depending on the prompt and outputs a ready-to-go message
- This message is then used in an Email node in order to reply to the user.
Important:
- If you are willing to use an Email trigger with your personal mail address I suppose you have to use a kind of filter: A different workflow that classifies every Email received and only chooses the ones coming from customers.
- Alternatively you can set up an external database for customers with columns as: customer_mail, customer_name, timestamp and customer_enquiry
- I added an example of the workflow that I imagined from your descriptions. I hope it helps.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.