Google Calendar Importer
approvedby Fan Li
A simple and light-weighted google calendar importer, allow injecting the events / tasks of a day automatically to your daily notes, or import it to anywhere with a command.
Google Calendar Importer
A simple and light-weighted google calendar importer, allow injecting the events / tasks of a day automatically to your daily notes, or import it to anywhere with a command.
Features
-
🗓️ Automatic Daily Notes Integration: Automatically inject calendar events when opening daily notes
-
📝 Manual Import Command: Insert calendar blocks anywhere in your notes with a simple command
-
🎯 Date-Specific Imports: Choose any date to import events for that specific day
-
🔄 Live Calendar Blocks: Uses markdown code blocks as configuration that render your calendar events as you want
-
🔐 Secure OAuth Integration: Secure authentication with Google Calendar using OAuth 2.0
Requirements
- Obsidian v0.15.0 or later
- Desktop version of Obsidian (plugin is desktop-only)
- Google Calendar account
- Google Cloud Project with Calendar API enabled
Setup
1. Google Cloud Console Setup
- Go to Google Cloud Console
- Create a new project or select an existing one
- Enable the Google Calendar API and task API
- Create OAuth 2.0 credentials
- Add yourself as test account
- Note down your Client ID and Client Secret
TODO: add detail explanation with screenshot
2. Plugin Configuration
- Open Obsidian Settings
- Navigate to Community Plugins → Google Calendar Importer
- Enter your Google Client ID and Client Secret
- Click "Authenticate with Google" to complete the OAuth flow
- Configure your preferences:
- Enable for Daily Notes: Automatically add calendar blocks when opening daily notes
Installation
From Obsidian Community Plugins (Recommended)
[When available in the community plugin directory]
- Open Obsidian Settings
- Go to Community Plugins and disable Safe Mode
- Click Browse and search for "Google Calendar Importer"
- Install and enable the plugin
Manual Installation
- Download the latest release from GitHub Releases
- Extract the files to
VaultFolder/.obsidian/plugins/google-calendar-importer/ - Reload Obsidian and enable the plugin in settings
Development Installation
- Clone this repository into your
.obsidian/plugins/folder:git clone https://github.com/lexafaxine/google-calendar-importer.git - Navigate to the plugin folder and install dependencies:
cd google-calendar-importer npm install - Build the plugin:
npm run build - Enable the plugin in Obsidian settings
Development
Prerequisites
- Node.js v16 or later
- npm or yarn
Building
# Install dependencies
npm install
# Development build (watch mode)
npm run dev
# Production build
npm run build
Code Structure
main.ts- Main plugin class and core functionalitygoogleCalendarAPI.ts- Google Calendar API integrationcodeBlockProcessor.ts- Markdown code block processor for renderingdateInputModal.ts- Modal for selecting datesoauthServer.ts- OAuth authentication server
Privacy & Security
- All authentication is handled through Google's official OAuth 2.0 flow
- No calendar data is stored permanently; it's fetched on-demand
- Access tokens are stored locally in Obsidian's plugin data
- The plugin only requests read access to your calendar events
Troubleshooting
Authentication Issues
- Ensure your Google Cloud Project has the Calendar and Task API enabled
- Verify your Client ID and Client Secret are entered correctly
- Make sure your OAuth consent screen is properly configured
Calendar Not Loading
- Check if you have internet connectivity
- Verify your Google account has access to the calendars you want to import
- Try re-authenticating by clearing the stored tokens in plugin settings
Contributing
Contributions are welcome! Please feel free to submit issues and pull requests.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Support
If you find this plugin useful, consider supporting the development:
- ⭐ Star this repository
- 🐛 Report issues on GitHub
- 💡 Suggest new features
Changelog
v1.0.0
- Initial release
- Basic Google Calendar integration
- Daily notes automation
- Manual calendar block insertion
- OAuth 2.0 authentication
Author: lexafaxine
For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.