Skip to content

feat(gmail): add listDrafts, getDraft, updateDraft, and deleteDraft operations #42

@AojdevStudio

Description

@AojdevStudio

Summary

Gmail draft management is incomplete. We have createDraft and sendDraft but no way to list, read, update, or delete drafts programmatically.

Problem

When creating multiple draft iterations (e.g., rewriting an email), there's no way to:

  • List existing drafts to find the right one
  • Delete old/superseded drafts
  • Update a draft in place instead of creating a new one
  • Read a draft's content for review

Proposed Operations

Operation Purpose Gmail API
listDrafts List all drafts (ID, subject, snippet) users.drafts.list
getDraft Get full draft content by ID users.drafts.get
updateDraft Update an existing draft's content users.drafts.update
deleteDraft Delete a draft by ID users.drafts.delete

Context

Hit this limitation while drafting an email reply — needed to delete superseded drafts after rewriting, but listDrafts returned "Operation not found". Had to tell the user to manually clean up drafts in Gmail.

Acceptance Criteria

  • listDrafts returns draft IDs, subjects, and snippets
  • getDraft returns full draft content (to, subject, body, cc, bcc)
  • updateDraft modifies an existing draft without creating a new one
  • deleteDraft removes a draft by ID
  • All four operations registered in the Gmail service spec

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions