{
  "nodes": [
    {
      "parameters": {
        "promptType": "define",
        "text": "= {{ $json.blocks[0].elements[0].elements[0].text }}",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.7,
      "position": [
        0,
        0
      ],
      "id": "337a94f1-188e-4cef-bb06-50edb907d724",
      "name": "AI Agent",
      "alwaysOutputData": true,
      "notesInFlow": true
    },
    {
      "parameters": {
        "model": "openai/gpt-3.5-turbo",
        "options": {
          "baseURL": "https://openrouter.ai/api/v1"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1,
      "position": [
        -280,
        260
      ],
      "id": "d3f548d8-0ed7-4c66-a88c-d81eb0f95541",
      "name": "OpenRouter Model",
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "sessionIdType": "customKey",
        "sessionKey": "sessionId1"
      },
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [
        -120,
        260
      ],
      "id": "29250ddd-a9b9-46cc-8167-2cc166070a2e",
      "name": "Window Buffer Memory"
    },
    {
      "parameters": {
        "trigger": [
          "message"
        ],
        "channelId": {
          "__rl": true,
          "value": "C084EN4RZDK",
          "mode": "id"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.slackTrigger",
      "typeVersion": 1,
      "position": [
        -440,
        0
      ],
      "id": "94a54ed5-6632-46cf-912a-bf009de59527",
      "name": "Slack Trigger",
      "credentials": {
        "slackApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "select": "channel",
        "channelId": {
          "__rl": true,
          "value": "C084EN4RZDK",
          "mode": "id"
        },
        "text": "={{ $json.output }}",
        "otherOptions": {
          "includeLinkToWorkflow": false,
          "botProfile": {
            "imageValues": {
              "profilePhotoType": "image",
              "icon_url": "https://www.shutterstock.com/image-vector/chat-bot-icon-virtual-smart-600nw-2478937555.jpg"
            }
          }
        }
      },
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2.3,
      "position": [
        640,
        0
      ],
      "id": "f46d81d3-d12f-4565-956e-6928c705007b",
      "name": "Slack",
      "credentials": {
        "slackApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "7bc51d2f-e6ea-44c7-ab43-da6f51e0902e",
              "leftValue": "={{ $json.user }}",
              "rightValue": "U0842C9GGSW",
              "operator": {
                "type": "string",
                "operation": "equals",
                "name": "filter.operator.equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.filter",
      "typeVersion": 2.2,
      "position": [
        -280,
        0
      ],
      "id": "8653d6c2-21e3-4006-8aac-0ff80381a57f",
      "name": "Filter"
    },
    {
      "parameters": {},
      "type": "@n8n/n8n-nodes-langchain.toolWikipedia",
      "typeVersion": 1,
      "position": [
        20,
        220
      ],
      "id": "d825f1a7-dd52-4f55-9850-38151b470ff9",
      "name": "Wikipedia"
    },
    {
      "parameters": {},
      "type": "@n8n/n8n-nodes-langchain.toolCalculator",
      "typeVersion": 1,
      "position": [
        120,
        220
      ],
      "id": "3608351c-168b-4ca2-b3b4-f16bf8c137d0",
      "name": "Calculator"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.toolSerpApi",
      "typeVersion": 1,
      "position": [
        220,
        220
      ],
      "id": "964e5afc-79dc-4c06-a634-54f90144319c",
      "name": "SerpAPI",
      "credentials": {
        "serpApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "name": "get_calendar_event_data",
        "description": "Call this tool to determine calendar event data to use in the Google Calendar tool later",
        "workflowId": {
          "__rl": true,
          "value": "4E24yNTXdqkDPVk2",
          "mode": "list",
          "cachedResultName": "tool-calendar-get-event-data"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "typeVersion": 1.3,
      "position": [
        360,
        440
      ],
      "id": "d99d086c-fe1c-4f84-94a0-ddb792e8c0c9",
      "name": "tool_get_event_data"
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "14lgb4egVYcRSHbmV0dSiPwHMBs_f8YUwGttSyYuXZMA",
          "mode": "id"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "forLater",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/14lgb4egVYcRSHbmV0dSiPwHMBs_f8YUwGttSyYuXZMA/edit#gid=0"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheetsTool",
      "typeVersion": 4.5,
      "position": [
        420,
        220
      ],
      "id": "6c4d3fb0-96e5-4e72-aa94-aa1fff840ba8",
      "name": "Get bookmarks tool",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "resource": "fileFolder",
        "queryString": "={{ $fromAI('placeholder_name') }} ",
        "filter": {},
        "options": {}
      },
      "type": "n8n-nodes-base.googleDriveTool",
      "typeVersion": 3,
      "position": [
        580,
        220
      ],
      "id": "f94e9d49-abdf-4589-923b-08291e9048ce",
      "name": "Access Google Drive tool",
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "calendar": {
          "__rl": true,
          "value": "dominikurbaezgomez@gmail.com",
          "mode": "list",
          "cachedResultName": "dominikurbaezgomez@gmail.com"
        },
        "start": "={{ $fromAI('dateStart') }}Z",
        "end": "={{ $fromAI('dateEnd') }}Z",
        "additionalFields": {
          "summary": "={{ $fromAI('title') }}"
        }
      },
      "type": "n8n-nodes-base.googleCalendarTool",
      "typeVersion": 1.2,
      "position": [
        780,
        220
      ],
      "id": "b788a09f-e747-4bc1-baf9-d02e0654b33e",
      "name": "Create event tool",
      "notesInFlow": true,
      "credentials": {
        "googleCalendarOAuth2Api": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "AI Agent": {
      "main": [
        [
          {
            "node": "Slack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenRouter Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Window Buffer Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Slack Trigger": {
      "main": [
        [
          {
            "node": "Filter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wikipedia": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Calculator": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "SerpAPI": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "tool_get_event_data": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Get bookmarks tool": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Access Google Drive tool": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Create event tool": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  }
}