Skip to main content

Generate student course schedules based on prerequisites with GPT and Google Sheets

Workflow preview

Workflow preview
100%
Generate student course schedules based on prerequisites with GPT and Google Sheets preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Create a Fall 2025 course schedule for each student based on what they’ve already completed, catalog prerequisites, and term availability (Fall/Both). Reads students from Google Sheets → asks an AI...

Best for

  • Project Management automation workflows
  • AI Chatbot automation workflows
  • intermediate n8n builders looking for reusable templates

Tools used

n8n-nodes-base.manualtrigger, @n8n/n8n-nodes-langchain.lmchatopenai, n8n-nodes-base.stickynote, @n8n/n8n-nodes-langchain.outputparserstructured, @n8n/n8n-nodes-langchain.agent, n8n-nodes-base.set, n8n-nodes-base.googlesheets, n8n-nodes-base.splitout

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Robert Breen.

Original n8n.io source

1.1 Workflow description

Title
Generate student course schedules based on prerequisites with GPT and Google Sheets
Workflow name
Generate student course schedules based on prerequisites with GPT and Google Sheets

Create a Fall 2025 course schedule for each student based on what they’ve already completed, catalog prerequisites, and term availability (Fall/Both). Reads students from Google Sheets → asks an AI agent to select exactly 5 courses (target 15–17 credits, no duplicates, prereqs enforced) → appends each student’s schedule to a schedule tab.


🧠 Summary

  • Trigger: Manual — “When clicking ‘Execute workflow’”
  • I/O: Google Sheets in → OpenAI decisioning → Google Sheets out
  • Ideal for: Registrars, advisors, degree-planning prototypes

✅ What this template does

  • Reads: StudentID, Name, Program, Year, CompletedCourses (pipe-separated CourseIDs) from Sheet1
  • Decides: AI Scheduling Agent chooses 5 courses per student following catalog rules and prerequisites
  • Writes: Appends StudentID + Schedule strings to schedule worksheet
  • Credits target: 15–17 total per term
  • Catalog rules (enforced in the agent prompt):
    • Use Fall or Both courses for Fall 2025
    • Enforce AND prereqs (e.g., CS-102|CS-103 means both)
    • Priority: Major Core → Major Elective → Gen Ed (include Gen Ed if needed)
    • No duplicates or already-completed courses
    • Prefer 200-level progression when prereqs allow

⚙️ Setup (only 2 steps)

1) Connect Google Sheets (OAuth2)
  • In n8n → Credentials → New → Google Sheets (OAuth2), sign in and grant access
  • In the Google Sheets nodes, select your spreadsheet and these tabs:
    • Sheet1 (input students)
    • schedule (output)

> Example spreadsheet (replace with your own):
> - Input: .../edit#gid=0
> - Output: .../edit#gid=572766543

2) Connect OpenAI (API Key)
  • In n8n → Credentials → New → OpenAI API, paste your key
  • In the OpenAI Chat Model node, select that credential and a chat model (e.g., gpt-4o)

📥 Required input (Sheet1)

  • Columns: StudentID, Name, Program, Year, CompletedCourses
  • CompletedCourses: pipe-separated IDs (e.g., GEN-101|GEN-103|CS-101)
  • Program names should match those referenced in the embedded catalog (e.g., Computer Science BS, Business Administration BBA, etc.)

📤 Output (schedule tab)

  • Columns:
    • StudentID
    • Schedule → a selected course string (written one row per course after splitting)

🧩 Nodes in this template

  • Manual TriggerGet Student Data (Google Sheets)Scheduling Agent (OpenAI)
    Split ScheduleSet FieldsClear sheetAppend Schedule (Google Sheets)

🛠 Configuration tips

  • If you rename tabs, update both Get Student Data and Append Schedule nodes
  • Keep CompletedCourses consistent (use | as the delimiter)
  • To store rationale as well, add a column to the output and map it from the agent’s JSON

🧪 Test quickly

  1. Add 2–3 sample student rows with realistic CompletedCourses
  2. Run the workflow and verify:
    • 5 course rows per student in schedule
    • Course IDs respect prereqs & Fall/Both availability
    • Credits sum ~15–17

🧯 Troubleshooting

  • Sheets OAuth error: Reconnect “Google Sheets (OAuth2)” and re-select the spreadsheet & tabs
  • Empty schedules: Ensure CompletedCourses uses | and that programs/courses align with the provided catalog names
  • Prereq violations: Check that students actually have all AND-prereqs in CompletedCourses
  • OpenAI errors (401/429): Verify API key, billing, and rate-limit → retry with lower concurrency

🔒 Privacy & data handling

  • Student rows are sent to OpenAI for decisioning. Remove or mask any fields you don’t want shared.
  • Google Sheets retains input/output. Use spreadsheet sharing controls to limit access.

💸 Cost & performance

  • OpenAI: Billed per token; cost scales with student count and prompt size
  • Google Sheets: Free within normal usage limits
  • Runtime: Typically seconds to a minute depending on rows and rate limits

🧱 Limitations & assumptions

  • Works for Fall 2025 only (as written). For Spring, update availability rules in the agent prompt
  • Assumes catalog in the agent system message is your source of truth
  • Assumes Program names match catalog variants (case/spacing matter for clarity)

🧩 Customization ideas

  • Add a Max Credits column to cap term credits per student
  • Include Rationale in the sheet for advisor review
  • Add a “Gen Ed needed?” flag per student to force at least one Gen Ed selection
  • Export to PDF or email the schedules to advisors/students

🧾 Version & maintenance

  • n8n version: Tested on recent n8n Cloud builds (2025)
  • Community nodes: Not required
  • Maintenance: Update the embedded catalog and offerings each term; keep prerequisites accurate

🗂 Tags & category

  • Category: Education / Student Information Systems
  • Tags: scheduling, registrar, google-sheets, openai, prerequisites, degree-planning, catalog, fall-term

🗒 Changelog

  • v1.0.0 — Initial release: Sheets in/out, Fall 2025 catalog rules, prereq enforcement, 5-course selection, credits target

📬 Contact

Need help customizing this (e.g., cohort logic, program-specific rules, adding rationale to the sheet, or emailing PDFs)?

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - When clicking ‘Execute workflow’

Type / Role
n8n-nodes-base.manualTrigger - manualTrigger
Config choices
Version 1

Block 2 - OpenAI Chat Model2

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Block 3 - Sticky Note66

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 4 - Structured Output Parser

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.3

Block 5 - Sticky Note67

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 6 - Scheduling Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 2.2

Block 7 - Set Fields

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 8 - Clear sheet1

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.7

Block 9 - Sticky Note56

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 10 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 11 - Get Student Data

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.7

Block 12 - Split Schedule

Type / Role
n8n-nodes-base.splitOut - splitOut
Config choices
Version 1

Block 13 - Append Schedule

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.7

3. Summary Table

Workflow Generate student course schedules based on prerequisites with GPT and Google Sheets
Complexity intermediate
Nodes 13
Categories Project Management, AI Chatbot
Author Robert Breen
Published 31 Aug 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/8090/8090.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Generate student course schedules based on prerequisites with GPT and Google Sheets do?

Create a Fall 2025 course schedule for each student based on what they’ve already completed, catalog prerequisites, and term availability (Fall/Both). Reads students from Google Sheets → asks an AI...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Project Management, AI Chatbot use case.