Overview
The Gmail integration:- Syncs email threads from the last 30 days
- Saves thread conversations as markdown files
- Downloads and stores email attachments
- Uses incremental sync to only fetch new messages
- Runs automatically every 5 minutes
Prerequisites
Gmail integration requires Google OAuth setup. You’ll need to create a Google Cloud project and enable the Gmail API.
Google OAuth Setup
Follow these steps to connect Gmail to Rowboat.Open Google Cloud Console
Go to Google Cloud Console and make sure you’re logged into the Google account you want to use.
Create a New Project
Go to Create Project
- Click Create Project
- Give it a name (e.g.
Rowboat Integration) - Click Create
Enable Gmail API
Configure OAuth Consent Screen
Go to OAuth Consent ScreenApp Information:
- App name:
Rowboat - User support email: Your email
- Choose External
- Add your email address
You do NOT need to publish the app — keeping it in Testing mode is fine.
Add Test Users
If your app is in Testing mode, you must add users manually.Go to Test UsersUnder Test Users:
- Click Add Users
- Add the email address you plan to connect with Rowboat
Create OAuth Client ID
Go to CredentialsClick Create Credentials → OAuth Client IDApplication Type:
- Select: Universal Windows Platform (UWP)
- Name:
Rowboat Desktop - Store ID:
test - Click Create
How It Works
Sync Configuration
The Gmail sync runs automatically with these settings:Thread Storage Format
Each Gmail thread is saved as a markdown file:Incremental Sync
Rowboat uses Gmail’s History API for efficient syncing:- First Sync: Fetches all threads from the last 30 days
- Subsequent Syncs: Only fetches new messages using history ID
- State Tracking: Saves history ID to
sync_state.json
Attachment Handling
Attachments are automatically downloaded and stored:- Location:
~/rowboat/gmail_sync/attachments/ - Naming:
{messageId}_{filename} - Deduplication: Skips if already downloaded
Trigger Manual Sync
You can trigger an immediate sync programmatically:Troubleshooting
401 Unauthorized Error
If you see authentication errors, Rowboat will automatically clear the OAuth cache:Rate Limiting
Gmail API has rate limits. Rowboat handles this by:- Syncing every 5 minutes (not more frequently)
- Using incremental sync to minimize API calls
- Caching message data locally
Missing Emails
Only emails from the last 30 days are synced. To change this, modify
LOOKBACK_DAYS in the configuration.Files Synced
| Location | Description |
|---|---|
~/rowboat/gmail_sync/{threadId}.md | Thread conversations |
~/rowboat/gmail_sync/attachments/ | Email attachments |
~/rowboat/gmail_sync/sync_state.json | Sync state tracking |
Privacy & Security
- Read-Only Access: Uses
gmail.readonlyscope - Local Storage: All data stored locally on your machine
- No Cloud Sync: Emails never sent to external servers
- OAuth Tokens: Securely managed by Google’s OAuth flow
Related Integrations
- Google Calendar - Sync calendar events
- MCP - Model Context Protocol servers