Gmail
Datatype | Description | Example |
---|---|---|
Datepicker | String which includes date and time | |
Map | String which includes latitude and longitude coma separated | |
List | Simple array | |
Select | String with predefined values | |
Array | Array of objects |
Gets the current user’s Gmail profile.
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
String | The email of the user. The special value me can be used to indicate the authenticated user. |
Stop receiving push notifications for the given user mailbox.
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
String | The email of the user. 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.
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
topicName | String | 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). |
String | The email of the user. The special value me can be used to indicate the authenticated user. | |
labelFilterAction | Select | Filtering behavior of labelIds list specified. |
labelIds | List | 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. |
Creates a new draft
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
message | String | The entire draft message in an RFC 2822 formatted. |
String | The email of the user. The special value me can be used to indicate the authenticated user. |
Example:
To: <someone@gmail.com>
Subject: Failure Notice
Hi. This is the mail transport agent at mail.elsewhere.com.
Creates a new simple draft
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
toEmail | String | Email recipient |
subject | String | Email subject |
message | String | Email message |
String | The email of the user. The special value me can be used to indicate the authenticated user. |
Get single draft
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
draftId | String | Id of the draft |
String | The email of the user. The special value me can be used to indicate the authenticated user. | |
format | Select | The format to return the message in. |
Get all drafts
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
String | The email of the user. The special value me can be used to indicate the authenticated user. |
Update existing draft
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
draftId | String | Id of the draft |
message | String | The entire draft message in an RFC 2822 formatted . |
String | The email of the user. The special value me can be used to indicate the authenticated user. |
Send existing draft
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
draftId | String | Id of the draft |
String | The email of the user. The special value me can be used to indicate the authenticated user. |
Delete single draft
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
draftId | String | Id of the draft |
String | The email of the user. The special value me can be used to indicate the authenticated user. |
Creates a new label
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
labelName | String | The display name of the label. |
labelListVisibility | Select | The visibility of the label in the label list in the Gmail web interface. |
messageListVisibility | Select | The visibility of messages with this label in the message list in the Gmail web interface. |
String | The email of the user. The special value me can be used to indicate the authenticated user. |
Get all labels
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
String | The email of the user. The special value me can be used to indicate the authenticated user. |
Get single label
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
labelId | String | Id of the label |
String | The email of the user. The special value me can be used to indicate the authenticated user. |
Update single label
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
labelId | String | Id of the label |
String | The email of the user. The special value me can be used to indicate the authenticated user. | |
labelName | String | The display name of the label. |
labelListVisibility | Select | The visibility of the label in the label list in the Gmail web interface. |
messageListVisibility | Select | The visibility of messages with this label in the message list in the Gmail web interface. |
Delete single label
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
labelId | String | Id of the label |
String | The email of the user. The special value me can be used to indicate the authenticated user. |
Lists the messages in the user’s mailbox
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
labelIds | List | Only return messages with labels that match all of the specified label IDs. |
String | The email of the user. The special value me can be used to indicate the authenticated user. | |
includeSpamTrash | String | Include messages from SPAM and TRASH in the results |
maxResults | Number | Maximum number of messages to return. |
pageToken | String | Page token to retrieve a specific page of results in the list. |
q | String | Only return messages matching the specified query. Supports the same query format as the Gmail search box. For example, "from:someuser@example.com rfc822msgid: is:unread". |
Directly inserts a message into only this user’s mailbox similar to IMAP APPEND, bypassing most scanning and classification. Does not send a message.
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
raw | String | The entire draft message in an RFC 2822 formatted. |
String | The email of the user. The special value me can be used to indicate the authenticated user. | |
internalDateSource | Select | Source for Gmail’s internal date of the message. |
deleted | Boolean | Mark the email as permanently deleted (not TRASH) and only visible in Google Vault to a Vault administrator. Only used for G Suite accounts. |
labelIds | List | Only return messages with labels that match all of the specified label IDs. |
threadId | String | Message thread id |
Example:
To: <someone@gmail.com>
Subject: Failure Notice
Hi. This is the mail transport agent at mail.elsewhere.com.
Get single message
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
messageId | String | Id of the message |
String | The email of the user. The special value me can be used to indicate the authenticated user. | |
metadataHeaders | String | When given and format is METADATA, only include headers specified. |
format | Select | The format to return the message in. |
Delete single message
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
messageId | String | Id of the message |
String | The email of the user. The special value me can be used to indicate the authenticated user. |
Update labels on single message
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
messageId | String | Id of the message |
String | The email of the user. The special value me can be used to indicate the authenticated user. | |
addLabelIds | List | Labels to add |
removeLabelIds | List | Labels to remove |
Sends the specified message to the recipients in the To, Cc, and Bcc headers.
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
message | String | The entire draft message in an RFC 2822 formatted. |
String | The email of the user. The special value me can be used to indicate the authenticated user. | |
threadId | String | Message thread id |
Example:
To: <someone@gmail.com>
Subject: Failure Notice
Hi. This is the mail transport agent at mail.elsewhere.com.
Sends simple message
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
toEmail | String | Email recipient |
subject | String | Email subject |
message | String | Email message |
String | The email of the user. The special value me can be used to indicate the authenticated user. | |
threadId | String | Message thread id |
Move single message to trash
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
messageId | String | Id of the message |
String | The email of the user. The special value me can be used to indicate the authenticated user. |
Remove single message from trash
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
messageId | String | Id of the message |
String | The email of the user. The special value me can be used to indicate the authenticated user. |
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.
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
raw | String | The entire draft message in an RFC 2822 formatted. |
String | The email of the user. The special value me can be used to indicate the authenticated user. | |
deleted | Boolean | Mark the email as permanently deleted (not TRASH) and only visible in Google Vault to a Vault administrator. Only used for G Suite accounts. |
neverMarkSpam | Boolean | Ignore the Gmail spam classifier decision and never mark this email as SPAM in the mailbox. |
processForCalendar | Boolean | Process calendar invites in the email and add any extracted meetings to the Google Calendar for this user. |
internalDateSource | Select | Source for Gmail’s internal date of the message. |
Example:
To: <someone@gmail.com>
Subject: Failure Notice
Hi. This is the mail transport agent at mail.elsewhere.com.
Delete several messages
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
ids | List | Ids of the message |
String | The email of the user. The special value me can be used to indicate the authenticated user. |
Modifies the labels on the specified messages.
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
ids | List | Ids of the message |
String | The email of the user. The special value me can be used to indicate the authenticated user. | |
addLabelIds | List | Labels to add |
removeLabelIds | List | Labels to remove |
Get single message attachment
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
messageId | String | Id of the message |
attachmentId | String | Id of the attachment |
String | The email of the user. The special value me can be used to indicate the authenticated user. |
Get single thread
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
threadId | String | Id of the thread |
String | The email of the user. The special value me can be used to indicate the authenticated user. | |
metadataHeaders | String | When given and format is METADATA, only include headers specified. |
format | Select | When given and format is METADATA, only include headers specified. |
Lists the threads in the user’s mailbox
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
labelIds | List | Only return threads with labels that match all of the specified label IDs. |
String | The email of the user. The special value me can be used to indicate the authenticated user. | |
includeSpamTrash | String | Include threads from SPAM and TRASH in the results |
maxResults | Number | Maximum number of messages to return. |
pageToken | String | Page token to retrieve a specific page of results in the list. |
q | String | Only return messages matching the specified query. Supports the same query format as the Gmail search box. For example, "from:someuser@example.com rfc822msgid: is:unread". |
Update labels on single thread
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
threadId | String | Id of the thread |
String | The email of the user. The special value me can be used to indicate the authenticated user. | |
addLabelIds | List | Labels to add |
removeLabelIds | List | Labels to remove |
Delete single thread
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
threadId | String | Id of the thread |
String | The email of the user. The special value me can be used to indicate the authenticated user. |
Move single thread to trash
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
threadId | String | Id of the thread |
String | The email of the user. The special value me can be used to indicate the authenticated user. |
Remove single thread from trash
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
threadId | String | Id of the thread |
String | The email of the user. The special value me can be used to indicate the authenticated user. |
Gets the auto-forwarding setting for the specified account.
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
String | The email of the user. The special value me can be used to indicate the authenticated user. |
Gets IMAP settings.
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
String | The email of the user. The special value me can be used to indicate the authenticated user. |
Gets POP settings.
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
String | The email of the user. The special value me can be used to indicate the authenticated user. |
Updates the auto-forwarding setting for the specified account. A verified forwarding address must be specified when auto-forwarding is enabled.
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
String | The email of the user. The special value me can be used to indicate the authenticated user. | |
enabled | Boolean | Whether all incoming mail is automatically forwarded to another address. |
emailAddress | Boolean | Email address to which all incoming messages are forwarded. This email address must be a verified member of the forwarding addresses. |
disposition | Select | The state that a message should be left in after it has been forwarded. |
Updates IMAP settings.
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
String | The email of the user. The special value me can be used to indicate the authenticated user. | |
enabled | Boolean | Whether IMAP is enabled for the account. |
maxFolderSize | Number | 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. |
expungeBehavior | Select | The action that will be executed on a message when it is marked as deleted and expunged from the last visible IMAP folder. |
autoExpunge | Boolean | 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. |
Updates POP settings.
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
String | The email of the user. The special value me can be used to indicate the authenticated user. | |
emailAddress | Boolean | Email address to which all incoming messages are forwarded. This email address must be a verified member of the forwarding addresses. |
disposition | Select | The action that will be executed on a message after it has been fetched via POP. |
accessWindow | Select | The range of messages which are accessible via POP. |
Gets vacation responder settings.
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
String | The email of the user. The special value me can be used to indicate the authenticated user. |
Updates vacation responder settings.
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
String | The email of the user. The special value me can be used to indicate the authenticated user. | |
enableAutoReply | Boolean | Flag that controls whether Gmail automatically replies to messages. |
responseSubject | String | 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. |
responseBodyPlainText | String | Response body in plain text format. |
responseBodyHtml | String | Response body in HTML format. Gmail will sanitize the HTML before storing it. |
restrictToContacts | Boolean | Flag that determines whether responses are sent to recipients who are not in the user’s list of contacts. |
restrictToDomain | Boolean | 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. |
startTime | DatePicker | An optional start time for sending auto-replies (Y-m-d HⓂ️s). 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. |
endTime | DatePicker | An optional end time for sending auto-replies (Y-m-d HⓂ️s). 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. |
Lists the forwarding addresses for the specified account.
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
String | The email of the user. The special value me can be used to indicate the authenticated user. |
Get single forwarding address for the specified account.
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
forwardingEmail | String | The forwarding address to be retrieved. |
String | The email of the user. The special value me can be used to indicate the authenticated user. |
Creates a forwarding address.
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
String | The email of the user. The special value me can be used to indicate the authenticated user. | |
forwardingEmail | String | The forwarding address to be set. |
Gets the specified forwarding address.
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
String | The email of the user. The special value me can be used to indicate the authenticated user. | |
forwardingEmail | String | The forwarding address to be retrieved. |
Deletes the specified forwarding address.
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
String | The email of the user. The special value me can be used to indicate the authenticated user. | |
forwardingEmail | String | The forwarding address to be deleted. |
Creates a filter
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
String | The email of the user. The special value me can be used to indicate the authenticated user. | |
addLabelIds | List | Labels to add |
removeLabelIds | List | Labels to remove |
forward | String | Email address that the message should be forwarded to. |
excludeChats | Boolean | Whether the response should exclude chats. |
from | String | The sender’s display name or email address. |
hasAttachment | Boolean | Whether the message has any attachment. |
negatedQuery | JSON | Only return messages not matching the specified query. Supports the same query format as the Gmail search box. For example, "from:someuser@example.com rfc822msgid: is:unread". |
query | JSON | Only return messages matching the specified query. Supports the same query format as the Gmail search box. For example, "from:someuser@example.com rfc822msgid: is:unread". |
size | Number | The size of the entire RFC822 message in bytes, including all headers and attachments. |
sizeComparison | Select | How the message size in bytes should be in relation to the size field. |
subject | String | Case-insensitive phrase found in the message’s subject. Trailing and leading whitespace are be trimmed and adjacent spaces are collapsed. |
to | String | The recipient’s display name or email address. Includes recipients in the “to”, “cc”, and “bcc” header fields. You can use simply the local part of the email address. For example, “example” and “example@” both match "example@gmail.com". This field is case-insensitive. |
Get all filters
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
String | The email of the user. The special value me can be used to indicate the authenticated user. |
Get single filter
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
filterId | String | Id of the filter |
String | The email of the user. The special value me can be used to indicate the authenticated user. |
Delete single filter
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
filterId | String | Id of the filter |
String | The email of the user. The special value me can be used to indicate the authenticated user. |
Creates a custom “from” send-as alias.
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
String | The email of the user. The special value me can be used to indicate the authenticated user. | |
sendAsEmail | String | An optional email address that is included in a “Reply-To:” header for mail sent using this alias. If this is empty, Gmail will not generate a “Reply-To:” header. |
displayName | String | A name that appears in the “From:” header for mail sent using this alias. For custom “from” addresses, when this is empty, Gmail will populate the “From:” header with the name that is used for the primary address associated with the account. |
isDefault | Boolean | Whether this address is selected as the default |
replyToAddress | String | An optional email address that is included in a “Reply-To:” header for mail sent using this alias. If this is empty, Gmail will not generate a “Reply-To:” header. |
signature | String | An optional HTML signature that is included in messages composed with this alias in the Gmail web UI. |
host | String | The hostname of the SMTP service. |
password | String | The password that will be used for authentication with the SMTP service. |
port | Number | The port of the SMTP service. |
securityMode | Select | The protocol that will be used to secure communication with the SMTP service. |
username | String | The username that will be used for authentication with the SMTP service. |
treatAsAlias | Boolean | Whether Gmail should treat this address as an alias for the user’s primary email address. This setting only applies to custom “from” aliases. |
Updates a custom “from” send-as alias.
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
String | The email of the user. The special value me can be used to indicate the authenticated user. | |
sendAsEmail | String | An optional email address that is included in a “Reply-To:” header for mail sent using this alias. If this is empty, Gmail will not generate a “Reply-To:” header. |
displayName | String | A name that appears in the “From:” header for mail sent using this alias. For custom “from” addresses, when this is empty, Gmail will populate the “From:” header with the name that is used for the primary address associated with the account. |
isDefault | Boolean | Whether this address is selected as the default |
replyToAddress | String | An optional email address that is included in a “Reply-To:” header for mail sent using this alias. If this is empty, Gmail will not generate a “Reply-To:” header. |
signature | String | An optional HTML signature that is included in messages composed with this alias in the Gmail web UI. |
host | String | The hostname of the SMTP service. |
password | String | The password that will be used for authentication with the SMTP service. |
port | Number | The port of the SMTP service. |
securityMode | Select | The protocol that will be used to secure communication with the SMTP service. |
username | String | The username that will be used for authentication with the SMTP service. |
treatAsAlias | Boolean | Whether Gmail should treat this address as an alias for the user’s primary email address. This setting only applies to custom “from” aliases. |
Lists the send-as aliases for the specified account. The result includes the primary send-as address associated with the account as well as any custom “from” aliases.
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
String | The email of the user. The special value me can be used to indicate the authenticated user. |
Gets the specified send-as alias.
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
sendAsEmail | String | The send-as alias to be retrieved. |
String | The email of the user. The special value me can be used to indicate the authenticated user. |
Deletes the specified send-as alias.
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
sendAsEmail | String | The send-as alias to be retrieved. |
String | The email of the user. The special value me can be used to indicate the authenticated user. |
Verify the specified send-as alias.
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
sendAsEmail | String | The send-as alias to be retrieved. |
String | The email of the user. The special value me can be used to indicate the authenticated user. |
Lists S/MIME configs for the specified send-as alias
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
sendAsEmail | String | The send-as alias to be retrieved. |
String | The email of the user. The special value me can be used to indicate the authenticated user. |
Get single S/MIME config for the specified send-as alias
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
sendAsEmail | String | The send-as alias to be retrieved. |
configId | String | The immutable ID for the SmimeInfo. |
String | The email of the user. The special value me can be used to indicate the authenticated user. |
Insert (upload) the given S/MIME config for the specified send-as alias. Note that pkcs12 format is required for the key.
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
sendAsEmail | String | The send-as alias to be retrieved. |
String | The email of the user. The special value me can be used to indicate the authenticated user. | |
expiration | DatePicker | When the certificate expires (Y-m-d HⓂ️s). |
issuerCn | String | The S/MIME certificate issuer’s common name. |
isDefault | Boolean | Whether this SmimeInfo is the default one for this user’s send-as address. |
pem | String | PEM formatted X509 concatenated certificate string (standard base64 encoding). Format used for returning key, which includes public key as well as certificate chain (not private key). |
pkcs12 | String | PKCS#12 format containing a single private/public key pair and certificate chain. This format is only accepted from client for creating a new SmimeInfo and is never returned, because the private key is not intended to be exported. PKCS#12 may be encrypted, in which case encryptedKeyPassword should be set appropriately. |
encryptedKeyPassword | String | Encrypted key password, when key is encrypted. |
Sets the default S/MIME config for the specified send-as alias.
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
sendAsEmail | String | The send-as alias to be retrieved. |
configId | String | The immutable ID for the SmimeInfo. |
String | The email of the user. The special value me can be used to indicate the authenticated user. |
Deletes the specified S/MIME config for the specified send-as alias.
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
sendAsEmail | String | The send-as alias to be retrieved. |
configId | String | The immutable ID for the SmimeInfo. |
String | The email of the user. The special value me can be used to indicate the authenticated user. |
Lists the history of all changes to the given mailbox. History results are returned in chronological order (increasing historyId)
Field | Type | Description |
---|---|---|
accessToken | String | Token received from Gmail |
startHistoryId | String | Returns history records after the specified startHistoryId. |
historyTypes | List | The immutable ID for the SmimeInfo. |
labelId | String | Only return messages with a label matching the ID. |
maxResults | Number | The maximum number of history records to return. |
pageToken | String | Page token to retrieve a specific page of results in the list. |
String | The email of the user. The special value me can be used to indicate the authenticated user. |