How to Auto-Schedule Deep Work Blocks with OpenClaw in Paradime

Feb 26, 2026

Table of Contents

How to Automate Deep Work Scheduling with Paradime, OpenClaw, and Google Calendar API

Stop losing your best thinking hours to back-to-back meetings. This guide walks you through building an automated deep work scheduler that analyzes your weekly Google Calendar, finds 2-hour open windows, and creates protected "Deep Work" blocks — all orchestrated by OpenClaw and scheduled through Paradime Bolt. Every step is structured for reproducibility and minimal-fix debugging, so you spend less time configuring and more time in flow state.

What Is Paradime?

Paradime is an AI-native data engineering platform — often described as "Cursor for Data" — that replaces dbt Cloud™ for teams building analytics and AI pipelines. It gives data teams a single workspace to code, ship, fix, and scale data pipelines using dbt™ and Python.

The three core pillars of Paradime are:

  • Code IDE — An AI-native IDE with DinoAI, an integrated assistant that cuts dbt™ and Python development time by 83%+. It provides inline lineage, data samples, and context-aware completions.

  • Bolt — A purpose-built scheduler for dbt™ and Python pipelines. Bolt handles orchestration, CI/CD, cron-based scheduling, and integrates with DinoAI for AI-powered debugging of failed runs.

  • Radar — FinOps tooling to reduce Snowflake and BigQuery costs, helping teams reclaim credits for AI use cases.

For this tutorial, Bolt is the critical component. We'll use it to schedule a Python script on a cron trigger every Sunday evening — kicking off the deep work analysis and calendar event creation pipeline.

A simple paradime_schedules.yml in the root of your dbt™ project is all you need to define Bolt schedules as code:

What Is OpenClaw?

OpenClaw is an open-source autonomous AI agent that runs locally on your hardware and orchestrates tasks across chat apps, files, the web, and your operating system. It is not an LLM itself — instead, it connects to models like Claude or GPT via API and uses skills to act.

Key capabilities relevant to this tutorial:

Capability

What it does

Skills & Plugins

Extend OpenClaw with community skills or custom ones you build yourself

Cron Jobs

Gateway's built-in scheduler that persists jobs and wakes the agent on schedule

Persistent Memory

Remembers preferences and context across sessions

System Access

Read/write files, run shell commands, execute scripts

Chat App Integration

Works across WhatsApp, Telegram, Slack, Discord, and more

The OpenClaw Python SDK (openclaw) provides a programmatic interface to create agents, run tasks, and integrate with external APIs:

Architecture Overview

Before diving into code, here's the end-to-end flow of the deep work scheduling system:

Figure 1: End-to-end deep work scheduling pipeline — from Bolt cron trigger to calendar events.

Setup: openclaw-sdk + Google Calendar API (Read + Write)

Prerequisites

Before starting, ensure you have:

  • Python 3.10+ installed

  • A Google Cloud project with the Google Calendar API enabled

  • A Google account with Calendar access

  • An OpenClaw API key (from openclaw.ai)

  • A Paradime workspace with Bolt access (paradime.io)

Step 1: Enable the Google Calendar API

  1. Go to the Google Cloud Console.

  2. Create or select your project.

  3. Navigate to APIs & Services → Library.

  4. Search for Google Calendar API and click Enable.

  5. Go to Google Auth platform → Clients and create an OAuth 2.0 Client ID (Desktop app type).

  6. Download the credentials JSON file and save it as credentials.json.

⏱ Time to first clue: If the API isn't returning data, check that the Calendar API is actually enabled — not just the Calendar metadata API. They are different.

Step 2: Install Dependencies

For Paradime Bolt, use a pyproject.toml with Poetry so dependencies are reproducible:

Step 3: Authenticate with Google Calendar

The following helper function handles OAuth authentication, supporting both interactive and service-account workflows. For production use in Bolt, you'll load credentials from the GOOGLE_CREDENTIALS_JSON environment variable:

Decision tree — Which auth method?

Figure 2: Decision tree for selecting the right Google Calendar authentication method.

Script: Analyze Weekly Calendar, Find Open Windows, and Create Deep Work Events

This is the core Python script that ties everything together. It:

  1. Fetches all events for the upcoming week

  2. Identifies 2-hour open windows during working hours

  3. Uses OpenClaw to intelligently rank the best deep work slots

  4. Creates "Deep Work" events with do-not-disturb settings

The Complete Script

How the Script Works — Step by Step

Figure 3: The five-step pipeline executed every Sunday evening.

Environment Variables: GOOGLE_CREDENTIALS_JSON and OPENCLAW_API_KEY

The script relies on two critical environment variables. Here's how to configure them in each context:

Local Development

