{
  "name": "Dexter - AI Chief of Staff",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "dexter-chat",
        "responseMode": "lastNode",
        "options": {}
      },
      "id": "webhook-trigger",
      "name": "Chat Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [
        0,
        0
      ]
    },
    {
      "parameters": {
        "options": {
          "systemMessage": "Du \u00e4r Dexter, en avancerad AI-assistent och 'Chief of Staff'.\nDin uppgift \u00e4r att organisera anv\u00e4ndarens liv och arbete.\nDu har tillg\u00e5ng till kalender, mail och m\u00f6tesverktyg.\nVar proaktiv, professionell och effektiv.\nOm du beh\u00f6ver boka m\u00f6ten, kolla alltid kalendern f\u00f6rst."
        }
      },
      "id": "ai-agent",
      "name": "Dexter AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.0,
      "position": [
        220,
        0
      ]
    },
    {
      "parameters": {
        "model": "gpt-4o"
      },
      "id": "openai-model",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1,
      "position": [
        220,
        220
      ],
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {},
      "id": "memory-window",
      "name": "Window Buffer Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1,
      "position": [
        360,
        220
      ]
    },
    {
      "parameters": {
        "toolDescription": "Anv\u00e4nds f\u00f6r att l\u00e4sa, skapa och uppdatera h\u00e4ndelser i Google Kalender.",
        "calendarId": "primary"
      },
      "id": "tool-calendar",
      "name": "Google Calendar Tool",
      "type": "@n8n/n8n-nodes-langchain.toolGoogleCalendar",
      "typeVersion": 1,
      "position": [
        500,
        220
      ],
      "credentials": {
        "googleCalendarOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "toolDescription": "Anv\u00e4nds f\u00f6r att l\u00e4sa, skicka och hantera e-post via Gmail."
      },
      "id": "tool-gmail",
      "name": "Gmail Tool",
      "type": "@n8n/n8n-nodes-langchain.toolGmail",
      "typeVersion": 1,
      "position": [
        640,
        220
      ],
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "webhook-trigger": {
      "main": [
        [
          {
            "node": "ai-agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "openai-model": {
      "ai_languageModel": [
        [
          {
            "node": "ai-agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "memory-window": {
      "ai_memory": [
        [
          {
            "node": "ai-agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "tool-calendar": {
      "ai_tool": [
        [
          {
            "node": "ai-agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "tool-gmail": {
      "ai_tool": [
        [
          {
            "node": "ai-agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  }
}