{
  "name": "Ask-My-Notes Agent",
  "nodes": [
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "typeVersion": 1.4,
      "position": [
        208,
        0
      ],
      "id": "fc5df5b9-eb5f-49df-b67a-525b4193121c",
      "name": "When chat message received"
    },
    {
      "parameters": {
        "options": {
          "systemMessage": "You are a helpful assistant. You have access to the user's workspace (e.g., Notion, Google Sheet/Docs)  through the connected tools. When the user asks a question about their notes, automatically search the workspace using relevant keywords. Do not ask for permission or page URLs. Use the tools to retrieve the information and answer directly. If nothing relevant is found, say so."
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 3.1,
      "position": [
        416,
        0
      ],
      "id": "fae596f8-fcc8-4448-a7f3-a045d88788be",
      "name": "AI Agent"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/mcp-registry.notion",
      "typeVersion": 1,
      "position": [
        640,
        224
      ],
      "id": "fea9f69c-dda7-4df5-913a-af9dff92cb2d",
      "name": "Notion MCP",
      "credentials": {
        "notionMcpOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "builtInTools": {},
        "options": {
          "timeout": 60000
        }
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.3,
      "position": [
        352,
        224
      ],
      "id": "2e9f9470-e54f-48ff-a5f2-5761bbddf971",
      "name": "OpenAI Chat Model",
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "content": "Permit AI Agent to access the memory/database and tools like this:\n\nYou have access to the user's Notion workspace through the connected tools. When the user asks a question about their notes, automatically search the workspace using relevant keywords. Do not ask for permission or page URLs. Use the tools to retrieve the information and answer directly. If nothing relevant is found, say so.",
        "height": 304,
        "width": 320
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        784,
        -16
      ],
      "typeVersion": 1,
      "id": "e80bbebf-5321-45cd-8df3-d8678c7ca8e4",
      "name": "Sticky Note"
    }
  ],
  "connections": {
    "When chat message received": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Notion MCP": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1",
    "binaryMode": "separate",
    "availableInMCP": false
  },
  "staticData": null,
  "triggerCount": 0,
  "meta": {
    "templateCredsSetupCompleted": true
  }
}