{
  "name": "Grade and deliver multi-course assignment feedback with GPT-4o, Google Drive, Slack, and Gmail",
  "nodes": [
    {
      "id": "69428c52-b403-4e3c-a48a-82e6bdff568b",
      "name": "Google Forms Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -5280,
        400
      ]
    },
    {
      "id": "f4b2dc61-eab3-4905-be8f-7137e68364d9",
      "name": "LMS API Polling Schedule",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -5280,
        592
      ]
    },
    {
      "id": "7e00c5f8-35f8-4c61-a791-2644df6f6b6e",
      "name": "Workflow Configuration",
      "type": "n8n-nodes-base.set",
      "position": [
        -5056,
        400
      ]
    },
    {
      "id": "7f7009d3-7d1c-43ef-817f-2b60381d52e9",
      "name": "Fetch LMS Assignments",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -5056,
        592
      ]
    },
    {
      "id": "c0be44a6-de29-4550-b76a-134f1be9504a",
      "name": "Merge Form and API Data",
      "type": "n8n-nodes-base.merge",
      "position": [
        -4832,
        496
      ]
    },
    {
      "id": "9c8fa136-225c-4f3b-b089-8c2f21de1912",
      "name": "Normalize Submission Data",
      "type": "n8n-nodes-base.set",
      "position": [
        -4608,
        496
      ]
    },
    {
      "id": "5f419bad-1137-4b72-afe4-92a02df8376f",
      "name": "Validate Submission",
      "type": "n8n-nodes-base.code",
      "position": [
        -4384,
        496
      ]
    },
    {
      "id": "cacda2ad-1582-42a3-8a8f-5fb79484cead",
      "name": "Check Validation Status",
      "type": "n8n-nodes-base.if",
      "position": [
        -4160,
        496
      ]
    },
    {
      "id": "b1505af3-2393-42b4-a06c-961320cb0f86",
      "name": "Check Duplicate Submission",
      "type": "n8n-nodes-base.postgres",
      "position": [
        -3936,
        400
      ]
    },
    {
      "id": "5b304ffb-ea6e-41c0-8b5a-f9c216b5467f",
      "name": "Is Duplicate?",
      "type": "n8n-nodes-base.if",
      "position": [
        -3712,
        400
      ]
    },
    {
      "id": "de585b70-1cd4-46f3-afb9-3f5592afa9f1",
      "name": "Calculate Deadline Penalty",
      "type": "n8n-nodes-base.code",
      "position": [
        -3488,
        400
      ]
    },
    {
      "id": "961cb641-7e6c-40df-866a-83a15b42d7b6",
      "name": "Upload Submission to Drive",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -3040,
        400
      ]
    },
    {
      "id": "bffdd766-b69b-45c9-9c33-8344f0b25a44",
      "name": "Plagiarism Check Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -2816,
        400
      ]
    },
    {
      "id": "cdad1462-2865-4545-97a7-de26e949d44b",
      "name": "OpenAI Model - Plagiarism",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -2816,
        624
      ]
    },
    {
      "id": "f5123240-2fb7-4d67-9dcd-153702fdeb60",
      "name": "Plagiarism Result Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -2688,
        624
      ]
    },
    {
      "id": "77230e4c-f858-4913-a237-4f86ce77e605",
      "name": "AI Grading Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -2464,
        400
      ]
    },
    {
      "id": "8fdb67d5-f729-49ae-8189-814cf3b54c83",
      "name": "OpenAI Model - Grading",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -2464,
        624
      ]
    },
    {
      "id": "1f37d1da-f907-48b9-b052-28c27ce9465a",
      "name": "Grading Result Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -2336,
        624
      ]
    },
    {
      "id": "15cb8285-4513-43fb-b475-1598fe030611",
      "name": "Combine Grading Results",
      "type": "n8n-nodes-base.set",
      "position": [
        -2112,
        400
      ]
    },
    {
      "id": "c48e2492-ab8b-4a16-9e53-0119ca75ee10",
      "name": "Route by Exception Type",
      "type": "n8n-nodes-base.switch",
      "position": [
        -1936,
        688
      ]
    },
    {
      "id": "2521b39b-9245-42eb-8c48-13860ab8dd87",
      "name": "Store Submission Record",
      "type": "n8n-nodes-base.postgres",
      "position": [
        -1648,
        384
      ]
    },
    {
      "id": "fac69902-2b03-4076-9f74-07d339d212e1",
      "name": "Update Gradebook",
      "type": "n8n-nodes-base.postgres",
      "position": [
        -1424,
        384
      ]
    },
    {
      "id": "67dfa515-f82f-4baa-8a93-046a31512274",
      "name": "Generate Feedback HTML",
      "type": "n8n-nodes-base.html",
      "position": [
        -1200,
        384
      ]
    },
    {
      "id": "d0779dc4-fc2b-426c-a9f3-73311f337e30",
      "name": "Convert HTML to PDF",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -976,
        384
      ]
    },
    {
      "id": "5897a182-78aa-42e3-abce-28f99b52f0bf",
      "name": "Upload Feedback PDF",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -752,
        384
      ]
    },
    {
      "id": "04fe6057-f0af-4acf-88d3-4e93528aeff1",
      "name": "Notify Instructors - Slack",
      "type": "n8n-nodes-base.slack",
      "position": [
        -496,
        272
      ]
    },
    {
      "id": "e98b7aba-eb3e-414e-b829-0b42a0056342",
      "name": "Notify Instructors - Email",
      "type": "n8n-nodes-base.gmail",
      "position": [
        -496,
        464
      ]
    },
    {
      "id": "dc3f6a8f-4e3b-49ed-8972-abbbb90c0af0",
      "name": "Send Student Feedback Email",
      "type": "n8n-nodes-base.gmail",
      "position": [
        -496,
        656
      ]
    },
    {
      "id": "30e4fd96-d4e0-400c-b4b5-33769d658dc2",
      "name": "Alert - High Plagiarism",
      "type": "n8n-nodes-base.slack",
      "position": [
        -1648,
        960
      ]
    },
    {
      "id": "fd4602d1-05c4-4e14-b9c6-71e043c01fb8",
      "name": "Alert - Late Submission",
      "type": "n8n-nodes-base.slack",
      "position": [
        -1648,
        576
      ]
    },
    {
      "id": "b2505612-a537-4094-908a-4477bbcf6e2e",
      "name": "Alert - Manual Review Needed",
      "type": "n8n-nodes-base.slack",
      "position": [
        -1648,
        768
      ]
    },
    {
      "id": "d791d734-1bf7-48e3-aec0-8bcb53caa0da",
      "name": "Log Analytics Event",
      "type": "n8n-nodes-base.postgres",
      "position": [
        -496,
        848
      ]
    },
    {
      "id": "de688fb4-1a9f-40c3-9d7a-6f870af5ac89",
      "name": "Rate Limit Delay",
      "type": "n8n-nodes-base.wait",
      "position": [
        -3264,
        400
      ]
    },
    {
      "id": "74e4fdef-5122-41b9-aafd-2be6defb5999",
      "name": "Handle Validation Error",
      "type": "n8n-nodes-base.set",
      "position": [
        -3936,
        592
      ]
    },
    {
      "id": "ed670307-0430-40f2-b4c0-e2ab6f976157",
      "name": "Respond to Form Submission",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        -3712,
        592
      ]
    },
    {
      "id": "fea532c0-40a9-4b21-8bc7-58c108034d74",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -5296,
        -240
      ],
      "parameters": {
        "width": 912,
        "height": 256,
        "content": "## How It Works\nThis workflow automates business intelligence reporting by aggregating data from multiple sources, processing it through AI models, and delivering formatted dashboards via email. Desig"
      }
    },
    {
      "id": "c5cea325-f8e9-40de-a5ad-7e205c638944",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -4320,
        -256
      ],
      "parameters": {
        "width": 496,
        "height": 288,
        "content": "## Setup Steps\n1. Configure Google Sheets credentials and specify source spreadsheet IDs\n2. Set up database connections (PostgreSQL, MySQL) with read-only access\n3. Add OpenAI API key for GPT-4 analyt"
      }
    },
    {
      "id": "a5df6536-8f45-4703-b1ed-27988bbc1a73",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3728,
        -304
      ],
      "parameters": {
        "width": 464,
        "height": 336,
        "content": "## Prerequisites\nActive Google Workspace account with Sheets and Gmail access. \n## Use Cases\nAutomated weekly executive dashboards with YoY comparisons.\n## Customization\nModify dashboard templates to "
      }
    },
    {
      "id": "a27fb347-b6ad-4fb9-b81d-253792991bc8",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2880,
        192
      ],
      "parameters": {
        "width": 1136,
        "height": 848,
        "content": "## AI Analysis  \nRoutes transformed data to OpenAI models for trend analysis, forecasting, and narrative generation.\n**Why** - Provides intelligent insights beyond basic calculations, highlighting pat"
      }
    },
    {
      "id": "50819315-9d2f-4993-a35c-06fedb5afbc9",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -4656,
        192
      ],
      "parameters": {
        "width": 1744,
        "height": 688,
        "content": "## Data Transformation  \nCleanses, normalizes, and calculates KPIs using JavaScript code and mathematical functions.\n**Why** - Ensures data consistency and generates standardized metrics for cross-fun"
      }
    },
    {
      "id": "433382eb-2849-47da-a164-31e096476699",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -5344,
        192
      ],
      "parameters": {
        "width": 672,
        "height": 672,
        "content": "## Data Collection  \nFetches raw data from Google Sheets, SQL databases, and REST APIs using scheduled triggers.\n**Why** - Centralizes dispersed business metrics into a single processing pipeline."
      }
    },
    {
      "id": "df59db2c-23f0-48a8-b72c-9b4371f9f15f",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1696,
        192
      ],
      "parameters": {
        "width": 1504,
        "height": 944,
        "content": "## Dashboard Generation  \nPopulates pre-designed templates with processed data and AI-generated insights.\n**Why** - Creates stakeholder-specific views without requiring individual report customization"
      }
    }
  ],
  "connections": {
    "Is Duplicate?": {
      "main": [
        [],
        [
          {
            "node": "Calculate Deadline Penalty",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Grading Agent": {
      "main": [
        [
          {
            "node": "Combine Grading Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Rate Limit Delay": {
      "main": [
        [
          {
            "node": "Upload Submission to Drive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Gradebook": {
      "main": [
        [
          {
            "node": "Generate Feedback HTML",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert HTML to PDF": {
      "main": [
        [
          {
            "node": "Upload Feedback PDF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload Feedback PDF": {
      "main": [
        [
          {
            "node": "Notify Instructors - Slack",
            "type": "main",
            "index": 0
          },
          {
            "node": "Notify Instructors - Email",
            "type": "main",
            "index": 0
          },
          {
            "node": "Send Student Feedback Email",
            "type": "main",
            "index": 0
          },
          {
            "node": "Log Analytics Event",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validate Submission": {
      "main": [
        [
          {
            "node": "Check Validation Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Forms Webhook": {
      "main": [
        [
          {
            "node": "Workflow Configuration",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch LMS Assignments": {
      "main": [
        [
          {
            "node": "Merge Form and API Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Grading Result Parser": {
      "ai_outputParser": [
        [
          {
            "node": "AI Grading Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Generate Feedback HTML": {
      "main": [
        [
          {
            "node": "Convert HTML to PDF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Model - Grading": {
      "ai_languageModel": [
        [
          {
            "node": "AI Grading Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Plagiarism Check Agent": {
      "main": [
        [
          {
            "node": "AI Grading Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Workflow Configuration": {
      "main": [
        [
          {
            "node": "Merge Form and API Data",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Check Validation Status": {
      "main": [
        [
          {
            "node": "Check Duplicate Submission",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Handle Validation Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Combine Grading Results": {
      "main": [
        [
          {
            "node": "Route by Exception Type",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Handle Validation Error": {
      "main": [
        [
          {
            "node": "Respond to Form Submission",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Form and API Data": {
      "main": [
        [
          {
            "node": "Normalize Submission Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route by Exception Type": {
      "main": [
        [
          {
            "node": "Alert - High Plagiarism",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Alert - Late Submission",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Alert - Manual Review Needed",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Store Submission Record",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Store Submission Record": {
      "main": [
        [
          {
            "node": "Update Gradebook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "LMS API Polling Schedule": {
      "main": [
        [
          {
            "node": "Fetch LMS Assignments",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Plagiarism Result Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Plagiarism Check Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Normalize Submission Data": {
      "main": [
        [
          {
            "node": "Validate Submission",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Model - Plagiarism": {
      "ai_languageModel": [
        [
          {
            "node": "Plagiarism Check Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Calculate Deadline Penalty": {
      "main": [
        [
          {
            "node": "Rate Limit Delay",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Duplicate Submission": {
      "main": [
        [
          {
            "node": "Is Duplicate?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload Submission to Drive": {
      "main": [
        [
          {
            "node": "Plagiarism Check Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}