Using MongoDB with LLM

Describe the problem/error/question

New to using AI and espacially within n8n. I’m able to get this to work loading sample data in Supabase, but were planning on loading our data into MongoDB. Using the Supabase it just an an agent that builds a query for me.

What route would I do something similar here with Mongo?

What is the error message (if any)?

Subflow:

Parent flow

Share the output returned by the last node

Information on your n8n setup

  • n8n version: 1.34.2
  • Database (default: SQLite): none
  • n8n EXECUTIONS_PROCESS setting (default: own, main): n/a
  • Running n8n via (Docker, npm, n8n cloud, desktop app): n8n cloud
  • Operating system: none

I guess what I’m needing to do is using the AI agent prompt to build a JSON query that look something like this and be able to call the MongoDB integration, but it looks like the node is only able to find the collection itself

{
  "find": "clients",
  "filter": {
    "Client_First_Name__c": "Test",
    "Client_Last_Name__c": "Tester"
  },
  "projection": {
    "Client_Email__c": 1
  }
}