Overview
The Gmail integration:- Syncs emails from whitelisted senders
- Automatically creates tasks from email subjects and bodies
- Links tasks to specific clients (optional)
- Supports priority flags for urgent emails
- Polls at configurable intervals (default: every 5 minutes)
Prerequisites
You need a Google Cloud Console project with Gmail API access to generate OAuth credentials.- User type: External
- App name: CodeFire
- Add your email as a test user
1234567890-abc123.apps.googleusercontent.com)GOCSPX-abc123xyz)Whitelist Rules
CodeFire only creates tasks from whitelisted senders. This prevents spam and irrelevant emails from cluttering your task board.Adding a Whitelist Rule
- Go to Settings → Gmail → Whitelist Rules
- Enter a pattern:
- Full email:
[email protected] - Domain wildcard:
@example.com(matches all senders from that domain)
- Full email:
- (Optional) Assign to a Client — tasks from this sender will be linked to the selected client
- (Optional) Mark as Priority — tasks will be created with high priority
- Click Add
Example Rules
| Pattern | Client | Priority | Effect |
|---|---|---|---|
@acme.com | Acme Corp | Yes | All emails from acme.com → high-priority tasks linked to Acme Corp |
[email protected] | Example Inc | No | Only support emails → tasks linked to Example Inc |
@contractor.io | None | No | All emails from contractor.io → general tasks (no client) |
Deleting Rules
Click the X icon next to any rule to remove it. Deleting a rule does not delete existing tasks.How Auto-Task Creation Works
- Poll Gmail — CodeFire checks for new emails at the configured interval
- Filter by whitelist — Only emails matching a whitelist rule are processed
- Extract task data — Subject becomes task title, body becomes description
- Create task — A new task is added to the “Todo” column in the global planner
- Store metadata — Task stores Gmail message ID, thread ID, sender, and timestamp
- Mark as synced — Email is tracked to avoid duplicate tasks
Task Fields from Email
- Title — Email subject
- Description — Plain-text email body (HTML is stripped)
- Client — Matched from whitelist rule (if configured)
- Priority — Set to 1 (high) if whitelist rule has priority flag
- Created At — Email received timestamp
- Labels — Automatically tagged with “email”
Skipped Emails
CodeFire ignores:- Calendar invites (detected by MIME type)
- Emails older than 7 days (configurable via database)
- Emails from non-whitelisted senders
- Emails already synced (tracked by message ID)
Managing Synced Tasks
Tasks created from Gmail are regular CodeFire tasks. You can:- Edit title, description, priority, labels
- Move between columns (Todo → In Progress → Done)
- Delete tasks (does not delete the original email)
- Link to other tasks or notes
Viewing Email Source
(Future feature) — Click a task to see the original email content, sender, and thread.Sync Settings
Sync Interval
Adjust how often CodeFire checks for new emails:- 1 minute (for high-frequency monitoring)
- 5 minutes (default, balanced)
- 30 minutes (low-frequency, reduces API quota usage)
Disable Sync
Toggle Enable Gmail sync off to pause polling. CodeFire will stop checking for new emails, but existing tasks remain.Troubleshooting
OAuth Flow Fails
Symptom: Browser shows “Access blocked” or “This app isn’t verified” Solution:- Go to Google Cloud Console → OAuth consent screen
- Add your email as a Test User
- Retry the OAuth flow
- Click Advanced → Go to CodeFire (unsafe) if prompted
No Tasks Created
Symptom: Gmail sync is enabled but no tasks appear Solution:- Check Settings → Gmail → Whitelist Rules — at least one rule must exist
- Verify incoming emails match a whitelist pattern
- Check Settings → Gmail → Connected Accounts — account should show “Active” (green dot)
- Check the last sync timestamp — if it’s stale, click Refresh
Duplicate Tasks
Symptom: Same email creates multiple tasks Solution:- This shouldn’t happen (CodeFire tracks message IDs to avoid duplicates)
- If it does, check for conflicting whitelist rules
- Report the issue on GitHub
API Quota Exceeded
Symptom: Sync stops working, logs show “quota exceeded” Solution:- Increase sync interval to reduce API calls (e.g., 30 minutes)
- Check Google Cloud Console → APIs & Services → Dashboard for quota limits
- Request a quota increase if needed (for production use)
Security & Privacy
CodeFire stores OAuth tokens securely in macOS Keychain. The tokens grant read-only access to your Gmail. CodeFire cannot:- Send emails on your behalf (unless you explicitly use the reply feature)
- Delete emails
- Modify Gmail settings
- Access other Google services
~/Library/Application Support/CodeFire/codefire.db. Nothing is sent to external servers.
Next Steps
CLI Integration
Connect your AI coding CLI
Workflows
Common workflows and best practices
