Quick overview
This dual-trigger workflow logs daily study sessions from an n8n Form, analyzes them with OpenAI, stores results in Google Sheets, and emails a full coaching report via Gmail; it also runs daily at 7 AM to email each student revision reminders based on spaced-repetition dates.
How it works
- Receives a study-session submission through an n8n Form.
- Validates the submitted fields and calculates spaced-repetition revision dates (Day+1, +3, +7, +14).
- Sends the session details to OpenAI Chat Completions and parses the returned JSON coaching analysis (score, feedback, plan, and quiz).
- Reads the existing Google Sheets Daily Log to find any prior sessions for the same student that are due for revision on the submitted date.
- Builds an HTML email combining the AI report, today’s revision-due items, and the new revision schedule, then appends the new session to Google Sheets.
- Sends the full daily study report to the student via Gmail.
- Runs every day at 7 AM, reads all Google Sheets logs, finds revision items due today per student, and emails each student a morning revision reminder via Gmail.
Setup
- Add an OpenAI API credential and ensure the Chat Completions request is authorized for the model used in the HTTP request.
- Add a Google Sheets OAuth2 credential, create a spreadsheet with a “Daily Log” tab and the required headers, and replace
YOUR_STUDY_SHEET_ID in all Google Sheets nodes.
- Add a Gmail OAuth2 credential for sending emails in both the daily report and morning reminder steps.
- Publish the n8n Form and share the form URL with students, then confirm the 7 AM schedule matches your instance timezone before activating the workflow.