{
  "name": "Get chess.com game reviews by email using Google Gemini or other LLMs",
  "nodes": [
    {
      "id": "0d4738ef-2c9a-4e18-839a-c0d64a91cd49",
      "name": "⏰ Daily Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -240,
        112
      ]
    },
    {
      "id": "7be06386-0800-4512-96a3-bcc01016d501",
      "name": "▶️ Manual Test Run",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -240,
        256
      ]
    },
    {
      "id": "b4abebbd-f769-4a39-9965-4a0bf5eac1b9",
      "name": "📖 Workflow Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -880,
        -96
      ],
      "parameters": {
        "width": 596,
        "height": 688,
        "content": "# ♟️ AI Chess Game Coach\n\nAn n8n workflow that automatically fetches your latest Chess.com game, analyzes it with AI, and emails you a personalized coaching report.\n\n---\n\n## How It Works\n\n1. Triggers "
      }
    },
    {
      "id": "f46f1571-6055-4708-9906-d0244a0c015d",
      "name": "Step 1 Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -112,
        -96
      ],
      "parameters": {
        "width": 268,
        "height": 676,
        "content": "## Step 1 — Configure\n\nOpen the **⚙️ Config** node and set:\n\n• `username` → your Chess.com handle\n• `email` → where to send reports\n\n💡 Username is case-insensitive."
      }
    },
    {
      "id": "ce451526-660c-4474-96c7-7c6f2e175790",
      "name": "Steps 2-4 Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        176,
        -96
      ],
      "parameters": {
        "width": 940,
        "height": 676,
        "content": "## Steps 2–4 — Fetch & Enrich\n\n**Fetch Games** calls the free Chess.com API (no key needed).\n\n**Sort** orders games newest → oldest.\n\n**Add Context** determines:\n- Which color you played\n- Your result"
      }
    },
    {
      "id": "619ec4c7-de0b-4267-808b-af3eed746483",
      "name": "Step 5 Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1136,
        -96
      ],
      "parameters": {
        "width": 340,
        "height": 676,
        "content": "## Step 5 — AI Analysis\n\nThe AI coach receives the full PGN, player context, and ratings, then produces a structured HTML report.\n\n**Swap the LLM node** to use:\n- OpenAI GPT-4o\n- Anthropic Claude\n- Mi"
      }
    },
    {
      "id": "a6677a90-107f-48c8-ad7a-48a6169a6cd2",
      "name": "Step 6 Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1488,
        -96
      ],
      "parameters": {
        "width": 280,
        "height": 676,
        "content": "## Step 6 — Send Report\n\nThe HTML report is emailed directly.\n\n**Want other channels?**\nAdd nodes after the email step:\n- **Telegram** — send as message\n- **Slack** — post to channel\n- **Notion** — sa"
      }
    },
    {
      "id": "837924db-0ad2-400d-945e-4150d9e53cc1",
      "name": "📖 Workflow Overview1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1792,
        -96
      ],
      "parameters": {
        "width": 548,
        "height": 688,
        "content": "## ♟️ Chess Game Coach - Sample Result\n\n♟️ Game Review — daniel-albin\nPlaying as: White (829)  |  Opponent: mary_elliee00 (833)\nResult: 💔 Loss (timeout)  |  Time Control: 60s Bullet\nOpening: B00 — Nim"
      }
    },
    {
      "id": "c01781b4-9e5e-44ec-8213-67f5fa9097b7",
      "name": "Add Player Context",
      "type": "n8n-nodes-base.code",
      "position": [
        768,
        192
      ]
    },
    {
      "id": "6c9a14c0-b8bc-48d3-b70f-56b23901262b",
      "name": "Sort Games (Latest First)",
      "type": "n8n-nodes-base.code",
      "position": [
        576,
        192
      ]
    },
    {
      "id": "36816dcf-f2d8-42fc-ba3d-f05875160e9a",
      "name": "Fetch Games from Chess.com",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        400,
        192
      ]
    },
    {
      "id": "457a5e8c-eefc-4872-8c3b-570829ae6822",
      "name": "Build API URL (Current Month)",
      "type": "n8n-nodes-base.code",
      "position": [
        192,
        192
      ]
    },
    {
      "id": "36b601a1-63f6-46da-8a2c-c76c6c8fe217",
      "name": "Process Last Game Only",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        944,
        192
      ]
    },
    {
      "id": "e6974b0a-0837-4649-bba5-860e7a461ddb",
      "name": "Config  - Username - Email",
      "type": "n8n-nodes-base.set",
      "position": [
        -16,
        192
      ]
    },
    {
      "id": "1e69dea4-3cf0-4028-b8ce-8f9f54c72193",
      "name": "AI Chess Coach (Analysis)",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1168,
        208
      ]
    },
    {
      "id": "f0308c27-5a25-4308-97c6-8aa3c3d2af26",
      "name": "LLM — Google Gemini",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        1168,
        416
      ]
    },
    {
      "id": "d3440c64-0774-4919-a5ef-6926ed597532",
      "name": "Email the Report",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1584,
        208
      ]
    }
  ],
  "connections": {
    "Add Player Context": {
      "main": [
        [
          {
            "node": "Process Last Game Only",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "LLM — Google Gemini": {
      "ai_languageModel": [
        [
          {
            "node": "AI Chess Coach (Analysis)",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Process Last Game Only": {
      "main": [
        [],
        [
          {
            "node": "AI Chess Coach (Analysis)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "▶️ Manual Test Run": {
      "main": [
        [
          {
            "node": "Config  - Username - Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Chess Coach (Analysis)": {
      "main": [
        [
          {
            "node": "Email the Report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sort Games (Latest First)": {
      "main": [
        [
          {
            "node": "Add Player Context",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Config  - Username - Email": {
      "main": [
        [
          {
            "node": "Build API URL (Current Month)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Games from Chess.com": {
      "main": [
        [
          {
            "node": "Sort Games (Latest First)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "⏰ Daily Schedule Trigger": {
      "main": [
        [
          {
            "node": "Config  - Username - Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build API URL (Current Month)": {
      "main": [
        [
          {
            "node": "Fetch Games from Chess.com",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}