Gmail
Gmail is a widely used email service by Google, offering free and feature-rich communication, organization, and storage capabilities accessible through web browsers and mobile apps.
Categories: communication
Type: googleMail/v1
Connections
Version: 1
OAuth2 Authorization Code
Properties
Name | Label | Type | Description | Required |
---|---|---|---|---|
clientId | Client Id | STRING | true | |
clientSecret | Client Secret | STRING | true |
Actions
Add Labels
Name: addLabels
Add labels to an email in your Gmail account.
Properties
Name | Label | Type | Description | Required |
---|---|---|---|---|
id | Message ID | STRING | ID of the message to add labels | true |
labelIds | Labels | ARRAY Items[STRING] | Labels to add to this message. You can add up to 100 labels with each update. | true |
Example JSON Structure
{ "label" : "Add Labels", "name" : "addLabels", "parameters" : { "id" : "", "labelIds" : [ "" ] }, "type" : "googleMail/v1/addLabels"}
Output
Type: OBJECT
Properties
Name | Type | Description |
---|---|---|
id | STRING | The ID of the message. |
threadId | STRING | The ID of the thread the message belongs to. |
labelIds | ARRAY Items[STRING] | List of IDs of labels applied to this message. |
Output Example
{ "id" : "", "threadId" : "", "labelIds" : [ "" ]}
Delete Mail
Name: deleteMail
Delete an email from your Gmail account permanently via Id
Properties
Name | Label | Type | Description | Required |
---|---|---|---|---|
id | Message ID | STRING | The ID of the message to delete. | true |
Example JSON Structure
{ "label" : "Delete Mail", "name" : "deleteMail", "parameters" : { "id" : "" }, "type" : "googleMail/v1/deleteMail"}
Output
This action does not produce any output.
Get Mail
Name: getMail
Get an email from your Gmail account via Id
Properties
Name | Label | Type | Description | Required |
---|---|---|---|---|
id | Message ID | STRING | The ID of the message to retrieve. | true |
format | Format | STRING OptionsSIMPLE, MINIMAL, FULL, RAW, metadata | The format to return the message in. | false |
metadataHeaders | Metadata headers | ARRAY Items[STRING] | When given and format is METADATA, only include headers specified. | false |
Example JSON Structure
{ "label" : "Get Mail", "name" : "getMail", "parameters" : { "id" : "", "format" : "", "metadataHeaders" : [ "" ] }, "type" : "googleMail/v1/getMail"}
Output
The output for this action is dynamic and may vary depending on the input parameters. To determine the exact structure of the output, you need to execute the action.
Get Thread
Name: getThread
Gets the specified thread.
Properties
Name | Label | Type | Description | Required |
---|---|---|---|---|
id | Thread ID | STRING | The ID of the thread to retrieve. | true |
format | Format | STRING OptionsSIMPLE, MINIMAL, FULL, RAW, metadata | The format to return the message in. | false |
metadataHeaders | Metadata headers | ARRAY Items[STRING] | When given and format is METADATA, only include headers specified. | false |
Example JSON Structure
{ "label" : "Get Thread", "name" : "getThread", "parameters" : { "id" : "", "format" : "", "metadataHeaders" : [ "" ] }, "type" : "googleMail/v1/getThread"}
Output
The output for this action is dynamic and may vary depending on the input parameters. To determine the exact structure of the output, you need to execute the action.
Reply to Email
Name: replyToEmail
Send a reply to an email message.
Properties
Name | Label | Type | Description | Required |
---|---|---|---|---|
id | Message ID | STRING | The ID of the message to reply to. | true |
to | To | ARRAY Items[STRING] | Recipients email addresses. | true |
bcc | Bcc | ARRAY Items[STRING] | Bcc recipients email addresses. | false |
cc | Cc | ARRAY Items[STRING] | Cc recipients email addresses. | false |
body | Body | STRING | Body text of the email | true |
attachments | Attachments | ARRAY Items[FILE_ENTRY] | A list of attachments to send with the email. | null |
Example JSON Structure
{ "label" : "Reply to Email", "name" : "replyToEmail", "parameters" : { "id" : "", "to" : [ "" ], "bcc" : [ "" ], "cc" : [ "" ], "body" : "", "attachments" : [ { "extension" : "", "mimeType" : "", "name" : "", "url" : "" } ] }, "type" : "googleMail/v1/replyToEmail"}
Output
Type: OBJECT
Properties
Name | Type | Description |
---|---|---|
id | STRING | The ID of the message. |
threadId | STRING | The ID of the thread the message belongs to. |
labelIds | ARRAY Items[STRING] | List of IDs of labels applied to this message. |
Output Example
{ "id" : "", "threadId" : "", "labelIds" : [ "" ]}
Search Email
Name: searchEmail
Lists the messages in the user’s mailbox.
Properties
Name | Label | Type | Description | Required |
---|---|---|---|---|
maxResults | Max Results | NUMBER | Maximum number of messages to return. | false |
pageToken | Page Token | STRING | Page token to retrieve a specific page of results in the list. | false |
from | From | STRING | The address sending the mail | false |
to | To | STRING | The address receiving the new mail | false |
subject | Subject | STRING | Words in the subject line | false |
category | Category | STRING Optionsprimary, social, promotions, updates, forums, reservations, purchases | Messages in a certain category | false |
labelIds | Labels | ARRAY Items[STRING] | Only return messages with labels that match all of the specified label IDs. Messages in a thread might have labels that other messages in the same thread don’t have. | false |
includeSpamTrash | Include Spam Trash | BOOLEAN Optionstrue, false | Include messages from SPAM and TRASH in the results. | false |
Example JSON Structure
{ "label" : "Search Email", "name" : "searchEmail", "parameters" : { "maxResults" : 0.0, "pageToken" : "", "from" : "", "to" : "", "subject" : "", "category" : "", "labelIds" : [ "" ], "includeSpamTrash" : false }, "type" : "googleMail/v1/searchEmail"}
Output
Type: OBJECT
Properties
Name | Type | Description |
---|---|---|
messages | ARRAY Items[{STRING(id), STRING(threadId)}] | |
nextPageToken | STRING | |
resultSizeEstimate | NUMBER | Estimated number of messages. |
Output Example
{ "messages" : [ { "id" : "", "threadId" : "" } ], "nextPageToken" : "", "resultSizeEstimate" : 0.0}
Send Email
Name: sendEmail
Sends the specified message to the recipients in the To, Cc, and Bcc headers.
Properties
Name | Label | Type | Description | Required |
---|---|---|---|---|
to | To | ARRAY Items[STRING] | Recipients email addresses. | true |
subject | Subject | STRING | Subject of the email. | true |
bcc | Bcc | ARRAY Items[STRING] | Bcc recipients email addresses. | false |
cc | Cc | ARRAY Items[STRING] | Cc recipients email addresses. | false |
replyTo | Reply To | ARRAY Items[STRING] | Reply-to email addresses. | false |
body | Body | STRING | Body text of the email | true |
attachments | Attachments | ARRAY Items[FILE_ENTRY] | A list of attachments to send with the email. | null |
Example JSON Structure
{ "label" : "Send Email", "name" : "sendEmail", "parameters" : { "to" : [ "" ], "subject" : "", "bcc" : [ "" ], "cc" : [ "" ], "replyTo" : [ "" ], "body" : "", "attachments" : [ { "extension" : "", "mimeType" : "", "name" : "", "url" : "" } ] }, "type" : "googleMail/v1/sendEmail"}
Output
Type: OBJECT
Properties
Name | Type | Description |
---|---|---|
id | STRING | The ID of the message. |
threadId | STRING | The ID of the thread the message belongs to. |
labelIds | ARRAY Items[STRING] | List of IDs of labels applied to this message. |
Output Example
{ "id" : "", "threadId" : "", "labelIds" : [ "" ]}
Triggers
New Email
Name: newEmail
Triggers when new mail is found in your Gmail inbox.
Type: STATIC_WEBHOOK
Properties
Name | Label | Type | Description | Required |
---|---|---|---|---|
topicName | Topic Name | STRING | Must be 3-255 characters, start with a letter, and contain only the following characters: letters, numbers, dashes (-), periods (.), underscores (_), tildes (~), percents (%) or plus signs (+). Cannot start with goog. | true |
format | Format | STRING OptionsSIMPLE, MINIMAL, FULL, RAW, metadata | The format to return the message in. | false |
Output
The output for this action is dynamic and may vary depending on the input parameters. To determine the exact structure of the output, you need to execute the action.
JSON Example
{ "label" : "New Email", "name" : "newEmail", "parameters" : { "topicName" : "", "format" : "" }, "type" : "googleMail/v1/newEmail"}
New Email Polling
Name: newEmailPolling
Periodically checks your Gmail inbox for any new incoming emails.
Type: POLLING
Output
Type: ARRAY
Items Type: OBJECT
Properties
Name | Type | Description |
---|---|---|
id | STRING | ID of the message. |
threadId | STRING | The ID of the thread the message belongs to. |
JSON Example
{ "label" : "New Email Polling", "name" : "newEmailPolling", "type" : "googleMail/v1/newEmailPolling"}
Additional instructions
CONNECTION
Turning on Gmail API