Skip to content

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

NameLabelTypeControl TypeDescriptionRequired
clientIdClient IdSTRINGTEXTtrue
clientSecretClient SecretSTRINGTEXTtrue

Actions

Add Labels

Name: addLabels

Add labels to an email in your Gmail account.

Properties

NameLabelTypeControl TypeDescriptionRequired
idMessage IDSTRINGSELECTID of the message to add labelstrue
labelIdsLabels[STRING($label)]ARRAY_BUILDERLabels to add to this message. You can add up to 100 labels with each update.true

Output

Type: OBJECT

Properties

NameTypeControl Type
idSTRINGTEXT
labelIds[STRING]ARRAY_BUILDER
threadIdSTRINGTEXT

Delete Mail

Name: deleteMail

Delete an email from your Gmail account permanently via Id

Properties

NameLabelTypeControl TypeDescriptionRequired
idMessage IDSTRINGSELECTThe ID of the message to delete.true

Get Mail

Name: getMail

Get an email from your Gmail account via Id

Properties

NameLabelTypeControl TypeDescriptionRequired
idMessage IDSTRINGSELECTThe ID of the message to retrieve.true
formatFormatSTRINGSELECTThe format to return the message in.false
metadataHeadersMetadata headers[STRING]ARRAY_BUILDERWhen given and format is METADATA, only include headers specified.false

Get Thread

Name: getThread

Gets the specified thread.

Properties

NameLabelTypeControl TypeDescriptionRequired
idThread IDSTRINGSELECTThe ID of the thread to retrieve.true
formatFormatSTRINGSELECTThe format to return the message in.false
metadataHeadersMetadata headers[STRING]ARRAY_BUILDERWhen given and format is METADATA, only include headers specified.false

Reply to Email

Name: replyToEmail

Send a reply to an email message.

Properties

NameLabelTypeControl TypeDescriptionRequired
idMessage IDSTRINGSELECTThe ID of the message to reply to.true
toTo[STRING($email)]ARRAY_BUILDERRecipients email addresses.true
bccBcc[STRING($email)]ARRAY_BUILDERBcc recipients email addresses.false
ccCc[STRING($email)]ARRAY_BUILDERCc recipients email addresses.false
bodyBodySTRINGTEXT_AREABody text of the emailtrue
attachmentsAttachments[FILE_ENTRY]ARRAY_BUILDERA list of attachments to send with the email.null

Output

Type: OBJECT

Properties

NameTypeControl Type
idSTRINGTEXT
labelIds[STRING]ARRAY_BUILDER
threadIdSTRINGTEXT

Search Email

Name: searchEmail

Lists the messages in the user’s mailbox.

Properties

NameLabelTypeControl TypeDescriptionRequired
maxResultsMax ResultsNUMBERNUMBERMaximum number of messages to return.false
pageTokenPage TokenSTRINGTEXTPage token to retrieve a specific page of results in the list.false
fromFromSTRINGTEXTThe address sending the mailfalse
toToSTRINGTEXTThe address receiving the new mailfalse
subjectSubjectSTRINGTEXTWords in the subject linefalse
categoryCategorySTRINGSELECTMessages in a certain categoryfalse
labelIdsLabels[STRING]ARRAY_BUILDEROnly 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
includeSpamTrashInclude Spam TrashBOOLEANSELECTInclude messages from SPAM and TRASH in the results.false

Output

Type: OBJECT

Properties

NameTypeControl Type
messages[{STRING(id), STRING(threadId)}]ARRAY_BUILDER
nextPageTokenSTRINGTEXT
resultSizeEstimateNUMBERNUMBER

Send Email

Name: sendEmail

Sends the specified message to the recipients in the To, Cc, and Bcc headers.

Properties

NameLabelTypeControl TypeDescriptionRequired
toTo[STRING($email)]ARRAY_BUILDERRecipients email addresses.true
subjectSubjectSTRINGTEXTSubject of the email.true
bccBcc[STRING($email)]ARRAY_BUILDERBcc recipients email addresses.false
ccCc[STRING($email)]ARRAY_BUILDERCc recipients email addresses.false
replyToReply To[STRING($email)]ARRAY_BUILDERReply-to email addresses.false
bodyBodySTRINGRICH_TEXTBody text of the emailtrue
attachmentsAttachments[FILE_ENTRY]ARRAY_BUILDERA list of attachments to send with the email.null

Output

Type: OBJECT

Properties

NameTypeControl Type
idSTRINGTEXT
labelIds[STRING]ARRAY_BUILDER
threadIdSTRINGTEXT

Triggers

New Email

Triggers when new mail is found in your Gmail inbox.

Type: STATIC_WEBHOOK

Properties

NameLabelTypeControl TypeDescriptionRequired
topicNameTopic NameSTRINGTEXTMust 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

Output

Type: ARRAY

Properties

NameTypeControl Type
{STRING(id), STRING(threadId), [STRING](labelIds), STRING(snippet), STRING(historyId), NUMBER(internalDate), {STRING(partId), STRING(mimeType), STRING(filename), [{STRING(name), STRING(value)}](headers), {STRING(attachmentId), INTEGER(size), STRING(data)}(body), [](parts)}(payload), INTEGER(sizeEstimate), STRING(raw)}OBJECT_BUILDER

New Email Polling

Periodically checks your Gmail inbox for any new incoming emails.

Type: POLLING

Properties

NameLabelTypeControl TypeDescriptionRequired
null

Output

Type: ARRAY

Properties

NameTypeControl Type
{STRING(id), STRING(threadId)}OBJECT_BUILDER


Additional instructions


anl-c-google-mail-md

CONNECTION

Setting up OAuth2

Turning on Gmail API