{
  "name": "Gap-time cafe finder with OpenRouter AI, Google Calendar, Maps & Slack alerts",
  "nodes": [
    {
      "id": "78eee6b5-5f17-402f-accd-31401dd83b88",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -1440,
        96
      ]
    },
    {
      "id": "62acf1b5-049e-4935-9aac-34e3814102a0",
      "name": "Workflow Configuration",
      "type": "n8n-nodes-base.set",
      "position": [
        -1024,
        96
      ]
    },
    {
      "id": "49fa712f-c2af-4d67-a05a-34e6f4e94897",
      "name": "Get Next Calendar Event",
      "type": "n8n-nodes-base.googleCalendar",
      "position": [
        -544,
        96
      ]
    },
    {
      "id": "ac36ecd0-e473-462e-9baf-463e6e8e130e",
      "name": "Get Travel Time (Google Maps API)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -80,
        96
      ]
    },
    {
      "id": "5d5e1d96-5da9-41f8-8d6f-17749e46e56b",
      "name": "Calculate Gap Time",
      "type": "n8n-nodes-base.code",
      "position": [
        336,
        96
      ]
    },
    {
      "id": "a5893f83-b729-457c-b7e5-8fa0012af49e",
      "name": "Check If Gap >= 30 Minutes",
      "type": "n8n-nodes-base.if",
      "position": [
        784,
        96
      ]
    },
    {
      "id": "360afc4b-0e8f-465c-8f90-717124296437",
      "name": "Get User Preferences",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1216,
        0
      ]
    },
    {
      "id": "caeafb1c-fded-4cb4-bfc9-14ddd2be8a48",
      "name": "Search Nearby Cafes (Google Places API)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1616,
        0
      ]
    },
    {
      "id": "4c5b27fe-aa6f-409f-ac23-73309fb82549",
      "name": "Send Slack Notification",
      "type": "n8n-nodes-base.slack",
      "position": [
        2448,
        0
      ]
    },
    {
      "id": "f9c8f0cb-2bab-4c1f-9b58-21121243eab9",
      "name": "Send Urgent Move Alert (Slack)",
      "type": "n8n-nodes-base.slack",
      "position": [
        1616,
        176
      ]
    },
    {
      "id": "4ca48f3b-4f90-4568-bfbc-b8f660f3d172",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1984,
        0
      ]
    },
    {
      "id": "25f7706b-01b6-44b1-ab27-72123441e352",
      "name": "OpenRouter Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        1984,
        176
      ]
    },
    {
      "id": "f4953b46-e3c0-4f82-9b0f-8fdd7b4a6127",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2032,
        -464
      ],
      "parameters": {
        "width": 416,
        "height": 688,
        "content": "This workflow acts as a Smart Gap-Time Cafe Concierge. It automatically checks your Google Calendar for upcoming events, calculates your available \"gap time\" before the next event, and then suggests a"
      }
    },
    {
      "id": "156d4021-c505-44fc-970f-14bb05c5a690",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1584,
        -464
      ],
      "parameters": {
        "width": 384,
        "height": 432,
        "content": "This node initiates the workflow at a scheduled time.\n\n**Configuration:**\n- The workflow is set to run daily at 12 PM (noon). You can adjust this schedule to fit your needs, for example, running it mu"
      }
    },
    {
      "id": "ac396cb1-15a8-4cf0-8dcc-de773606ff92",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1168,
        -464
      ],
      "parameters": {
        "width": 400,
        "height": 432,
        "content": "This node is crucial for setting up the core variables and API keys required for the workflow to function correctly.\n\n**Configuration:**\n- **currentLocation:** Replace `<__PLACEHOLDER_VALUE__Your curr"
      }
    },
    {
      "id": "24fe91f4-3e01-48e4-82b9-a73d530c5c5b",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -288,
        -464
      ],
      "parameters": {
        "width": 416,
        "height": 432,
        "content": "This node makes an HTTP request to the Google Maps Distance Matrix API to calculate the transit time from your `currentLocation` (defined in \"Workflow Configuration\") to the location of your next cale"
      }
    },
    {
      "id": "0655032e-22ad-4f87-99ce-5e77ee876d1f",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -736,
        -464
      ],
      "parameters": {
        "width": 416,
        "height": 432,
        "content": "This node connects to your Google Calendar to fetch details of your very next upcoming event.\n\n**Configuration:**\n- **Calendar:** Ensure the correct Google Calendar account (`bumpbeck913@gmail.com` in"
      }
    },
    {
      "id": "87a24962-f6d5-46a2-928c-d2bfcf781265",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        160,
        -464
      ],
      "parameters": {
        "width": 432,
        "height": 432,
        "content": "This Code node processes the data from the \"Get Next Calendar Event\" and \"Get Travel Time\" nodes to calculate your available gap time.\n\n**Functionality:**\n1. Extracts the next calendar event's start t"
      }
    },
    {
      "id": "a7c208fc-a7fd-474b-906c-ea1a31bd7969",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        624,
        -464
      ],
      "parameters": {
        "width": 400,
        "height": 432,
        "content": "This If node acts as a conditional gate, determining the next step based on the calculated `gapTimeMinutes`.\n\n**Functionality:**\n- It checks if the `gapTimeMinutes` (from \"Calculate Gap Time\") is grea"
      }
    },
    {
      "id": "807feb13-ec41-4c8a-aaba-3ae0f20aa41e",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1056,
        -464
      ],
      "parameters": {
        "width": 384,
        "height": 432,
        "content": "This node retrieves your personal cafe preferences from a Google Sheet.\n\n**Configuration:**\n- **Document ID:** Link to your specific Google Sheet (e.g., \"☕️ 隙間時間コンシェルジュ - Smart Gap-Time Concierge\").\n-"
      }
    },
    {
      "id": "f401c66f-4af4-4ad8-8b43-4062394d69cd",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1472,
        -464
      ],
      "parameters": {
        "width": 384,
        "height": 432,
        "content": "This node queries the Google Places API to find cafes near your `currentLocation` (defined in \"Workflow Configuration\").\n\n**Configuration:**\n- **URL:** Dynamically constructed using your `currentLocat"
      }
    },
    {
      "id": "61e755d5-0e3c-4402-a342-140d8d0ec491",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1888,
        -464
      ],
      "parameters": {
        "width": 384,
        "height": 432,
        "content": "This node leverages an AI model to provide intelligent cafe recommendations.\n\n**Functionality:**\n- **Input:** It takes the `gapTimeMinutes`, your `user preferences` (from Google Sheets), and the `near"
      }
    },
    {
      "id": "1d5303e5-d1da-41fc-8f15-6ce6d3197cfe",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1904,
        320
      ],
      "parameters": {
        "width": 384,
        "height": 416,
        "content": "This node defines the AI language model used by the \"AI Agent\" for generating cafe recommendations.\n\n**Configuration:**\n- This node connects to the OpenRouter API, which provides access to various lar"
      }
    },
    {
      "id": "5985b210-1dff-4aed-9dd0-f5c8f9d16c65",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2304,
        -464
      ],
      "parameters": {
        "width": 368,
        "height": 432,
        "content": "This node sends a Slack message with the recommended cafe details when there's sufficient gap time.\n\n**Configuration:**\n- **Channel ID:** **IMPORTANT:** Replace `C09TPHE5C15` with the actual ID of you"
      }
    },
    {
      "id": "aac5c5d8-57c7-44fe-9a40-be13c2310f0b",
      "name": "Sticky Note12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1472,
        320
      ],
      "parameters": {
        "width": 400,
        "height": 416,
        "content": "This node sends an urgent Slack message if the calculated gap time is too short to visit a cafe.\n\n**Configuration:**\n- **Channel ID:** **IMPORTANT:** Replace `C09TPHE5C15` with the actual ID of your S"
      }
    }
  ],
  "connections": {
    "AI Agent": {
      "main": [
        [
          {
            "node": "Send Slack Notification",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Workflow Configuration",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculate Gap Time": {
      "main": [
        [
          {
            "node": "Check If Gap >= 30 Minutes",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get User Preferences": {
      "main": [
        [
          {
            "node": "Search Nearby Cafes (Google Places API)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenRouter Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Workflow Configuration": {
      "main": [
        [
          {
            "node": "Get Next Calendar Event",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Next Calendar Event": {
      "main": [
        [
          {
            "node": "Get Travel Time (Google Maps API)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check If Gap >= 30 Minutes": {
      "main": [
        [
          {
            "node": "Get User Preferences",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send Urgent Move Alert (Slack)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Travel Time (Google Maps API)": {
      "main": [
        [
          {
            "node": "Calculate Gap Time",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search Nearby Cafes (Google Places API)": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}