Templates / Schedule weekly focus-time blocks with Google Calendar, OpenAI, and Slack

Schedule weekly focus-time blocks with Google Calendar, OpenAI, and Slack

Ready for 3.0

by kenta ✓ · 330 views · created 2026-07-14 · Personal Productivity, Multimodal AI

Ready 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).

  1. ⚙️ My Preferences (Edit Fields (Set)): sets 4 fields: workStartHour, workEndHour, minBlockHours…
  2. Get Next Week's Events (Google Calendar): get many
  3. Find Free Gaps (Code): runs custom JavaScript code
  4. Any Focus Slots? (If): checks a condition and branches into true / false
  5. Cap Blocks Per Week (Limit): keeps the first few items
  6. Warn: Week Too Fragmented (Slack): uses Slack
  7. Book Focus Block (Google Calendar): uses Google Calendar
  8. Bundle Booked Blocks (Aggregate): combines items into one
  9. Write My Focus Plan (Basic LLM Chain): sends a prompt to an LLM, with model: OpenAI Chat Model
  10. DM My Focus Plan (Slack): uses Slack

Services it uses

Google CalendarOpenAI Chat ModelSlack

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)

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…

Excerpt from kenta's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.