add gmail

AI Community

Skill notes

Initial Questions

Ask the user: How do you want to use Gmail with FFT_nano? Option 1: Tool Mode - Agent can read and send emails when you ask it to - Triggered only from WhatsApp (e.g., "@Andy check my email" or "@Andy send an email to...")

1. Check Existing Gmail Setup

First, check if Gmail is already configured: If credentials.json exists, skip to "Verify Gmail Access" below.

3. GCP Project Setup

USER ACTION REQUIRED Tell the user: I need you to set up Google Cloud OAuth credentials. I'll walk you through it: 1. Open https://console.cloud.google.com in your browser 2. Create a new project (or select existing) - click the project dropdown at the top

4. OAuth Authorization

USER ACTION REQUIRED Tell the user: I'm going to run the Gmail authorization. A browser window will open asking you to sign in to Google and grant access. Important: If you see a warning that the app isn't verified, click "Advanced" then "Go to [app name] (unsafe)" - this is normal for personal OAuth apps. Run the authorization:

5. Verify Gmail Access

Check that credentials were saved: Test the connection by listing labels (quick sanity check): If everything works, proceed to implementation.

Fluxly profile Runtime and permissions are inferred by Fluxly static checks, not author declarations or runtime test results.
Domain
AI
Author-declared agents
No explicit declaration found; this is not inferred or tested compatibility
Static check
88 / 100 · heuristic scan, not runtime safety proof
Runtime evidence
Not run; no isolated runtime test evidence is currently recorded
Author / version / license
@0-CYBERDYNE-SYSTEMS-0 · no license declared
Token usage
Moderate
Setup complexity
Guided setup
External API key
Not required
Operating systems
macOS · Linux · Windows
Runtime requirements
Node.js
Detected file/system behavior
  • Read-only
  • Write / modify
  • Shell exec
  • Env read
Network behavior
Local-only
Install commands
None (reference only)

Heads up: Tool permissions are not declared; actual access depends on the runtime.

01
Step 1: Add Gmail MCP to Agent Runner

Read `container/agent-runner/src/index.ts` and find the `mcpServers` config in the `query()` call. Add `gmail` to the `mcpServers` object: Find the `allowedTools` array and add Gmail tools: The result should look like:

02
Step 2: Mount Gmail Credentials in Container

Read `src/container-runner.ts` and find the `buildVolumeMounts` function. Add this mount block (after the `.claude` mount is a good location):

03
Step 3: Update Group Memory

Append to `groups/CLAUDE.md` (the global memory file): Also append the same section to `groups/main/CLAUDE.md`.

04
Step 4: Rebuild and Restart

Run these commands: Wait for container build to complete, then: Wait for TypeScript compilation, then restart the service: Check that it started:

05
Step 5: Test Gmail Integration

Tell the user: Gmail integration is set up! Test it by sending this message in your WhatsApp main channel: `@Andy check my recent emails` Or: `@Andy list my Gmail labels`

06
Step 1: Complete Tool Mode First

Complete all Tool Mode steps above before continuing. Verify Gmail tools work by having the user test `@Andy check my recent emails`.

07
Step 2: Add Email Polling Configuration

Read `src/types.ts` and add this interface: Read `src/config.ts` and add this configuration (customize values based on user's earlier answers):

08
Step 3: Add Email State Tracking

Read `src/db.ts` and add these functions for tracking processed emails: Also find the `initDatabase()` function in `src/db.ts` and add a call to `initEmailTable()`.

09
Step 4: Create Email Channel Module

Create a new file `src/email-channel.ts` with this content:

10
Step 5: Add Email Polling to Main Loop

Read `src/index.ts` and add the email polling infrastructure. First, add these imports at the top: // In the connection === 'open' block, after startMessageLoop(): startEmailLoop(); async function runEmailAgent( contextKey: string,

Discussion

Powered by GitHub Discussions. Sign in with GitHub to comment, react, or subscribe.