{
  "name": "Track athlete sessions and weekly performance with OpenAI, Google Sheets, Slack, and email",
  "nodes": [
    {
      "id": "aed9b5b2-c691-4dc1-9887-f3d20cd69267",
      "name": "Training Session Form",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -1184,
        16
      ]
    },
    {
      "id": "b8715690-eb24-4a66-b5cb-c5e19588e53c",
      "name": "Workflow Configuration",
      "type": "n8n-nodes-base.set",
      "position": [
        -960,
        16
      ]
    },
    {
      "id": "6cba7e17-a51b-43dc-87ab-f72b9a87e902",
      "name": "Store Training Record",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -736,
        16
      ]
    },
    {
      "id": "a438b1c2-1b37-4b3b-8206-0f6b5ca956a8",
      "name": "Fetch Historical Data",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -496,
        112
      ]
    },
    {
      "id": "ae5d9991-ac84-4aa2-bd43-c996a6efc741",
      "name": "Combine Current and Historical Data",
      "type": "n8n-nodes-base.merge",
      "position": [
        -288,
        16
      ]
    },
    {
      "id": "b1d01153-d095-4ae6-88c9-6e806ba52c53",
      "name": "Performance Analysis Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -48,
        0
      ]
    },
    {
      "id": "ac604fcb-6e82-48e9-a8e8-d73dd726b5e7",
      "name": "OpenAI Model - Analysis",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -64,
        160
      ]
    },
    {
      "id": "b22b3df2-91e6-45c4-8c03-57b22a10783c",
      "name": "Analysis Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        112,
        160
      ]
    },
    {
      "id": "68d8149e-e272-4978-bfac-75bdc9e983bb",
      "name": "Update Record with Insights",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        288,
        16
      ]
    },
    {
      "id": "2ecede3f-b06b-447b-a13c-dd40ffda379d",
      "name": "Check Performance Threshold",
      "type": "n8n-nodes-base.if",
      "position": [
        512,
        16
      ]
    },
    {
      "id": "accc9780-4a08-402c-b24f-e3a657950a71",
      "name": "Send Slack Alert",
      "type": "n8n-nodes-base.slack",
      "position": [
        768,
        0
      ]
    },
    {
      "id": "4646b3c1-b4c0-44c7-a719-7a7b09b0c1b4",
      "name": "Send Email Alert",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        768,
        192
      ]
    },
    {
      "id": "cfe800de-4acc-4377-b825-417d0c0e7cc6",
      "name": "Weekly Summary Schedule",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -1184,
        448
      ]
    },
    {
      "id": "52079b71-71b3-4bb4-bd1b-201d73a573e5",
      "name": "Weekly Config",
      "type": "n8n-nodes-base.set",
      "position": [
        -960,
        448
      ]
    },
    {
      "id": "1e29db8c-9431-40fc-8c96-7d6a21bb9380",
      "name": "Fetch Weekly Data",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -736,
        448
      ]
    },
    {
      "id": "9b41f370-5f14-40b5-8dce-c6a780b297c6",
      "name": "Group by Athlete",
      "type": "n8n-nodes-base.code",
      "position": [
        -512,
        448
      ]
    },
    {
      "id": "b6861fce-5ac4-4753-85e4-9886268742d6",
      "name": "Weekly Summary Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -288,
        448
      ]
    },
    {
      "id": "260366f0-67f6-4290-9506-26de961d1342",
      "name": "OpenAI Model - Summary",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -304,
        672
      ]
    },
    {
      "id": "c51d858e-d4cb-4e5c-a9c4-4e5b2d70069f",
      "name": "Summary Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -144,
        672
      ]
    },
    {
      "id": "1a326f6c-c64d-43f8-b35b-e4b0f11dc3e8",
      "name": "Send Weekly Summary to Slack",
      "type": "n8n-nodes-base.slack",
      "position": [
        320,
        448
      ]
    },
    {
      "id": "d941a193-45f2-420b-834a-021f0b90c6bf",
      "name": "Send Weekly Summary Email",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        112,
        624
      ]
    },
    {
      "id": "3a0b9328-8d6f-4850-ada3-cfca846196ae",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1232,
        -416
      ],
      "parameters": {
        "width": 528,
        "height": 304,
        "content": "## How It Works\nThis workflow automates athlete performance monitoring through two parallel pipelines: real-time session analysis triggered by training form submissions, and scheduled weekly performan"
      }
    },
    {
      "id": "fef2a551-8d73-4273-870a-e4be3f505b31",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -672,
        -416
      ],
      "parameters": {
        "width": 352,
        "height": 304,
        "content": "## Setup Steps\n1. Configure Training Session Form fields to match athlete and session data schema.\n2. Connect Google Sheets credentials to Store, Fetch, and Update Record nodes.\n3. Add OpenAI API cred"
      }
    },
    {
      "id": "57d31cc2-bcb8-4c80-89b8-a59dbfea86c1",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -288,
        -480
      ],
      "parameters": {
        "width": 608,
        "height": 336,
        "content": "## Prerequisites\n- Google Sheets with service account credentials\n- Slack workspace with bot token\n- Gmail or SMTP credentials\n## Use Cases\n- Real-time performance threshold alerts for elite athlete t"
      }
    },
    {
      "id": "0b978ab3-6ab1-4653-83f8-966943a1105f",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -96,
        -128
      ],
      "parameters": {
        "width": 512,
        "height": 432,
        "content": "## Performance Analysis Agent\n**What** – Analyses combined data using OpenAI and updates Sheets with insights.\n**Why** – Automates performance interpretation without manual coach review."
      }
    },
    {
      "id": "3a2d429d-9165-40e5-a4c6-3982f8613b3a",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        448,
        -144
      ],
      "parameters": {
        "width": 480,
        "height": 464,
        "content": "## Check Performance Threshold\n**What** – Evaluates whether metrics breach defined performance thresholds.\n**Why** – Ensures coaches are alerted only when athlete performance requires attention."
      }
    },
    {
      "id": "4a5c56a2-119b-4317-a082-ad573dada97d",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1232,
        -80
      ],
      "parameters": {
        "width": 1120,
        "height": 416,
        "content": "\n## Fetch & Combine Historical Data\n**What** – Retrieves prior records and merges with current session input.\n**Why** – Gives the analysis agent full longitudinal context for accurate insight generati"
      }
    },
    {
      "id": "9f6f5813-e2a6-4269-a88a-2b970b8456c7",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1232,
        352
      ],
      "parameters": {
        "width": 864,
        "height": 432,
        "content": "## Weekly Summary Schedule & Grouping\n**What** – Fetches all weekly data and groups records by individual athlete.\n**Why** – Organises data correctly before generating per-athlete summary reports."
      }
    },
    {
      "id": "c14ffd06-849f-4bdd-bba7-de6fb2b5488e",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -336,
        352
      ],
      "parameters": {
        "width": 848,
        "height": 432,
        "content": "## Weekly Summary Agent & Distribution\n**What** – Generates summaries via OpenAI and sends to Slack and email.\n**Why** – Delivers consistent weekly performance visibility to coaching staff automatical"
      }
    }
  ],
  "connections": {
    "Weekly Config": {
      "main": [
        [
          {
            "node": "Fetch Weekly Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Group by Athlete": {
      "main": [
        [
          {
            "node": "Weekly Summary Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Weekly Data": {
      "main": [
        [
          {
            "node": "Group by Athlete",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Weekly Summary Agent": {
      "main": [
        [
          {
            "node": "Send Weekly Summary to Slack",
            "type": "main",
            "index": 0
          },
          {
            "node": "Send Weekly Summary Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Historical Data": {
      "main": [
        [
          {
            "node": "Combine Current and Historical Data",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Store Training Record": {
      "main": [
        [
          {
            "node": "Fetch Historical Data",
            "type": "main",
            "index": 0
          },
          {
            "node": "Combine Current and Historical Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Summary Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Weekly Summary Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Training Session Form": {
      "main": [
        [
          {
            "node": "Workflow Configuration",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Analysis Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Performance Analysis Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Model - Summary": {
      "ai_languageModel": [
        [
          {
            "node": "Weekly Summary Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Workflow Configuration": {
      "main": [
        [
          {
            "node": "Store Training Record",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Model - Analysis": {
      "ai_languageModel": [
        [
          {
            "node": "Performance Analysis Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Weekly Summary Schedule": {
      "main": [
        [
          {
            "node": "Weekly Config",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Performance Analysis Agent": {
      "main": [
        [
          {
            "node": "Update Record with Insights",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Performance Threshold": {
      "main": [
        [
          {
            "node": "Send Slack Alert",
            "type": "main",
            "index": 0
          },
          {
            "node": "Send Email Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Record with Insights": {
      "main": [
        [
          {
            "node": "Check Performance Threshold",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Combine Current and Historical Data": {
      "main": [
        [
          {
            "node": "Performance Analysis Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}