A plugin that automatically syncs your Substack newsletter subscriptions from Gmail into Obsidian notes.
- 🔄 Automatic syncing of Substack newsletters from Gmail
- 📧 OAuth2 authentication with Gmail API
- 📝 Converts HTML newsletters to clean Markdown
- 🏷️ Adds structured frontmatter with metadata
- ⏰ Configurable auto-sync intervals
- 📁 Organizes newsletters in designated folders
- 🔍 Prevents duplicate imports
-
Google Cloud Console Setup:
- Create a project in Google Cloud Console
- Enable the Gmail API
- Create OAuth 2.0 credentials (Desktop application)
- Note your Client ID and Client Secret
-
OAuth Token Generation:
- Use the authorization URL in plugin settings
- Grant necessary permissions
- Exchange authorization code for access/refresh tokens
- Download the latest release files
- Create folder:
VaultFolder/.obsidian/plugins/substack-gmail-sync/
- Copy
main.js
,manifest.json
, andstyles.css
to the folder - Enable the plugin in Obsidian Settings → Community Plugins
- Clone this repository
- Run
npm install
- Run
npm run build
- Copy built files to your vault's plugin directory
-
Gmail API Setup:
- Enter your Client ID and Client Secret
- Add your Access Token and Refresh Token
-
Sync Settings:
- Set target folder for newsletters
- Configure maximum emails per sync
- Set auto-sync frequency
- Manual Sync: Click the ribbon icon or use the command palette
- Auto Sync: Configure automatic syncing in settings
- Command: Use "Sync Substack newsletters from Gmail" command
https://www.googleapis.com/auth/gmail.readonly
-
Authentication Errors:
- Verify OAuth credentials are correct
- Check if access token has expired
- Ensure Gmail API is enabled in Google Cloud Console
-
No Emails Found:
- Check Gmail search query parameters
- Verify Substack emails exist in your inbox
- Increase max emails limit in settings
-
Import Issues:
- Check folder permissions
- Verify folder path exists
- Look for duplicate filename conflicts
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
If you find this plugin helpful, consider:
- ⭐ Starring the repository
- 🐛 Reporting bugs
- 💡 Suggesting features