{
  "name": "Datavej: property brief for an address",
  "nodes": [
    {
      "id": "3a79d3bb-0c2e-5642-8f83-7028789a71b3",
      "name": "Setup",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -460,
        -120
      ],
      "parameters": {
        "content": "## Datavej setup\n1. Create an API key at https://datavej.dk/dashboard#keys.\n2. Open the **Datavej** node, choose **Bearer Auth** and create a credential with the key as the token.\n   Prefer signing in? Switch Authentication to **MCP OAuth2** and connect: n8n registers itself and you approve it in the browser.\n3. Pick your OpenAI credential on **OpenAI Chat Model** (or swap in another chat model), then open the chat.\n\nGuide: https://datavej.dk/n8n\n\nTry: *Write a property brief for Prins Jørgens Gård 1, 1218 København K*",
        "width": 420,
        "height": 360
      }
    },
    {
      "id": "c83f4dd3-415b-52ff-9e6a-45caf8b72092",
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "typeVersion": 1.1,
      "position": [
        0,
        0
      ],
      "webhookId": "dec94f08-5c64-53a6-9540-1388f57bc419",
      "parameters": {
        "options": {}
      }
    },
    {
      "id": "e21d7b39-b632-553a-a9f2-dd9b32e3529a",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 2,
      "position": [
        260,
        0
      ],
      "parameters": {
        "options": {
          "systemMessage": "You write a short property brief for a Danish address using only Datavej's tools. Start with address_search; if exact_match is false, ask which address the user means and stop. Then call building_info, property_valuation, planning_rules, protected_areas and soil_contamination with the address_id. Write the brief in the user's language with these headings: Address, Buildings (BBR), Public valuation, Planning, Protected areas, Soil contamination, Sources. Quote figures as the registers give them, pass on data_notes and caveats, call any land-tax figure an estimate by Datavej, and end with the source attribution lines the tools return."
        }
      }
    },
    {
      "id": "7c97bae4-8eef-5ee4-84ca-ca6480a423e8",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        140,
        240
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      }
    },
    {
      "id": "be2f3042-504d-5f20-92eb-0160cdfde8bf",
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [
        300,
        240
      ],
      "parameters": {}
    },
    {
      "id": "9387ddc2-8e96-5f41-a0ae-81dbdb1a6940",
      "name": "Datavej",
      "type": "@n8n/n8n-nodes-langchain.mcpClientTool",
      "typeVersion": 1.2,
      "position": [
        460,
        240
      ],
      "parameters": {
        "endpointUrl": "https://datavej.dk/mcp",
        "serverTransport": "httpStreamable",
        "authentication": "bearerAuth",
        "include": "selected",
        "includeTools": [
          "address_search",
          "building_info",
          "property_valuation",
          "planning_rules",
          "protected_areas",
          "soil_contamination"
        ],
        "options": {}
      }
    }
  ],
  "connections": {
    "When chat message received": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Datavej": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "pinData": {},
  "meta": {
    "templateCredsSetupCompleted": false
  },
  "tags": []
}
