{
  "name": "Course Syllabus Processor for Students",
  "nodes": [
    {
      "parameters": {
        "content": "## \ud83d\udcda Course Syllabus Processor\n\n### How it works\n1. Watches Google Drive folder for syllabus uploads\n2. Downloads and extracts course info, instructor details, schedule\n3. Parses assignments, exams, grading breakdown, required materials\n4. Formats deadlines chronologically for easy tracking\n5. Logs all course data to Google Sheets tracker\n6. Sends Slack summary with key dates and requirements\n\n### Setup steps\n1. Create Google Drive folder for syllabus documents\n2. Get PDF Vector API key from pdfvector.com/api-keys\n3. Create Google Sheet with columns: Course Code, Course Name, Credits, Semester, Instructor, Email, Office Hours, Schedule, Grading, Assignments, Exams, Required Materials, Added Date\n4. Connect Google Drive, Sheets, and Slack credentials\n5. Update folder ID and spreadsheet ID in nodes\n\n### Perfect for\n- Students organizing multiple courses\n- Academic advisors tracking student schedules\n- Course coordinators managing curriculum\n- Study groups sharing course information",
        "height": 560,
        "width": 380,
        "color": 5
      },
      "id": "sticky-main",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -140,
        60
      ]
    },
    {
      "parameters": {
        "content": "## \ud83d\udcc5 Extracted Data\n\n- Course name, code, credits\n- Instructor contact info\n- Class schedule and location\n- All assignment deadlines\n- Exam dates and weights\n- Grading breakdown\n- Required textbooks\n- Course policies",
        "height": 240,
        "width": 220
      },
      "id": "sticky-info",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        500,
        -60
      ]
    },
    {
      "parameters": {
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        },
        "triggerOn": "specificFolder",
        "folderToWatch": {
          "__rl": true,
          "value": "YOUR_FOLDER_ID",
          "mode": "list",
          "cachedResultName": "Syllabus Documents"
        },
        "event": "fileCreated",
        "options": {}
      },
      "id": "gdrive-trigger",
      "name": "Google Drive Trigger",
      "type": "n8n-nodes-base.googleDriveTrigger",
      "typeVersion": 1,
      "position": [
        280,
        280
      ],
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "download",
        "fileId": "={{ $json.id }}",
        "options": {}
      },
      "id": "gdrive-download",
      "name": "Download Document",
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [
        480,
        280
      ],
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "extract",
        "inputType": "file",
        "prompt": "Extract course syllabus data as flat fields. courseCode, courseName, credits (number), semester, department, instructorName, instructorEmail, instructorPhone, officeLocation, officeHours, scheduleDays (e.g. Mon/Wed/Fri), scheduleTime, scheduleRoom, learningObjectivesList (semicolon-separated objectives), requiredTextbooks (semicolon-separated book titles and authors), gradingBreakdown (semicolon-separated formatted as: component weight%), assignmentsList (semicolon-separated assignments with due dates), examsList (semicolon-separated exams with dates), attendancePolicy, lateWorkPolicy, academicIntegrityPolicy, totalWeeks (number), startDate (YYYY-MM-DD), endDate (YYYY-MM-DD).",
        "schema": "{\"type\": \"object\", \"properties\": {\"courseCode\": {\"type\": \"string\"}, \"courseName\": {\"type\": \"string\"}, \"credits\": {\"type\": \"number\"}, \"semester\": {\"type\": \"string\"}, \"department\": {\"type\": \"string\"}, \"instructorName\": {\"type\": \"string\"}, \"instructorEmail\": {\"type\": \"string\"}, \"instructorPhone\": {\"type\": \"string\"}, \"officeLocation\": {\"type\": \"string\"}, \"officeHours\": {\"type\": \"string\"}, \"scheduleDays\": {\"type\": \"string\"}, \"scheduleTime\": {\"type\": \"string\"}, \"scheduleRoom\": {\"type\": \"string\"}, \"learningObjectivesList\": {\"type\": \"string\"}, \"requiredTextbooks\": {\"type\": \"string\"}, \"gradingBreakdown\": {\"type\": \"string\"}, \"assignmentsList\": {\"type\": \"string\"}, \"examsList\": {\"type\": \"string\"}, \"attendancePolicy\": {\"type\": \"string\"}, \"lateWorkPolicy\": {\"type\": \"string\"}, \"academicIntegrityPolicy\": {\"type\": \"string\"}, \"totalWeeks\": {\"type\": \"number\"}, \"startDate\": {\"type\": \"string\"}, \"endDate\": {\"type\": \"string\"}}, \"additionalProperties\": false}"
      },
      "id": "pdfvector-extract",
      "name": "PDF Vector - Extract Syllabus",
      "type": "n8n-nodes-pdfvector.pdfVector",
      "typeVersion": 2,
      "position": [
        680,
        280
      ],
      "credentials": {
        "pdfVectorApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "const data = ($input.first().json?.data || $input.first().json) || {};\nconst fileName = $('Google Drive Trigger').item.json.name;\nconst fileId   = $('Google Drive Trigger').item.json.id;\n\nconst scheduleText = [data.scheduleDays, data.scheduleTime, data.scheduleRoom]\n  .filter(Boolean).join(' | ') || 'N/A';\n\nconst assignments = (data.assignmentsList || '').split(';').filter(a => a.trim());\nconst exams       = (data.examsList       || '').split(';').filter(e => e.trim());\nconst materials   = (data.requiredTextbooks || '').split(';').filter(m => m.trim());\n\n// Build upcoming deadlines from assignments + exams\nconst allDeadlines = [\n  ...assignments.map(a => `\ud83d\udcdd ${a.trim()}`),\n  ...exams.map(e => `\ud83d\udccb ${e.trim()}`)\n].join('\\n') || 'None listed';\n\nreturn [{ json: {\n  courseCode:     data.courseCode     || 'N/A',\n  courseName:     data.courseName     || 'N/A',\n  credits:        data.credits        || 'N/A',\n  semester:       data.semester       || 'N/A',\n  instructorName: data.instructorName || 'N/A',\n  instructorEmail: data.instructorEmail || 'N/A',\n  officeHours:    data.officeHours    || 'N/A',\n  scheduleText,\n  schedule: scheduleText,\n  gradingText:    data.gradingBreakdown || 'N/A',\n  gradingBreakdown: data.gradingBreakdown || 'N/A',\n  assignmentCount: assignments.length,\n  examCount:       exams.length,\n  materialCount:   materials.length,\n  assignmentsList: data.assignmentsList  || 'N/A',\n  examsList:       data.examsList        || 'N/A',\n  requiredTextbooks: data.requiredTextbooks || 'N/A',\n  upcomingDeadlines: allDeadlines,\n  learningObjectivesList: data.learningObjectivesList || 'N/A',\n  fileName, fileId,\n  processedAt: new Date().toISOString()\n}}];"
      },
      "id": "process-syllabus",
      "name": "Process Syllabus",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        880,
        280
      ]
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "YOUR_SPREADSHEET_ID",
          "mode": "list",
          "cachedResultName": "Course Tracker"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Courses"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "Course Code": "={{ $json.courseCode }}",
            "Course Name": "={{ $json.courseName }}",
            "Credits": "={{ $json.credits }}",
            "Semester": "={{ $json.semester }}",
            "Instructor": "={{ $json.instructorName }}",
            "Email": "={{ $json.instructorEmail }}",
            "Office Hours": "={{ $json.officeHours }}",
            "Schedule": "={{ $json.schedule }}",
            "Grading": "={{ $json.gradingBreakdown }}",
            "Assignments": "={{ $json.assignmentsList }}",
            "Exams": "={{ $json.examsList }}",
            "Required Materials": "={{ $json.requiredTextbooks }}",
            "Added Date": "={{ $json.processedAt.split('T')[0] }}"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "Course Code",
              "displayName": "Course Code",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Course Name",
              "displayName": "Course Name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Credits",
              "displayName": "Credits",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Semester",
              "displayName": "Semester",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Instructor",
              "displayName": "Instructor",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Email",
              "displayName": "Email",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Office Hours",
              "displayName": "Office Hours",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Schedule",
              "displayName": "Schedule",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Grading",
              "displayName": "Grading",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Assignments",
              "displayName": "Assignments",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Exams",
              "displayName": "Exams",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Required Materials",
              "displayName": "Required Materials",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Added Date",
              "displayName": "Added Date",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "id": "sheets-log",
      "name": "Log Course Info",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.4,
      "position": [
        1080,
        280
      ],
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "authentication": "oAuth2",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "value": "YOUR_SLACK_CHANNEL_ID",
          "mode": "list",
          "cachedResultName": "course-updates"
        },
        "text": "=\ud83d\udcda *New Course Syllabus Processed*\n\n*{{ $('Process Syllabus').item.json.courseCode }}* - {{ $('Process Syllabus').item.json.courseName }}\n\n\ud83d\udc68\u200d\ud83c\udfeb *Instructor:* {{ $('Process Syllabus').item.json.instructorName }}\n\ud83d\udce7 *Email:* {{ $('Process Syllabus').item.json.instructorEmail || 'N/A' }}\n\ud83d\udd50 *Office Hours:* {{ $('Process Syllabus').item.json.officeHours || 'N/A' }}\n\n\ud83d\udcc5 *Schedule:* {{ $('Process Syllabus').item.json.scheduleText }}\n\n\ud83d\udcca *Grading:* {{ $('Process Syllabus').item.json.gradingText }}\n\n\ud83d\udcdd *Assignments:* {{ $('Process Syllabus').item.json.assignmentCount }} | *Exams:* {{ $('Process Syllabus').item.json.examCount }}\n\ud83d\udcd6 *Required Materials:* {{ $('Process Syllabus').item.json.materialCount }}\n\n*Upcoming Deadlines:*\n{{ $('Process Syllabus').item.json.upcomingDeadlines }}\n\n<https://drive.google.com/file/d/{{ $('Process Syllabus').item.json.fileId }}/view|\ud83d\udcc4 View Syllabus>",
        "otherOptions": {}
      },
      "id": "slack-notify",
      "name": "Notify Student",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2.2,
      "position": [
        1280,
        280
      ],
      "credentials": {
        "slackOAuth2Api": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "Google Drive Trigger": {
      "main": [
        [
          {
            "node": "Download Document",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Document": {
      "main": [
        [
          {
            "node": "PDF Vector - Extract Syllabus",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "PDF Vector - Extract Syllabus": {
      "main": [
        [
          {
            "node": "Process Syllabus",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Process Syllabus": {
      "main": [
        [
          {
            "node": "Log Course Info",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Log Course Info": {
      "main": [
        [
          {
            "node": "Notify Student",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "meta": {
    "templateCredsSetupCompleted": false
  },
  "tags": []
}