Skip to content

Simple script to fetch work schedule via gmail, inserting them into google calendar. Made for personal use

Notifications You must be signed in to change notification settings

Kiizon/shift2notion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Work Schedule Automation

Automatically fetches work schedules from Gmail and adds them to Google Calendar.

Quick Setup

  1. Install dependencies:

    python3 -m venv venv
    source venv/bin/activate
    pip install -r requirements.txt
  2. Get Google API credentials:

    • Go to Google Cloud Console
    • Enable Gmail API and Calendar API
    • Create OAuth credentials → Download as credentials.json
  3. Configure: Edit main.py:

    name = "Your Name"  # Line 17
    employer_email = "your.employer@company.com"  # Line 240
  4. Run:

    python3 main.py
  5. Optional - Set up automation:

    crontab -e
    # Add: 0 22 * * 7 /path/to/your/project/run_schedule.sh
    # run pwd in terminal to get path to run_schedule.sh

What It Does

  • Searches Gmail for Excel schedules from your employer
  • Finds your shifts and creates calendar events
  • Handles time formats like 5:30-CL and 6-CL

Troubleshooting

  • "No shifts found": Check your name matches the Excel file exactly
  • "ModuleNotFoundError": Activate virtual environment first
  • Auth issues: Delete token.json and run again

Security

Never commit credentials.json or token.json - they contain sensitive data.

About

Simple script to fetch work schedule via gmail, inserting them into google calendar. Made for personal use

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published