⏱ Time to first clue: If you get a KeyError: 'GOOGLE_CREDENTIALS_JSON', the variable isn't set. Run env | grep GOOGLE to verify.

Paradime Bolt (Production)

  1. In the Paradime app, go to Settings → Workspaces → Environment Variables.

  2. In the Bolt Schedules section, click Add New.

  3. Add each variable:

Key

Value

Notes

GOOGLE_CREDENTIALS_JSON

{"token": "ya29...", ...}

Full serialized OAuth token JSON

OPENCLAW_API_KEY

oc_live_abc123def456

Your OpenClaw API key

  1. Click the Save icon (💾).

You can also use Bulk Upload via CSV if managing many variables:

Security note: Paradime encrypts environment variables at rest. Never commit secrets to your Git repository. Use .gitignore to exclude .env, token.json, and credentials.json.

Environment Variable Override at Schedule Level

Paradime supports overriding global defaults per schedule. This is useful if different team members have their own calendars:

Figure 4: How Paradime Bolt resolves environment variables — schedule-level overrides take priority.

Bolt Schedule: Cron Sunday Evening

With the script written and environment variables configured, define the Bolt schedule. There are two approaches:

Option A: Schedules as Code (Recommended)

Create a paradime_schedules.yml file in the root of your dbt™ project:

Cron expression breakdown: 0 18 * * 0

Field

Value

Meaning

Minute

0

At minute 0

Hour

18

At 6 PM

Day of Month

*

Every day

Month

*

Every month

Day of Week

0

Sunday

Tip: Validate your cron expressions at crontab.guru before deploying.

Option B: Bolt UI

  1. Navigate to Bolt in Paradime.

  2. Click Create Schedule.

  3. Set Trigger Type to Scheduled Run.

  4. Enter the cron expression 0 18 * * 0.

  5. Set the timezone to your preference.

  6. Add your commands:

  7. Click Deploy.

Verify Your Schedule

Use the Paradime CLI to validate before pushing:

Schedules defined in paradime_schedules.yml are auto-read from your default branch (main/master) and refreshed every 10 minutes. You can also force a manual refresh via Bolt → Parse Schedules.

OpenClaw Cron Alternative: Running the Agent Directly

If you prefer to run the scheduling logic entirely within OpenClaw's Gateway scheduler (without Paradime Bolt), you can set up a cron job directly:

This creates a recurring isolated job that wakes OpenClaw every Sunday at 6 PM Pacific, runs the analysis in a fresh session, and announces results to your Slack channel.

Figure 5: Choosing between Paradime Bolt and OpenClaw Cron for orchestration.

Monitoring and Debugging

Paradime Bolt Monitoring

Once your schedule runs, Paradime provides comprehensive observability:

Run History Overview:

  • Navigate to Bolt → Your Schedule → Run History.

  • View a graphical representation of the last 30 days: success/error rates, execution duration trends, and total run counts.

Analyzing Individual Runs: Click any Run ID to see:

View

What it shows

Summary

Completion status, duration, warnings, and suggested actions

Console Logs

Line-by-line output from your Python script (print() statements appear here)

Debug Logs

System-level details — resource allocation, thread usage, connection status

Integration Logs

Payloads sent to Slack, Jira, or other connected integrations

Artifacts

manifest.json, run_results.json, and other execution metadata

SLA Alerts: The sla_minutes: 15 setting in the schedule config triggers alerts when the job takes longer than expected. Configure notification channels (Slack, email, Jira) to catch issues early.

OpenClaw Cron Monitoring

If using OpenClaw's cron scheduler:

Run logs are persisted at ~/.openclaw/cron/runs/.jsonl. If a job fails, OpenClaw's retry policy kicks in:

  • Transient errors (rate limits, network issues, 5xx): retried up to 3× with backoff (30s → 1m → 5m).

  • Permanent errors (auth failures, config issues): no retry — the job is disabled immediately.

Figure 6: OpenClaw's automatic retry behavior for failed cron jobs.

Troubleshooting Common Issues

Structured as a decision tree for minimal time-to-first-clue:

1. "No valid credentials" error

Figure 7: Decision tree for Google Calendar authentication errors.

Minimal fix: Re-run the interactive OAuth flow locally with the correct scope (https://www.googleapis.com/auth/calendarnot calendar.readonly), then copy the contents of token.json into your GOOGLE_CREDENTIALS_JSON environment variable.

2. "No 2-hour open windows found"

This means your calendar is fully booked. Check:

  • Are all-day events being excluded? The script skips events without dateTime (all-day events). If your deep work should overlap with all-day events, remove the continue guard.

  • Are the working hours correct? Adjust WORK_START_HOUR and WORK_END_HOUR.

  • Is the timezone right? A timezone mismatch can shift all windows out of range.

3. OpenClaw agent returns malformed JSON

Root cause: The LLM sometimes wraps JSON in markdown code fences.

Minimal fix: Strip markdown fencing before parsing:

4. Bolt schedule runs but script fails silently

Check the Console Logs in Bolt's run detail view. Common causes:

Symptom

Cause

Fix

ModuleNotFoundError: No module named 'openclaw'

Missing poetry install command

Ensure poetry install is the first command in your schedule

Script exits with code 0 but no events created

Google Calendar API returned an error that was caught silently

Add explicit error logging and raise exceptions on API errors

poetry: command not found

Poetry not installed in Bolt runtime

Check Paradime docs for supported runtimes

5. OpenClaw cron job executes but doesn't deliver results

Common fixes:

  • Ensure cron.enabled: true in ~/.openclaw/openclaw.json.

  • Check that OPENCLAW_SKIP_CRON environment variable is not set.

  • Verify the Gateway process is running continuously (not just started and stopped).

6. Google Calendar API rate limits

Google Calendar API has a default quota of 1,000,000 queries per day and 500 queries per 100 seconds per user. For a weekly scheduling script, you're unlikely to hit this — but if you do:

Quick Reference: Full Decision Tree

Figure 8: Master troubleshooting decision tree — follow the nodes to your fix.

Wrapping Up

You've built a fully automated deep work scheduling system that:

  1. Runs hands-free every Sunday evening via Paradime Bolt's cron scheduler (or OpenClaw's built-in cron).

  2. Reads your actual calendar through the Google Calendar API to understand your real availability.

  3. Uses AI to rank windows via OpenClaw's agent SDK — preferring morning slots during cognitive peaks.

  4. Creates protected events with do-not-disturb settings, ensuring your deep work time is visible to colleagues.

  5. Provides full observability through Bolt's run logs, SLA alerts, and DinoAI-powered debugging.

The reproducibility checklist:

  • GOOGLE_CREDENTIALS_JSON and OPENCLAW_API_KEY set in Bolt env vars

  • paradime_schedules.yml committed to main branch

  • poetry install is the first command in the schedule

  • Cron expression validated at crontab.guru

  • OAuth scope is calendar (not calendar.readonly)

  • Timezone matches your working timezone

  • paradime schedule verify passes

The deep work methodology — popularized by Cal Newport — emphasizes that uninterrupted focus blocks are not a luxury; they are a prerequisite for meaningful output. By automating the scheduling of these blocks, you remove the friction that prevents most people from protecting their focus time consistently.

Your next steps:

  • Customize the ranking logic — add preferences for specific days, project priorities, or energy patterns.

  • Add Slack notifications — announce the week's deep work schedule to your team channel.

  • Track effectiveness — log how many deep work blocks you actually honor versus reschedule, and feed that data back into the OpenClaw agent for smarter future scheduling.

Built with Paradime for pipeline orchestration and OpenClaw for autonomous AI agent capabilities. Scheduling logic powered by the Google Calendar API.

Interested to Learn More?
Try Out the Free 14-Days Trial

Stop Managing Pipelines. Start Shipping Them.

Join the teams that replaced manual dbt™ workflows with agentic AI. Free to start, no credit card required.

Stop Managing Pipelines. Start Shipping Them.

Join the teams that replaced manual dbt™ workflows with agentic AI. Free to start, no credit card required.

Stop Managing Pipelines. Start Shipping Them.

Join the teams that replaced manual dbt™ workflows with agentic AI. Free to start, no credit card required.

Copyright © 2026 Paradime Labs, Inc. Made with ❤️ in San Francisco ・ London

*dbt® and dbt Core® are federally registered trademarks of dbt Labs, Inc. in the United States and various jurisdictions around the world. Paradime is not a partner of dbt Labs. All rights therein are reserved to dbt Labs. Paradime is not a product or service of or endorsed by dbt Labs, Inc.

Copyright © 2026 Paradime Labs, Inc. Made with ❤️ in San Francisco ・ London

*dbt® and dbt Core® are federally registered trademarks of dbt Labs, Inc. in the United States and various jurisdictions around the world. Paradime is not a partner of dbt Labs. All rights therein are reserved to dbt Labs. Paradime is not a product or service of or endorsed by dbt Labs, Inc.

Copyright © 2026 Paradime Labs, Inc. Made with ❤️ in San Francisco ・ London

*dbt® and dbt Core® are federally registered trademarks of dbt Labs, Inc. in the United States and various jurisdictions around the world. Paradime is not a partner of dbt Labs. All rights therein are reserved to dbt Labs. Paradime is not a product or service of or endorsed by dbt Labs, Inc.