Gmail Integration
Gmail API Operations
Browse all 79 operations available for Gmail workflow automation.
Drafts
6 operations/gmail/v1/users/{userId}/draftsCreate a new draft
Create a draft email for later review
/gmail/v1/users/{userId}/drafts/{id}Delete a draft permanently
Permanently delete a draft email
/gmail/v1/users/{userId}/drafts/{id}Get a specific draft
Get a specific draft email
/gmail/v1/users/{userId}/draftsList all drafts
List draft emails in the mailbox
/gmail/v1/users/{userId}/drafts/{id}Replace a draft's content
Replace a draft email's content
/gmail/v1/users/{userId}/drafts/sendSend an existing draft
Send an existing draft email
History
1 operation/gmail/v1/users/{userId}/historyList mailbox change history
List mailbox change history since a given ID
Labels
6 operations/gmail/v1/users/{userId}/labelsCreate a new label
Create a new Gmail label
/gmail/v1/users/{userId}/labels/{id}Delete a label permanently
Permanently delete a label
/gmail/v1/users/{userId}/labels/{id}Get a specific label
Get details of a specific label
/gmail/v1/users/{userId}/labelsList all labels
List all labels in the mailbox
/gmail/v1/users/{userId}/labels/{id}Partially update a label
Partially update a label
/gmail/v1/users/{userId}/labels/{id}Update a label
Update a label's name or settings
Messages
11 operations/gmail/v1/users/{userId}/messages/batchDeleteBatch delete messages permanently
Delete multiple messages by ID
/gmail/v1/users/{userId}/messages/batchModifyBatch modify message labels
Modify labels on multiple messages at once
/gmail/v1/users/{userId}/messages/{id}Delete a message permanently
Permanently delete a message
/gmail/v1/users/{userId}/messages/{id}Get a specific message
Get the full content of an email message
/gmail/v1/users/{userId}/messages/importImport a message with standard delivery scanning
Import a message with standard delivery scanning
/gmail/v1/users/{userId}/messagesInsert a message directly into the mailbox
Insert a message directly into the mailbox
/gmail/v1/users/{userId}/messagesList messages in the mailbox
Search and list emails in the mailbox
/gmail/v1/users/{userId}/messages/{id}/modifyModify labels on a message
Add or remove labels from an email
/gmail/v1/users/{userId}/messages/{id}/trashMove a message to trash
Move a message to the trash
/gmail/v1/users/{userId}/messages/{id}/untrashRestore a message from trash
Remove a message from the trash
/gmail/v1/users/{userId}/messages/sendSend an email message
Send an email message
Messages.Attachments
1 operation/gmail/v1/users/{userId}/messages/{messageId}/attachments/{id}Get a message attachment
Download a message attachment
Settings
10 operations/gmail/v1/users/{userId}/settings/imapGet IMAP settings
Retrieves the IMAP access configuration for the account, including whether IMAP is enabled and any folder size limits. Use this to verify that IMAP access is properly configured for third-party email clients.
/gmail/v1/users/{userId}/settings/popGet POP settings
Retrieves the POP3 access configuration for the account. Use this to check whether POP access is enabled and how messages are handled after being downloaded by a POP client.
/gmail/v1/users/{userId}/settings/autoForwardingGet auto-forwarding settings
Retrieves the auto-forwarding configuration for the account, including the forwarding email address and the disposition of forwarded messages. Use this to audit or verify that email forwarding rules are correctly configured.
/gmail/v1/users/{userId}/settings/languageGet language settings
Retrieves the display language preference for the Gmail interface. Use this to determine the user's preferred language for localization or to audit account settings.
/gmail/v1/users/{userId}/settings/vacationGet vacation responder settings
Retrieves the vacation auto-reply configuration, including the response message, date range, and whether it applies to all contacts or only those in the user's contact list. Use this to check if an out-of-office reply is currently active.
/gmail/v1/users/{userId}/settings/imapUpdate IMAP settings
Configures IMAP access settings for the account, including enabling or disabling IMAP and setting folder size limits. Use this to control how the mailbox is accessed by third-party email clients via IMAP.
/gmail/v1/users/{userId}/settings/popUpdate POP settings
Configures POP3 access settings for the account, including enabling or disabling POP and controlling message disposition after download. Use this to manage how legacy email clients retrieve messages from the mailbox.
/gmail/v1/users/{userId}/settings/autoForwardingUpdate auto-forwarding settings
Configures automatic email forwarding to a verified address. A verified forwarding address must already exist before enabling auto-forwarding. This method is only available to service account clients with domain-wide authority.
/gmail/v1/users/{userId}/settings/languageUpdate language settings
Sets the display language for the Gmail interface. The saved language may differ from the requested value if the input language tag is not directly supported, in which case Gmail selects the closest available match.
/gmail/v1/users/{userId}/settings/vacationUpdate vacation responder settings
Configures the vacation auto-reply, including enabling or disabling it, setting the response message, and defining the active date range. Use this to automatically notify senders when the user is unavailable.
Settings.Cse.Identities
5 operations/gmail/v1/users/{userId}/settings/cse/identitiesCreate a client-side encryption identity
Creates and configures a client-side encryption identity authorized to send encrypted mail from the user's account. Google publishes the S/MIME certificate to a shared directory so that recipients within the organization can encrypt messages to this identity.
/gmail/v1/users/{userId}/settings/cse/identities/{cseEmailAddress}Delete a client-side encryption identity
Permanently deletes a client-side encryption identity. The user can no longer send encrypted messages from this identity, and it cannot be restored. To re-enable encryption, a new identity must be created.
/gmail/v1/users/{userId}/settings/cse/identities/{cseEmailAddress}Get a client-side encryption identity
Retrieves the configuration of a specific client-side encryption identity, including its associated key pair and email address. Use this to verify encryption settings or troubleshoot encrypted email delivery issues.
/gmail/v1/users/{userId}/settings/cse/identitiesList client-side encryption identities
Retrieves all client-side encrypted identities configured for the authenticated user. These identities determine which email addresses can send and receive encrypted messages using S/MIME certificates managed by the organization.
/gmail/v1/users/{userId}/settings/cse/identities/{emailAddress}Update a client-side encryption identity's key pair
Associates a different key pair with an existing client-side encryption identity. Use this to rotate encryption keys or replace an expiring certificate while keeping the same identity configuration intact.
Settings.Cse.Keypairs
6 operations/gmail/v1/users/{userId}/settings/cse/keypairsCreate a client-side encryption key pair
Uploads an S/MIME public key certificate chain and private key metadata for client-side encryption. Use this to provision new encryption keys for users who need to send and receive encrypted email within the organization.
/gmail/v1/users/{userId}/settings/cse/keypairs/{keyPairId}:disableDisable a client-side encryption key pair
Turns off a client-side encryption key pair so it can no longer be used to decrypt incoming messages or sign outgoing mail. The key pair can be re-enabled later. Use this to temporarily suspend encryption without permanently deleting the key.
/gmail/v1/users/{userId}/settings/cse/keypairs/{keyPairId}:enableEnable a client-side encryption key pair
Re-enables a previously disabled client-side encryption key pair. The key pair becomes active again for all associated encryption identities. Use this to restore encrypted email capability after a temporary suspension.
/gmail/v1/users/{userId}/settings/cse/keypairs/{keyPairId}Get a client-side encryption key pair
Retrieves the details of a specific client-side encryption key pair, including its certificate chain and status. Use this to inspect key configuration or verify that a key pair is active and properly configured.
/gmail/v1/users/{userId}/settings/cse/keypairsList client-side encryption key pairs
Retrieves all client-side encryption key pairs for the authenticated user. Use this to audit available encryption keys, check their status, or identify key pairs that need rotation or renewal.
/gmail/v1/users/{userId}/settings/cse/keypairs/{keyPairId}:obliteratePermanently destroy a client-side encryption key pair
Permanently and irreversibly deletes a client-side encryption key pair. Only key pairs that have been disabled for more than 30 days can be obliterated. Any emails encrypted with this key pair will become permanently unreadable.
Settings.Delegates
4 operations/gmail/v1/users/{userId}/settings/delegatesAdd a mail delegate
Adds a delegate with their verification status set directly to accepted, without sending a verification email. The delegate must be a member of the same Google Workspace organization. This method is only available to service account clients with domain-wide authority.
/gmail/v1/users/{userId}/settings/delegates/{delegateEmail}Get a specific mail delegate
Retrieves the configuration and verification status of a specific delegate. The delegate must be referenced by their primary email address, not an alias. This method is only available to service account clients with domain-wide authority.
/gmail/v1/users/{userId}/settings/delegatesList mail delegates
Retrieves all delegates configured for the account. Delegates are users who have been granted access to read, send, and delete messages on behalf of the account owner. This method is only available to service account clients with domain-wide authority.
/gmail/v1/users/{userId}/settings/delegates/{delegateEmail}Remove a mail delegate
Removes a delegate and revokes their access to the account, regardless of their verification status. The delegate must be referenced by their primary email address. This method is only available to service account clients with domain-wide authority.
Settings.Filters
4 operations/gmail/v1/users/{userId}/settings/filtersCreate an email filter
Creates a new message filter that automatically processes incoming emails matching specified criteria. Filters can apply labels, archive, star, forward, or delete matching messages. Note: a maximum of 1,000 filters is allowed per account.
/gmail/v1/users/{userId}/settings/filters/{id}Delete an email filter
Immediately and permanently deletes a message filter. Incoming messages will no longer be automatically processed by this filter's rules. This action cannot be undone.
/gmail/v1/users/{userId}/settings/filters/{id}Get a specific email filter
Retrieves the criteria and actions of a specific message filter. Use this to audit existing filter rules or verify that automated email sorting is configured correctly.
/gmail/v1/users/{userId}/settings/filtersList email filters
Retrieves all message filters configured for the user's account. Filters automatically apply actions like labeling, archiving, or forwarding to incoming messages that match specified criteria.
Settings.Forwardingaddresses
4 operations/gmail/v1/users/{userId}/settings/forwardingAddressesCreate a forwarding address
Registers a new forwarding address for the account. If ownership verification is required, a confirmation email will be sent and the address status will be set to pending until verified. Use this to set up email forwarding to external addresses.
/gmail/v1/users/{userId}/settings/forwardingAddresses/{forwardingEmail}Delete a forwarding address
Deletes a forwarding address and revokes any pending verification. This method is only available to service account clients with domain-wide authority. Auto-forwarding using this address will stop after deletion.
/gmail/v1/users/{userId}/settings/forwardingAddresses/{forwardingEmail}Get a specific forwarding address
Retrieves the details and verification status of a specific forwarding address. Use this to check whether a forwarding address has been verified and is ready to receive forwarded mail.
/gmail/v1/users/{userId}/settings/forwardingAddressesList forwarding addresses
Retrieves all forwarding addresses configured for the account, along with their verification status. Forwarding addresses must be verified before they can be used for auto-forwarding.
Settings.Sendas
7 operations/gmail/v1/users/{userId}/settings/sendAsCreate a send-as alias
Creates a custom 'from' send-as alias, allowing the user to send email that appears to come from a different address. If an SMTP server is specified, Gmail will validate the connection before creating the alias. Ownership verification may be required.
/gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}Delete a send-as alias
Deletes a send-as alias and revokes any verification that was required for using it. The user will no longer be able to send email from this address. This method is only available to service account clients with domain-wide authority.
/gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}Get a specific send-as alias
Retrieves the configuration of a specific send-as alias, including its display name, reply-to address, and verification status. Returns an HTTP 404 error if the specified address is not configured as an alias.
/gmail/v1/users/{userId}/settings/sendAsList send-as aliases
Retrieves all send-as aliases for the account, including the primary address and any custom 'from' aliases. Use this to discover which email addresses the user can send mail from.
/gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}Partially update a send-as alias
Updates specific properties of a send-as alias without replacing all fields. Use this to make targeted changes like updating the signature or reply-to address while leaving other settings unchanged.
/gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/verifySend verification for a send-as alias
Sends a verification email to a send-as alias address that is in pending verification status. The recipient must click the verification link to activate the alias. This method is only available to service account clients with domain-wide authority.
/gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}Update a send-as alias
Updates the configuration of a send-as alias, including its display name, signature, and reply-to address. HTML signatures will be sanitized before saving. Non-primary aliases can only be updated by service account clients with domain-wide authority.
Settings.Sendas.Smimeinfo
5 operations/gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}Delete an S/MIME configuration
Deletes a specific S/MIME certificate configuration from a send-as alias. The user will no longer be able to use this certificate for signing or encrypting email from the associated address.
/gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}Get a specific S/MIME configuration
Retrieves the details of a specific S/MIME certificate configuration for a send-as alias, including its expiration date and issuer information. Use this to verify certificate validity or troubleshoot email encryption issues.
/gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfoList S/MIME configurations for a send-as alias
Retrieves all S/MIME certificate configurations for a specific send-as alias. Use this to audit which encryption certificates are available for signing and encrypting outgoing email from a particular address.
/gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}/setDefaultSet the default S/MIME configuration
Sets a specific S/MIME certificate as the default for a send-as alias. The default certificate is used automatically for signing outgoing email when multiple S/MIME configurations are available.
/gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfoUpload an S/MIME configuration
Uploads an S/MIME certificate and key in PKCS12 format for a send-as alias. Once configured, the user can send digitally signed and encrypted email from the associated address.
Threads
6 operations/gmail/v1/users/{userId}/threads/{id}Delete an email thread permanently
Permanently delete an email thread
/gmail/v1/users/{userId}/threads/{id}Get a specific email thread
Get all messages in an email conversation
/gmail/v1/users/{userId}/threadsList email threads
List email threads in the mailbox
/gmail/v1/users/{userId}/threads/{id}/modifyModify labels on an email thread
Modify labels on all messages in a thread
/gmail/v1/users/{userId}/threads/{id}/trashMove an email thread to trash
Move a thread and its messages to trash
/gmail/v1/users/{userId}/threads/{id}/untrashRestore an email thread from trash
Remove a thread from the trash
Users
3 operations/gmail/v1/users/{userId}/profileGet the user's Gmail profile
Get the current user's Gmail profile
/gmail/v1/users/{userId}/watchSet up push notifications for the mailbox
Set up push notifications for mailbox changes
/gmail/v1/users/{userId}/stopStop push notifications for the mailbox
Stop push notifications for the mailbox