Schedule weekly focus-time blocks with Google Calendar, OpenAI, and Slack
Ready for 3.0Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.
What this workflow does
This AI workflow has 12 nodes and runs on a schedule (every week at 18:00). Along the way it connects Google Calendar, OpenAI Chat Model and Slack.
How it runs
Trigger: On a schedule (every week at 18:00).
- ⚙️ My Preferences (Edit Fields (Set)): sets 4 fields: workStartHour, workEndHour, minBlockHours…
- Get Next Week's Events (Google Calendar): get many
- Find Free Gaps (Code): runs custom JavaScript code
- Any Focus Slots? (If): checks a condition and branches into true / false
- Cap Blocks Per Week (Limit): keeps the first few items
- Warn: Week Too Fragmented (Slack): uses Slack
- Book Focus Block (Google Calendar): uses Google Calendar
- Bundle Booked Blocks (Aggregate): combines items into one
- Write My Focus Plan (Basic LLM Chain): sends a prompt to an LLM, with model: OpenAI Chat Model
- DM My Focus Plan (Slack): uses Slack
Services it uses
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (10)
- Schedule Trigger
n8n-nodes-base.scheduleTrigger - Edit Fields (Set)
n8n-nodes-base.set - Google Calendar
n8n-nodes-base.googleCalendar - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - Limit
n8n-nodes-base.limit - Aggregate
n8n-nodes-base.aggregate - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Slack
n8n-nodes-base.slack
From the author
Quick overview This workflow runs every Sunday at 18:00 to scan your Google Calendar for next week, find free gaps of at least two hours within your working hours, auto-book them as “🧘 Focus Time” events, and then DM you a personalized deep-work plan in…