Use wide Gmail integration

With Ants & Apps platform you can connect Gmail with more than 30 available apps, 600+ functional formulas to boost your productivity

Reference

  • users.drafts

    • Get the specified draft

      This action gets the specified draft.

      GETGmailUsersDraftsGet

      Request parameters

      • id*string

        The ID of the draft to retrieve.

      • userId*string

        The user's email address. The special value me can be used to indicate the authenticated user.

      • formatstring

        The format to return the draft in.

    • List the drafts in the user's mailbox

      This action lists the drafts in the user's mailbox.

      GETGmailUsersDraftsList

      Request parameters

      • userId*string

        The user's email address. The special value me can be used to indicate the authenticated user.

      • includeSpamTrashboolean

        Include drafts from SPAM and TRASH in the results.

      • maxResultsinteger

        Maximum number of drafts to return.

      • pageTokenstring

        Page token to retrieve a specific page of results in the list.

      • qstring

        Only return draft messages matching the specified query. Supports the same query format as the Gmail search box. For example, "from:[email protected] rfc822msgid: is:unread".

    • Create a new draft with the DRAFT label

      This action creates a new draft with the DRAFT label.

      POSTGmailUsersDraftsCreate

      Request parameters

      • userId*string

        The user's email address. The special value me can be used to indicate the authenticated user.

      Request body

      • idstring

        The immutable ID of the draft.

      • messageobject

        The message content of the draft.

    • Send the specified, existing draft to the recipients in the To, Cc, and Bcc headers

      This action sends the specified, existing draft to the recipients in the To, Cc, and Bcc headers.

      POSTGmailUsersDraftsSend

      Request parameters

      • userId*string

        The user's email address. The special value me can be used to indicate the authenticated user.

      Request body

      • idstring

        The immutable ID of the draft.

      • messageobject

        The message content of the draft.

    • Replace a draft's content

      This action replaces a draft's content.

      PUTGmailUsersDraftsUpdate

      Request parameters

      • id*string

        The ID of the draft to update.

      • userId*string

        The user's email address. The special value me can be used to indicate the authenticated user.

      Request body

      • idstring

        The immutable ID of the draft.

      • messageobject

        The message content of the draft.

    • Immediately and permanently deletes the specified draft

      This action immediately and permanently deletes the specified draft. Does not simply trash it.

      DELETEGmailUsersDraftsDelete

      Request parameters

      • id*string

        The ID of the draft to delete.

      • userId*string

        The user's email address. The special value me can be used to indicate the authenticated user.

  • users

    • Get the current user's Gmail profile

      This action gets the current user's Gmail profile.

      GETGmailUsersGetProfile

      Request parameters

      • userId*string

        The user's email address. The special value me can be used to indicate the authenticated user.

    • Stop receiving push notifications for the given user mailbox

      This action stop receiving push notifications for the given user mailbox.

      POSTGmailUsersStop

      Request parameters

      • userId*string

        The user's email address. The special value me can be used to indicate the authenticated user.

    • Set up or update a push notification watch on the given user mailbox

      This action set up or update a push notification watch on the given user mailbox.

      POSTGmailUsersWatch

      Request parameters

      • userId*string

        The user's email address. The special value me can be used to indicate the authenticated user.

      Request body

      • labelFilterActionstring

        Filtering behavior of labelIds list specified.

      • labelIdsarray

        List of label_ids to restrict notifications about. By default, if unspecified, all changes are pushed out. If specified then dictates which labels are required for a push notification to be generated.

      • topicNamestring

        A fully qualified Google Cloud Pub/Sub API topic name to publish the events to. This topic name **must** already exist in Cloud Pub/Sub and you **must** have already granted gmail "publish" permission on it. For example, "projects/my-project-identifier/topics/my-topic-name" (using the Cloud Pub/Sub "v1" topic naming format). Note that the "my-project-identifier" portion must exactly match your Google developer project id (the one executing this watch request).

  • users.history

    • List the history of all changes to the given mailbox

      This action lists the history of all changes to the given mailbox. History results are returned in chronological order (increasing historyId).

      GETGmailUsersHistoryList

      Request parameters

      • userId*string

        The user's email address. The special value me can be used to indicate the authenticated user.

      • historyTypesstring

        History types to be returned by the function

      • labelIdstring

        Only return messages with a label matching the ID.

      • maxResultsinteger

        The maximum number of history records to return.

      • pageTokenstring

        Page token to retrieve a specific page of results in the list.

      • startHistoryIdstring

        Required. Returns history records after the specified startHistoryId. The supplied startHistoryId should be obtained from the historyId of a message, thread, or previous list response. History IDs increase chronologically but are not contiguous with random gaps in between valid IDs. Supplying an invalid or out of date startHistoryId typically returns an HTTP 404 error code. A historyId is typically valid for at least a week, but in some rare circumstances may be valid for only a few hours. If you receive an HTTP 404 error response, your application should perform a full sync. If you receive no nextPageToken in the response, there are no updates to retrieve and you can store the returned historyId for a future request.

  • users.labels

    • Get the specified label

      This action gets the specified label.

      GETGmailUsersLabelsGet

      Request parameters

      • id*string

        The ID of the label to retrieve.

      • userId*string

        The user's email address. The special value me can be used to indicate the authenticated user.

    • List all labels in the user's mailbox

      This action lists all labels in the user's mailbox.

      GETGmailUsersLabelsList

      Request parameters

      • userId*string

        The user's email address. The special value me can be used to indicate the authenticated user.

    • Create a new label

      This action creates a new label.

      POSTGmailUsersLabelsCreate

      Request parameters

      • userId*string

        The user's email address. The special value me can be used to indicate the authenticated user.

      Request body

      • colorobject

        The color to assign to the label. Color is only available for labels that have their type set to user.

      • idstring

        The immutable ID of the label.

      • labelListVisibilitystring

        The visibility of the label in the label list in the Gmail web interface.

      • messageListVisibilitystring

        The visibility of the label in the message list in the Gmail web interface.

      • messagesTotalinteger

        The total number of messages with the label.

      • messagesUnreadinteger

        The number of unread messages with the label.

      • namestring

        The display name of the label.

      • threadsTotalinteger

        The total number of threads with the label.

      • threadsUnreadinteger

        The number of unread threads with the label.

      • typestring

        The owner type for the label. User labels are created by the user and can be modified and deleted by the user and can be applied to any message or thread. System labels are internally created and cannot be added, modified, or deleted. System labels may be able to be applied to or removed from messages and threads under some circumstances but this is not guaranteed. For example, users can apply and remove the INBOX and UNREAD labels from messages and threads, but cannot apply or remove the DRAFTS or SENT labels from messages or threads.

    • Update the specified label

      This action updates the specified label.

      PUTGmailUsersLabelsUpdate

      Request parameters

      • id*string

        The ID of the label to update.

      • userId*string

        The user's email address. The special value me can be used to indicate the authenticated user.

      Request body

      • colorobject

        The color to assign to the label. Color is only available for labels that have their type set to user.

      • idstring

        The immutable ID of the label.

      • labelListVisibilitystring

        The visibility of the label in the label list in the Gmail web interface.

      • messageListVisibilitystring

        The visibility of the label in the message list in the Gmail web interface.

      • messagesTotalinteger

        The total number of messages with the label.

      • messagesUnreadinteger

        The number of unread messages with the label.

      • namestring

        The display name of the label.

      • threadsTotalinteger

        The total number of threads with the label.

      • threadsUnreadinteger

        The number of unread threads with the label.

      • typestring

        The owner type for the label. User labels are created by the user and can be modified and deleted by the user and can be applied to any message or thread. System labels are internally created and cannot be added, modified, or deleted. System labels may be able to be applied to or removed from messages and threads under some circumstances but this is not guaranteed. For example, users can apply and remove the INBOX and UNREAD labels from messages and threads, but cannot apply or remove the DRAFTS or SENT labels from messages or threads.

    • Update the specified label

      This action updates the specified label. This method supports patch semantics.

      PATCHGmailUsersLabelsPatch

      Request parameters

      • id*string

        The ID of the label to update.

      • userId*string

        The user's email address. The special value me can be used to indicate the authenticated user.

      Request body

      • colorobject

        The color to assign to the label. Color is only available for labels that have their type set to user.

      • idstring

        The immutable ID of the label.

      • labelListVisibilitystring

        The visibility of the label in the label list in the Gmail web interface.

      • messageListVisibilitystring

        The visibility of the label in the message list in the Gmail web interface.

      • messagesTotalinteger

        The total number of messages with the label.

      • messagesUnreadinteger

        The number of unread messages with the label.

      • namestring

        The display name of the label.

      • threadsTotalinteger

        The total number of threads with the label.

      • threadsUnreadinteger

        The number of unread threads with the label.

      • typestring

        The owner type for the label. User labels are created by the user and can be modified and deleted by the user and can be applied to any message or thread. System labels are internally created and cannot be added, modified, or deleted. System labels may be able to be applied to or removed from messages and threads under some circumstances but this is not guaranteed. For example, users can apply and remove the INBOX and UNREAD labels from messages and threads, but cannot apply or remove the DRAFTS or SENT labels from messages or threads.

    • Immediately and permanently deletes the specified label and removes it from any messages and threads that it is applied to

      This action immediately and permanently deletes the specified label and removes it from any messages and threads that it is applied to.

      DELETEGmailUsersLabelsDelete

      Request parameters

      • id*string

        The ID of the label to delete.

      • userId*string

        The user's email address. The special value me can be used to indicate the authenticated user.

  • users.messages

    • Get the specified message

      This action gets the specified message.

      GETGmailUsersMessagesGet

      Request parameters

      • id*string

        The ID of the message to retrieve.

      • userId*string

        The user's email address. The special value me can be used to indicate the authenticated user.

      • formatstring

        The format to return the message in.

      • metadataHeadersstring

        When given and format is METADATA, only include headers specified.

    • List the messages in the user's mailbox

      This action lists the messages in the user's mailbox.

      GETGmailUsersMessagesList

      Request parameters

      • userId*string

        The user's email address. The special value me can be used to indicate the authenticated user.

      • includeSpamTrashboolean

        Include messages from SPAM and TRASH in the results.

      • labelIdsstring

        Only return messages with labels that match all of the specified label IDs.

      • maxResultsinteger

        Maximum number of messages to return.

      • pageTokenstring

        Page token to retrieve a specific page of results in the list.

      • qstring

        Only return messages matching the specified query. Supports the same query format as the Gmail search box. For example, "from:[email protected] rfc822msgid: is:unread". Parameter cannot be used when accessing the api using the gmail.metadata scope.

    • Delete many messages by message ID

      This action deletes many messages by message ID. Provides no guarantees that messages were not already deleted or even existed at all.

      POSTGmailUsersMessagesBatchDelete

      Request parameters

      • userId*string

        The user's email address. The special value me can be used to indicate the authenticated user.

      Request body

      • idsarray

        The IDs of the messages to delete.

    • Modify the labels on the specified messages

      This action modifies the labels on the specified messages.

      POSTGmailUsersMessagesBatchModify

      Request parameters

      • userId*string

        The user's email address. The special value me can be used to indicate the authenticated user.

      Request body

      • addLabelIdsarray

        A list of label IDs to add to messages.

      • idsarray

        The IDs of the messages to modify. There is a limit of 1000 ids per request.

      • removeLabelIdsarray

        A list of label IDs to remove from messages.

    • Import a message into only this user's mailbox, with standard email delivery scanning and classification similar to receiving via SMTP

      This action imports a message into only this user's mailbox, with standard email delivery scanning and classification similar to receiving via SMTP. Does not send a message.

      POSTGmailUsersMessagesImport

      Request parameters

      • userId*string

        The user's email address. The special value me can be used to indicate the authenticated user.

      • deletedboolean

        Mark the email as permanently deleted (not TRASH) and only visible in Google Vault to a Vault administrator. Only used for G Suite accounts.

      • internalDateSourcestring

        Source for Gmail's internal date of the message.

      • neverMarkSpamboolean

        Ignore the Gmail spam classifier decision and never mark this email as SPAM in the mailbox.

      • processForCalendarboolean

        Process calendar invites in the email and add any extracted meetings to the Google Calendar for this user.

      Request body

      • raw*object

        The entire email message in an RFC 2822 formatted and base64url encoded string. Returned in messages.get and drafts.get responses when the format=RAW parameter is supplied.

      • historyIdstring

        The ID of the last history record that modified this message.

      • idstring

        The immutable ID of the message.

      • internalDatestring

        The internal message creation timestamp (epoch ms), which determines ordering in the inbox. For normal SMTP-received email, this represents the time the message was originally accepted by Google, which is more reliable than the Date header. However, for API-migrated mail, it can be configured by client to be based on the Date header.

      • labelIdsarray

        List of IDs of labels applied to this message.

      • payloadobject

        The parsed email structure in the message parts.

      • sizeEstimateinteger

        Estimated size in bytes of the message.

      • snippetstring

        A short part of the message text.

      • threadIdstring

        The ID of the thread the message belongs to. To add a message or draft to a thread, the following criteria must be met: - The requested threadId must be specified on the Message or Draft.Message you supply with your request. - The References and In-Reply-To headers must be set in compliance with the RFC 2822 standard. - The Subject headers must match.

      • createTimestring

        Output only. The time at which the message was created in Hangouts Chat server.

      • cardsarray

        Rich, formatted and interactive cards that can be used to display UI elements such as: formatted texts, buttons, clickable images. Cards are normally displayed below the plain-text body of the message.

      • senderobject

        The user who created the message.

      • threadobject

        The thread the message belongs to.

      • annotationsarray

        Output only. Annotations associated with the text in this message.

      • namestring

        Resource name, in the form "spaces/*/messages/*". Example: spaces/AAAAMpdlehY/messages/UMxbHmzDlr4.UMxbHmzDlr4

      • previewTextstring

        Text for generating preview chips. This text will not be displayed to the user, but any links to images, web pages, videos, etc. included here will generate preview chips.

      • spaceobject

        The space the message belongs to.

      • textstring

        Plain-text body of the message.

      • fallbackTextstring

        A plain-text description of the message's cards, used when the actual cards cannot be displayed (e.g. mobile notifications).

      • argumentTextstring

        Plain-text body of the message with all bot mentions stripped out.

      • actionResponseobject

        Input only. Parameters that a bot can use to configure how its response is posted.

    • Directly inserts a message into only this user's mailbox similar to IMAP APPEND, bypassing most scanning and classification

      This action directly inserts a message into only this user's mailbox similar to IMAP APPEND, bypassing most scanning and classification. Does not send a message.

      POSTGmailUsersMessagesInsert

      Request parameters

      • userId*string

        The user's email address. The special value me can be used to indicate the authenticated user.

      • deletedboolean

        Mark the email as permanently deleted (not TRASH) and only visible in Google Vault to a Vault administrator. Only used for G Suite accounts.

      • internalDateSourcestring

        Source for Gmail's internal date of the message.

      Request body

      • raw*object

        The entire email message in an RFC 2822 formatted and base64url encoded string. Returned in messages.get and drafts.get responses when the format=RAW parameter is supplied.

      • historyIdstring

        The ID of the last history record that modified this message.

      • idstring

        The immutable ID of the message.

      • internalDatestring

        The internal message creation timestamp (epoch ms), which determines ordering in the inbox. For normal SMTP-received email, this represents the time the message was originally accepted by Google, which is more reliable than the Date header. However, for API-migrated mail, it can be configured by client to be based on the Date header.

      • labelIdsarray

        List of IDs of labels applied to this message.

      • payloadobject

        The parsed email structure in the message parts.

      • sizeEstimateinteger

        Estimated size in bytes of the message.

      • snippetstring

        A short part of the message text.

      • threadIdstring

        The ID of the thread the message belongs to. To add a message or draft to a thread, the following criteria must be met: - The requested threadId must be specified on the Message or Draft.Message you supply with your request. - The References and In-Reply-To headers must be set in compliance with the RFC 2822 standard. - The Subject headers must match.

      • createTimestring

        Output only. The time at which the message was created in Hangouts Chat server.

      • cardsarray

        Rich, formatted and interactive cards that can be used to display UI elements such as: formatted texts, buttons, clickable images. Cards are normally displayed below the plain-text body of the message.

      • senderobject

        The user who created the message.

      • threadobject

        The thread the message belongs to.

      • annotationsarray

        Output only. Annotations associated with the text in this message.

      • namestring

        Resource name, in the form "spaces/*/messages/*". Example: spaces/AAAAMpdlehY/messages/UMxbHmzDlr4.UMxbHmzDlr4

      • previewTextstring

        Text for generating preview chips. This text will not be displayed to the user, but any links to images, web pages, videos, etc. included here will generate preview chips.

      • spaceobject

        The space the message belongs to.

      • textstring

        Plain-text body of the message.

      • fallbackTextstring

        A plain-text description of the message's cards, used when the actual cards cannot be displayed (e.g. mobile notifications).

      • argumentTextstring

        Plain-text body of the message with all bot mentions stripped out.

      • actionResponseobject

        Input only. Parameters that a bot can use to configure how its response is posted.

    • Modify the labels on the specified message

      This action modifies the labels on the specified message.

      POSTGmailUsersMessagesModify

      Request parameters

      • id*string

        The ID of the message to modify.

      • userId*string

        The user's email address. The special value me can be used to indicate the authenticated user.

      Request body

      • addLabelIdsarray

        A list of IDs of labels to add to this message.

      • removeLabelIdsarray

        A list IDs of labels to remove from this message.

    • Send the specified message to the recipients in the To, Cc, and Bcc headers

      This action sends the specified message to the recipients in the To, Cc, and Bcc headers.

      POSTGmailUsersMessagesSend

      Request parameters

      • userId*string

        The user's email address. The special value me can be used to indicate the authenticated user.

      Request body

      • raw*object

        The entire email message in an RFC 2822 formatted and base64url encoded string. Returned in messages.get and drafts.get responses when the format=RAW parameter is supplied.

      • historyIdstring

        The ID of the last history record that modified this message.

      • idstring

        The immutable ID of the message.

      • internalDatestring

        The internal message creation timestamp (epoch ms), which determines ordering in the inbox. For normal SMTP-received email, this represents the time the message was originally accepted by Google, which is more reliable than the Date header. However, for API-migrated mail, it can be configured by client to be based on the Date header.

      • labelIdsarray

        List of IDs of labels applied to this message.

      • payloadobject

        The parsed email structure in the message parts.

      • sizeEstimateinteger

        Estimated size in bytes of the message.

      • snippetstring

        A short part of the message text.

      • threadIdstring

        The ID of the thread the message belongs to. To add a message or draft to a thread, the following criteria must be met: - The requested threadId must be specified on the Message or Draft.Message you supply with your request. - The References and In-Reply-To headers must be set in compliance with the RFC 2822 standard. - The Subject headers must match.

      • createTimestring

        Output only. The time at which the message was created in Hangouts Chat server.

      • cardsarray

        Rich, formatted and interactive cards that can be used to display UI elements such as: formatted texts, buttons, clickable images. Cards are normally displayed below the plain-text body of the message.

      • senderobject

        The user who created the message.

      • threadobject

        The thread the message belongs to.

      • annotationsarray

        Output only. Annotations associated with the text in this message.

      • namestring

        Resource name, in the form "spaces/*/messages/*". Example: spaces/AAAAMpdlehY/messages/UMxbHmzDlr4.UMxbHmzDlr4

      • previewTextstring

        Text for generating preview chips. This text will not be displayed to the user, but any links to images, web pages, videos, etc. included here will generate preview chips.

      • spaceobject

        The space the message belongs to.

      • textstring

        Plain-text body of the message.

      • fallbackTextstring

        A plain-text description of the message's cards, used when the actual cards cannot be displayed (e.g. mobile notifications).

      • argumentTextstring

        Plain-text body of the message with all bot mentions stripped out.

      • actionResponseobject

        Input only. Parameters that a bot can use to configure how its response is posted.

    • Move the specified message to the trash

      This action moves the specified message to the trash.

      POSTGmailUsersMessagesTrash

      Request parameters

      • id*string

        The ID of the message to Trash.

      • userId*string

        The user's email address. The special value me can be used to indicate the authenticated user.

    • Remove the specified message from the trash

      This action removes the specified message from the trash.

      POSTGmailUsersMessagesUntrash

      Request parameters

      • id*string

        The ID of the message to remove from Trash.

      • userId*string

        The user's email address. The special value me can be used to indicate the authenticated user.

    • Immediately and permanently deletes the specified message

      This action immediately and permanently deletes the specified message. This operation cannot be undone. Prefer messages.trash instead.

      DELETEGmailUsersMessagesDelete

      Request parameters

      • id*string

        The ID of the message to delete.

      • userId*string

        The user's email address. The special value me can be used to indicate the authenticated user.

  • users.settings

    • Get the auto-forwarding setting for the specified account

      This action gets the auto-forwarding setting for the specified account.

      GETGmailUsersSettingsGetAutoForwarding

      Request parameters

      • userId*string

        User's email address. The special value "me" can be used to indicate the authenticated user.

    • Get IMAP settings

      This action gets IMAP settings.

      GETGmailUsersSettingsGetImap

      Request parameters

      • userId*string

        User's email address. The special value "me" can be used to indicate the authenticated user.

    • Get language settings

      This action gets language settings.

      GETGmailUsersSettingsGetLanguage

      Request parameters

      • userId*string

        User's email address. The special value "me" can be used to indicate the authenticated user.

    • Get POP settings

      This action gets POP settings.

      GETGmailUsersSettingsGetPop

      Request parameters

      • userId*string

        User's email address. The special value "me" can be used to indicate the authenticated user.

    • Get vacation responder settings

      This action gets vacation responder settings.

      GETGmailUsersSettingsGetVacation

      Request parameters

      • userId*string

        User's email address. The special value "me" can be used to indicate the authenticated user.

    • Update the auto-forwarding setting for the specified account

      This action updates the auto-forwarding setting for the specified account. A verified forwarding address must be specified when auto-forwarding is enabled. This method is only available to service account clients that have been delegated domain-wide authority.

      PUTGmailUsersSettingsUpdateAutoForwarding

      Request parameters

      • userId*string

        User's email address. The special value "me" can be used to indicate the authenticated user.

      Request body

      • dispositionstring

        The state that a message should be left in after it has been forwarded.

      • emailAddressstring

        Email address to which all incoming messages are forwarded. This email address must be a verified member of the forwarding addresses.

      • enabledboolean

        Whether all incoming mail is automatically forwarded to another address.

    • Update IMAP settings

      This action updates IMAP settings.

      PUTGmailUsersSettingsUpdateImap

      Request parameters

      • userId*string

        User's email address. The special value "me" can be used to indicate the authenticated user.

      Request body

      • autoExpungeboolean

        If this value is true, Gmail will immediately expunge a message when it is marked as deleted in IMAP. Otherwise, Gmail will wait for an update from the client before expunging messages marked as deleted.

      • enabledboolean

        Whether IMAP is enabled for the account.

      • expungeBehaviorstring

        The action that will be executed on a message when it is marked as deleted and expunged from the last visible IMAP folder.

      • maxFolderSizeinteger

        An optional limit on the number of messages that an IMAP folder may contain. Legal values are 0, 1000, 2000, 5000 or 10000. A value of zero is interpreted to mean that there is no limit.

    • Update language settings

      This action updates language settings. If successful, the return object contains the displayLanguage that was saved for the user, which may differ from the value passed into the request. This is because the requested displayLanguage may not be directly supported by Gmail but have a close variant that is, and so the variant may be chosen and saved instead.

      PUTGmailUsersSettingsUpdateLanguage

      Request parameters

      • userId*string

        User's email address. The special value "me" can be used to indicate the authenticated user.

      Request body

      • displayLanguagestring

        The language to display Gmail in, formatted as an RFC 3066 Language Tag (for example en-GB, fr or ja for British English, French, or Japanese respectively). The set of languages supported by Gmail evolves over time, so please refer to the "Language" dropdown in the Gmail settings for all available options, as described in the language settings help article. A table of sample values is also provided in the Managing Language Settings guide Not all Gmail clients can display the same set of languages. In the case that a user's display language is not available for use on a particular client, said client automatically chooses to display in the closest supported variant (or a reasonable default).

    • Update POP settings

      This action updates POP settings.

      PUTGmailUsersSettingsUpdatePop

      Request parameters

      • userId*string

        User's email address. The special value "me" can be used to indicate the authenticated user.

      Request body

      • accessWindowstring

        The range of messages which are accessible via POP.

      • dispositionstring

        The action that will be executed on a message after it has been fetched via POP.

    • Update vacation responder settings

      This action updates vacation responder settings.

      PUTGmailUsersSettingsUpdateVacation

      Request parameters

      • userId*string

        User's email address. The special value "me" can be used to indicate the authenticated user.

      Request body

      • enableAutoReplyboolean

        Flag that controls whether Gmail automatically replies to messages.

      • endTimestring

        An optional end time for sending auto-replies (epoch ms). When this is specified, Gmail will automatically reply only to messages that it receives before the end time. If both startTime and endTime are specified, startTime must precede endTime.

      • responseBodyHtmlstring

        Response body in HTML format. Gmail will sanitize the HTML before storing it.

      • responseBodyPlainTextstring

        Response body in plain text format.

      • responseSubjectstring

        Optional text to prepend to the subject line in vacation responses. In order to enable auto-replies, either the response subject or the response body must be nonempty.

      • restrictToContactsboolean

        Flag that determines whether responses are sent to recipients who are not in the user's list of contacts.

      • restrictToDomainboolean

        Flag that determines whether responses are sent to recipients who are outside of the user's domain. This feature is only available for G Suite users.

      • startTimestring

        An optional start time for sending auto-replies (epoch ms). When this is specified, Gmail will automatically reply only to messages that it receives after the start time. If both startTime and endTime are specified, startTime must precede endTime.

  • users.threads

    • Get the specified thread

      This action gets the specified thread.

      GETGmailUsersThreadsGet

      Request parameters

      • id*string

        The ID of the thread to retrieve.

      • userId*string

        The user's email address. The special value me can be used to indicate the authenticated user.

      • formatstring

        The format to return the messages in.

      • metadataHeadersstring

        When given and format is METADATA, only include headers specified.

    • List the threads in the user's mailbox

      This action lists the threads in the user's mailbox.

      GETGmailUsersThreadsList

      Request parameters

      • userId*string

        The user's email address. The special value me can be used to indicate the authenticated user.

      • includeSpamTrashboolean

        Include threads from SPAM and TRASH in the results.

      • labelIdsstring

        Only return threads with labels that match all of the specified label IDs.

      • maxResultsinteger

        Maximum number of threads to return.

      • pageTokenstring

        Page token to retrieve a specific page of results in the list.

      • qstring

        Only return threads matching the specified query. Supports the same query format as the Gmail search box. For example, "from:[email protected] rfc822msgid: is:unread". Parameter cannot be used when accessing the api using the gmail.metadata scope.

    • Modify the labels applied to the thread

      This action modifies the labels applied to the thread. This applies to all messages in the thread.

      POSTGmailUsersThreadsModify

      Request parameters

      • id*string

        The ID of the thread to modify.

      • userId*string

        The user's email address. The special value me can be used to indicate the authenticated user.

      Request body

      • addLabelIdsarray

        A list of IDs of labels to add to this thread.

      • removeLabelIdsarray

        A list of IDs of labels to remove from this thread.

    • Move the specified thread to the trash

      This action moves the specified thread to the trash.

      POSTGmailUsersThreadsTrash

      Request parameters

      • id*string

        The ID of the thread to Trash.

      • userId*string

        The user's email address. The special value me can be used to indicate the authenticated user.

    • Remove the specified thread from the trash

      This action removes the specified thread from the trash.

      POSTGmailUsersThreadsUntrash

      Request parameters

      • id*string

        The ID of the thread to remove from Trash.

      • userId*string

        The user's email address. The special value me can be used to indicate the authenticated user.

    • Immediately and permanently deletes the specified thread

      This action immediately and permanently deletes the specified thread. This operation cannot be undone. Prefer threads.trash instead.

      DELETEGmailUsersThreadsDelete

      Request parameters

      • id*string

        ID of the Thread to delete.

      • userId*string

        The user's email address. The special value me can be used to indicate the authenticated user.