Capability Sources

Create a Gmail draft or threaded reply with optional workspace attachments

Changed on

Creates a plain-text Gmail draft in the calling member own mailbox. Optional attachments are workspace paths, up to 10 files totaling at most 4 MiB, fulfilled outside model context by a supporting OpenWork host on direct execute_capability calls. Code Mode and other MCP hosts cannot fulfill attachments and create no draft. Set threadId for replies and forwards. Always share the returned draftUrl.

post/v1/capabilities/google-workspace/gmail-drafts

Request

  • Base URL: https://api.openworklabs.com
  • URL: https://api.openworklabs.com/v1/capabilities/google-workspace/gmail-drafts
  • Auth: one of:
    • API key in header x-api-key
    • HTTP bearer

Request body

tostring required

Recipient email address.

ccstring

Optional comma-separated Cc email addresses.

bccstring

Optional comma-separated Bcc email addresses.

subjectstring required

Draft subject line. For replies or forwards, include threadId; subjects starting with Re: or Fwd: are rejected without threadId so the draft stays on the existing conversation.

bodystring required

Plain-text draft body. Write plain prose with no markdown syntax, separate paragraphs with blank lines, and do not hard-wrap prose. For threaded drafts, the server appends the quoted conversation automatically; do not include quoted history.

threadIdstring

Gmail thread id to reply on. Required for replies and forwards; get it from the gmail-messages capability. When set, the draft is attached to that thread as a reply — keep the thread's subject (e.g. 'Re: …').

attachmentsstring[]

Optional workspace file paths, 1 to 10 files totaling at most 4 MiB. File bytes stay outside model context. Requires a direct execute_capability call from a supporting OpenWork host; Code Mode and other MCP hosts are unsupported and create no draft. Do not retry without attachments.

Response

Draft created.

oktrue required
draftIdstring required
messageIdstring nullable required
draftUrlstring nullable required

Gmail URL for the ready-to-send draft. Always share draftUrl with the user so they can open the draft in Gmail for review and send.

threadUrlstring nullable required

Gmail URL for the conversation thread returned by Gmail for this draft.

tostring required
subjectstring required
threadIdstring nullable required
quotedHistoryIncludedboolean required

True when quoted conversation history was included by the server or already present in the request body.

Changes

    • info

      added the optional property //// to the response with the status

    • info

      the endpoint scheme security bearerAuth was added to the API

    • info

      the endpoint scheme security denApiKey was added to the API