Skip to content

Email Outreach: Gmail API integration for send-on-confirm #3

@madhavcodez

Description

@madhavcodez

Feature

SecretAIRY generates personalized cold email drafts, but currently has no way to actually send them. The user must copy-paste into Gmail manually.

Desired Flow

  1. AI generates personalized email draft (already works ✅)
  2. User reviews and edits the draft in the dashboard
  3. User clicks "Send" → email is sent via Gmail API
  4. email_sent_at timestamp is recorded
  5. Follow-up call is scheduled 24h after email send

Implementation Plan

  • Google OAuth credentials already in .env (CLIENT_ID + CLIENT_SECRET)
  • Need OAuth2 consent flow for Gmail send scope
  • Store refresh token in DB
  • POST /campaigns/{id}/send-email calls Gmail API
  • Dashboard already has the "Send Email" button wired up

Current State

  • ✅ Email draft generation (Gemini, personalized with research data)
  • ✅ Dashboard edit + send button UI
  • ❌ Gmail API OAuth flow
  • ❌ Actual email sending
  • ❌ Open/click tracking

Labels

feature, email, outreach

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions