Prerequisites
Before starting, ensure you have:Python 3.9 or higher installed
A Google account with Calendar access
Git installed (if cloning the repository)
Step 1: Set up environment file
Step 2: Get Google OAuth credentials
Create a Google Cloud project
- Go to Google Cloud Console
- Click Create Project
- Enter a project name (e.g., “Morning Brain Starter”)
- Click Create
Enable required APIs
Enable these APIs in your project:
- Google Calendar API (required)
- Gmail API (optional, for email sync)
- Google Docs API (optional, for transcription import)
- Google Meet API (optional, for automatic transcription activation)
Create OAuth 2.0 credentials
- Go to APIs & Services → Credentials
- Click Create Credentials → OAuth client ID
- Configure consent screen if prompted
- Select Desktop app as application type
- Enter a name (e.g., “Morning Routine Desktop”)
- Click Create
- Copy the Client ID and Client Secret
The refresh token will be generated automatically in the next step. You don’t need to create it manually.
Step 3: Run OAuth setup
Thesetup_oauth.py script handles the OAuth flow and generates your refresh token.
Authorize in your browser
- A browser window will open automatically
- Sign in with your Google account
- Review the permissions requested
- Click Allow
calendar.readonly- View your calendar eventscalendar.events- Modify events (for Meet links and responses)gmail.readonly- Read your email (optional)documents.readonly- Read Google Docs (for transcriptions)meetings.space.settings- Control Meet settings (for auto-transcription)
Step 4: Run your first morning routine
Review the output
The routine executes 7 steps:
- Calendar sync - Today’s events + recent meetings
- Asana sync - Move yesterday’s incomplete tasks to today (if configured)
- Asana list - Show today’s tasks in priority order (if configured)
- Email sync - Fetch recent emails for context (if configured)
- Transcription import - Download meeting transcripts from yesterday
- Completed tasks - Add finished tasks to client bitácoras (if configured)
- Bitácora generation - Update client meeting logs
Example output
Steps 2, 3, and 6 are skipped automatically if Asana is not configured. The routine works with just Google Calendar.
What happens during the routine?
Step 1: Calendar sync
Step 1: Calendar sync
- Fetches today’s calendar events
- Retrieves recent events (last 7 days by default)
- Adds Google Meet links to events without them
- Enables transcription on Meet events (or adds reminder)
- Matches events to clients based on
config/clients.yaml
Steps 2-3: Asana tasks (optional)
Steps 2-3: Asana tasks (optional)
- Moves incomplete tasks from yesterday to today’s section
- Lists today’s tasks sorted by day-of-week priority
- Uses
config/asana_order.yamlfor client prioritization
Step 4: Email sync (optional)
Step 4: Email sync (optional)
- Fetches recent emails from configured Gmail labels
- Provides context for client communications
- Can use demo mode with fake emails
Step 5: Transcription import
Step 5: Transcription import
- Searches for Google Docs transcriptions from yesterday
- Imports transcripts and associates with calendar events
- Stores in
context/clients/[client]/projects/[project]/meetings/
Step 6: Completed tasks to bitácora
Step 6: Completed tasks to bitácora
- Finds tasks completed yesterday
- Appends to relevant client bitácoras
- Helps track what was accomplished per client
Step 7: Bitácora generation
Step 7: Bitácora generation
- Updates
context/clients/[client]/bitacora.mdfiles - Adds meeting summaries in reverse chronological order
- Creates new client directories if needed
Running individual steps
You can run any step independently using the CLI commands shown in the output:Next steps
Configure clients
Set up client bitácoras and project matching
Add Asana integration
Connect Asana for task management
Enable Gmail sync
Sync emails for additional context
Explore commands
Learn about individual CLI commands
Troubleshooting
Browser doesn't open during OAuth
Browser doesn't open during OAuth
The script prints a URL you can copy and paste manually:
Permission denied errors
Permission denied errors
Ensure your OAuth credentials have the correct scopes. Re-run:
No events showing
No events showing
- Check that
CALENDAR_NAMEmatches your calendar exactly (case-sensitive) - Verify the calendar has events in the specified date range
- Try:
python3 scripts/calendar_lite.py --which-calendarto see which calendar is active
Module not found errors
Module not found errors
Ensure you’ve installed dependencies: