Quick overview
This workflow collects tasks and busy-time blocks from Google Sheets, generates a multi-day work plan that respects dependencies and daily capacity, routes it through a Google Sheets review gate, and after approval exports a UTC ICS calendar snapshot to Google Drive and prepares Gmail draft notifications.
How it works
- Starts when someone submits the n8n Form (or runs the manual demo trigger) with a plan ID, plan date, optional excluded task IDs, and an optional exported baseline case key.
- Reads the plan register, tasks, and busy blocks from Google Sheets and builds a proposed schedule across business days by merging overlapping busy intervals, honoring working hours, dependencies, earliest dates, and a per-day minute budget.
- Writes or updates the proposal in the Google Sheets plan register and, if needed, creates a Gmail draft requesting a reviewer decision.
- Polls the Google Sheets plan register until a matching reviewer decision is recorded (approve/reject/revise) with the correct proposal hash and reviewer email, or until the review window times out.
- If approved, re-reads tasks and busy blocks from Google Sheets and aborts the export if the source snapshot has changed since the proposal was reviewed.
- If the proposal is still valid, creates an ICS calendar file for the scheduled tasks and uploads it to a private Google Drive folder (or reuses an existing identical export), then saves the final status and outcome details back to Google Sheets and drafts a final Gmail notification.
Setup
- Create a Google Sheets spreadsheet with three tabs named Tasks, BusyBlocks, and Plans, using the columns expected by the workflow (including decision, reviewed_hash, reviewer, and comment fields in Plans).
- Add Google Sheets credentials in n8n and set the spreadsheet ID in the workflow configuration values.
- Add Google Drive credentials and set a private output folder ID where the workflow can search for and upload exported ICS files.
- Add Gmail credentials and set the recipient email addresses (reportTo and reviewerEmail) used for review-request and outcome draft messages.
- Configure planning parameters such as timezone, workdays, working hours, horizonDays, dailyCapacityMinutes, polling/review timing, and whether to block exports when tasks are late, then disable demoMode to use live Google services.