{
  "name": "Automated weekly Google Calendar summary via email with AI ✨🗓️📧",
  "nodes": [
    {
      "id": "b4c54286-a4c5-4a1b-87ca-a37fa1fcb2aa",
      "name": "weekly_schedule",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -180,
        -40
      ]
    },
    {
      "id": "57a88176-a291-4d65-bfd2-868d4e50befb",
      "name": "get_next_weeks_events",
      "type": "n8n-nodes-base.googleCalendar",
      "position": [
        1300,
        -40
      ]
    },
    {
      "id": "ed2eacbb-453f-4e5b-be3a-0c45e3506e1b",
      "name": "Google Gemini",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        2840,
        580
      ]
    },
    {
      "id": "20670d58-0c0a-4f17-9a89-131bb2cd2caa",
      "name": "event_summary_agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        2740,
        -40
      ]
    },
    {
      "id": "99885550-0c81-4513-86f0-8e82b0d5e0fb",
      "name": "send_email",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        3800,
        -40
      ]
    },
    {
      "id": "9199043b-2255-4a29-9c76-e6edbda41cc5",
      "name": "locale",
      "type": "n8n-nodes-base.set",
      "position": [
        300,
        -40
      ]
    },
    {
      "id": "b92e0c62-d83f-417d-9ed1-839b3f680edd",
      "name": "simplify_evens_json",
      "type": "n8n-nodes-base.code",
      "position": [
        1800,
        -40
      ]
    },
    {
      "id": "c3639753-7b59-40ea-b59b-32dc00769146",
      "name": "aggregate_events",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        2320,
        -40
      ]
    },
    {
      "id": "bb2804c2-130e-4d53-9eac-cb4f978056d1",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -360,
        -1100
      ],
      "parameters": {
        "width": 960,
        "height": 520,
        "content": "### Workflow Overview: Google Calendar Coming Week 🗓️➡️📧\n\nThis n8n workflow automates the process of generating and emailing a summary of your upcoming week's Google Calendar events.\n\n**How it works:*"
      }
    },
    {
      "id": "4e8a4adb-fde7-403d-968e-7d15c2fbe770",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        140,
        -400
      ],
      "parameters": {
        "width": 440,
        "height": 400,
        "content": "⚙️ **locale (Set)**\n\n*   **Purpose:** Defines essential user-specific settings for personalization and correct date/time processing.\n*   **‼️ USER ACTION REQUIRED ‼️:**\n    *   `users-locale`: (e.g., "
      }
    },
    {
      "id": "a409ad6d-56be-4b3c-a1e3-b2b3e2c00b63",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -360,
        -400
      ],
      "parameters": {
        "width": 440,
        "height": 400,
        "content": "🗓️ **weekly_schedule (Trigger)**\n\n*   **Purpose:** Initiates the workflow automatically.\n*   **Details:** By default, runs once a week at 12:00 PM.\n*   **To Modify:** Adjust the \"Rule\" settings (inter"
      }
    },
    {
      "id": "714b924c-4cbc-4864-b833-e80b3dcecde8",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        640,
        -400
      ],
      "parameters": {
        "width": 440,
        "height": 400,
        "content": "⏰ **date_time (Set)**\n\n*   **Purpose:** Generates various date and time strings based on the current execution time and the settings from the `locale` node.\n*   **Details:** Creates values like \"users"
      }
    },
    {
      "id": "a31c71e7-98c8-4185-891e-9543ceac217d",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1140,
        -400
      ],
      "parameters": {
        "width": 440,
        "height": 400,
        "content": "📅 **get_next_weeks_events (Google Calendar)**\n\n*   **Purpose:** Fetches events from a specified Google Calendar.\n*   **Details:** Uses `timeMin` and `timeMax` from the `date-time` node to get events f"
      }
    },
    {
      "id": "5e5830c6-9e43-43c7-852e-b9982f6deb6b",
      "name": "date_time",
      "type": "n8n-nodes-base.set",
      "position": [
        820,
        -40
      ]
    },
    {
      "id": "f20a83fd-2484-4dc7-92a1-a438c2cf8e02",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1640,
        -400
      ],
      "parameters": {
        "width": 440,
        "height": 400,
        "content": "✨ **simplify_evens_json (Code)**\n\n*   **Purpose:** Cleans the raw event data from Google Calendar.\n*   **Details:** Runs JavaScript to remove fields like `htmlLink`, `etag`, `iCalUID`, etc., to provid"
      }
    },
    {
      "id": "c5e40e35-8dfa-491c-ba67-21b83f71334b",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2140,
        -400
      ],
      "parameters": {
        "width": 440,
        "height": 400,
        "content": "➕ **aggregate_events (Aggregate)**\n\n*   **Purpose:** Combines all individual simplified event items into a single JSON array.\n*   **Details:** Creates a field named `eventdata` which contains the list"
      }
    },
    {
      "id": "db11c407-a238-48ef-9398-1842c1046340",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2640,
        220
      ],
      "parameters": {
        "width": 440,
        "height": 400,
        "content": "🧠 **Google Gemini (Language Model)**\n\n*   **Purpose:** Establishes the connection to the Google Gemini AI model.\n*   **Details:** This node itself doesn't do the processing but provides the AI capabil"
      }
    },
    {
      "id": "692413bc-58f9-4d09-a7f7-796d50894e3b",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3140,
        -400
      ],
      "parameters": {
        "width": 440,
        "height": 400,
        "content": "📄➡️🌐 **markdown_to_html (Converter)**\n\n*   **Purpose:** Converts the Markdown text generated by the `event_summary_agent` into HTML.\n*   **Details:** Ensures the email body is well-formatted (line bre"
      }
    },
    {
      "id": "d2803020-1f12-4207-a9c3-678fbb472daf",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3640,
        -400
      ],
      "parameters": {
        "width": 440,
        "height": 400,
        "content": "📧 **send_email (Email)**\n\n*   **Purpose:** Sends the final HTML summary as an email.\n*   **Details:** Uses the HTML output from the `Markdown` node as the email body. The subject is dynamically genera"
      }
    },
    {
      "id": "73c88ce5-9fa6-418f-b4cc-0b646f5708e7",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2640,
        -400
      ],
      "parameters": {
        "width": 440,
        "height": 400,
        "content": "🤖 **event_summary_agent (AI Agent)**\n\n*   **Purpose:** Generates a well-formatted weekly schedule summary using the AI model.\n*   **Details:** Takes the `eventdata` (from `aggregate_events`) and a det"
      }
    },
    {
      "id": "6febb866-888c-4e72-a6b8-296a826b7e66",
      "name": "markdown_to_html",
      "type": "n8n-nodes-base.markdown",
      "position": [
        3320,
        -40
      ]
    }
  ],
  "connections": {
    "locale": {
      "main": [
        [
          {
            "node": "date_time",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "date_time": {
      "main": [
        [
          {
            "node": "get_next_weeks_events",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini": {
      "ai_languageModel": [
        [
          {
            "node": "event_summary_agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "weekly_schedule": {
      "main": [
        [
          {
            "node": "locale",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "aggregate_events": {
      "main": [
        [
          {
            "node": "event_summary_agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "markdown_to_html": {
      "main": [
        [
          {
            "node": "send_email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "event_summary_agent": {
      "main": [
        [
          {
            "node": "markdown_to_html",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "simplify_evens_json": {
      "main": [
        [
          {
            "node": "aggregate_events",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "get_next_weeks_events": {
      "main": [
        [
          {
            "node": "simplify_evens_json",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}