{
  "name": "Automatically add travel time blockers to calendar using Google Directions API",
  "nodes": [
    {
      "id": "d3159820-3586-40d4-846b-d26a9f8e4ac4",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -352,
        -16
      ]
    },
    {
      "id": "ec74cf5d-14f6-4a7f-91e7-ee5c5e246edb",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        496,
        -16
      ]
    },
    {
      "id": "e2973419-4b29-49e9-896a-2253ba32bdcc",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        192,
        272
      ]
    },
    {
      "id": "495b92f3-9ad0-4cad-9675-55dbc237ca1c",
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        592,
        160
      ]
    },
    {
      "id": "f8db0af5-71c2-4ea4-a576-9b9bd3d56544",
      "name": "get_calendar_events",
      "type": "n8n-nodes-base.googleCalendarTool",
      "position": [
        976,
        416
      ]
    },
    {
      "id": "b266622e-0ed4-4d2d-b7b7-8a519f63112e",
      "name": "create_calendar_event",
      "type": "n8n-nodes-base.googleCalendarTool",
      "position": [
        1184,
        416
      ]
    },
    {
      "id": "2fa6cda0-ec33-40b9-b7fd-ca2322f811c0",
      "name": "travel_directions",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        976,
        96
      ]
    },
    {
      "id": "7d71f6ef-5b2f-4de5-a3c1-ab1a97aae97e",
      "name": "set Travel_time",
      "type": "n8n-nodes-base.set",
      "position": [
        1824,
        80
      ]
    },
    {
      "id": "214b8939-1f46-4444-a49d-e31f6b3f5237",
      "name": "Call Google Directions API",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1472,
        80
      ]
    },
    {
      "id": "07272792-441a-4386-9cde-32f69f37a64f",
      "name": "Sub: travel_directions",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        1136,
        80
      ]
    },
    {
      "id": "cad9a72e-e5fe-483a-aa76-67ae557ed688",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -400,
        -80
      ],
      "parameters": {
        "width": 198,
        "height": 224,
        "content": "### Runs daily at 7 am"
      }
    },
    {
      "id": "d0433739-edf4-4da3-97dd-9db22fe84512",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        464,
        -80
      ],
      "parameters": {
        "width": 358,
        "height": 368,
        "content": "### The Agent handles the workflow"
      }
    },
    {
      "id": "bdf40090-c8d5-4847-b163-0bb5c673bda4",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -144,
        -320
      ],
      "parameters": {
        "width": 550,
        "height": 464,
        "content": "### Set Default Values\n**home**: Your default address, from where travel time should be calculated\n\n**Blocker name**: The name which you want the Travel time blocker to have in your calendar\n\n**mode**"
      }
    },
    {
      "id": "6bb823e9-d8a2-4a13-a1ae-55e85476d041",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        896,
        336
      ],
      "parameters": {
        "width": 438,
        "height": 224,
        "content": "### Select the Credentials for your Google Calendar"
      }
    },
    {
      "id": "42ae1381-6c17-4ad5-afd4-97ef4afb9850",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        64,
        176
      ],
      "parameters": {
        "width": 342,
        "height": 224,
        "content": "### Select the Credentials for your OpenAI API or change for  another provider"
      }
    },
    {
      "id": "2af5598b-3f61-43dd-b493-9955defed5ac",
      "name": "Set Defaults",
      "type": "n8n-nodes-base.set",
      "position": [
        80,
        -16
      ]
    },
    {
      "id": "37163bbe-366d-4c35-a3f7-6f6a55304ed8",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        928,
        0
      ],
      "parameters": {
        "width": 374,
        "height": 240,
        "content": "### This exposes the Sub-workflow as a tool for the Agent"
      }
    },
    {
      "id": "412286ef-f9c7-4cd1-8aa7-eecfd740774d",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1328,
        -96
      ],
      "parameters": {
        "width": 390,
        "height": 336,
        "content": "### Select the Credentials for your Google Directions API\n- Follow these [Instructions to get the API key](https://g.co/gemini/share/b731be41d4f3) for the Google Directions API\n- Open the Node and cre"
      }
    },
    {
      "id": "d990d59b-f2f1-4ac5-b44f-a2d6bd323505",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        896,
        -128
      ],
      "parameters": {
        "width": 1168,
        "height": 416,
        "content": "### Getting the Travel Time"
      }
    },
    {
      "id": "a556232d-d2c3-4c31-b999-fcebf43850ad",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1760,
        -32
      ],
      "parameters": {
        "width": 246,
        "height": 272,
        "content": "### This passes on only the Travel_time to the Agent, saving on Tokens"
      }
    },
    {
      "id": "f6ffdca9-9c9a-4849-943c-d8cf4e9fab5e",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1088,
        -416
      ],
      "parameters": {
        "width": 640,
        "height": 1120,
        "content": "## Automatically add Travel time blockers before Appointments\nThis bot automatically adds Travel time blockers to your calendar, so you never come late to an appointment again.\n\n\n## How it works\n* **T"
      }
    }
  ],
  "connections": {
    "Set Defaults": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Set Defaults",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "travel_directions": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "get_calendar_events": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "create_calendar_event": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Sub: travel_directions": {
      "main": [
        [
          {
            "node": "Call Google Directions API",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Call Google Directions API": {
      "main": [
        [
          {
            "node": "set Travel_time",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}