Skip to content

Gmail

Reference


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]

Version: 1


Connections

Version: 1

OAuth2 Authorization Code

Properties

NameTypeControl TypeDescription
Client IdSTRINGTEXT
Client SecretSTRINGTEXT

Triggers

New Email

Triggers when new mail is found in your Gmail inbox.

Type: STATIC_WEBHOOK

Properties

NameTypeControl TypeDescription
Topic 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.

Output

Type: ARRAY

Properties

TypeControl 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

NameTypeControl TypeDescription
null

Output

Type: ARRAY

Properties

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

Actions

Add Labels

Add labels to an email in your Gmail account

Properties

NameTypeControl TypeDescription
Message IDSTRINGSELECTID of the message to add labels
Labels[STRING($label)]ARRAY_BUILDERLabels to add to this message. You can add up to 100 labels with each update.

Output

Type: OBJECT

Properties

TypeControl Type
STRINGTEXT
[STRING]ARRAY_BUILDER
STRINGTEXT

Delete Mail

Delete an email from your Gmail account permanently via Id

Properties

NameTypeControl TypeDescription
Message IDSTRINGSELECTThe ID of the message to delete.

Get Mail

Get an email from your Gmail account via Id

Properties

NameTypeControl TypeDescription
Message IDSTRINGSELECTThe ID of the message to retrieve.
FormatSTRINGSELECTThe format to return the message in.
Metadata headers[STRING]ARRAY_BUILDERWhen given and format is METADATA, only include headers specified.

Get Thread

Gets the specified thread.

Properties

NameTypeControl TypeDescription
Thread IDSTRINGSELECTThe ID of the thread to retrieve.
FormatSTRINGSELECTThe format to return the message in.
Metadata headers[STRING]ARRAY_BUILDERWhen given and format is METADATA, only include headers specified.

Reply to Email

Send a reply to an email message.

Properties

NameTypeControl TypeDescription
Message IDSTRINGSELECTThe ID of the message to reply to.
To[STRING($email)]ARRAY_BUILDERRecipients email addresses.
Bcc[STRING($email)]ARRAY_BUILDERBcc recipients email addresses.
Cc[STRING($email)]ARRAY_BUILDERCc recipients email addresses.
BodySTRINGTEXTBody text of the email
Attachments[FILE_ENTRY]ARRAY_BUILDERA list of attachments to send with the email.

Output

Type: OBJECT

Properties

TypeControl Type
STRINGTEXT
[STRING]ARRAY_BUILDER
STRINGTEXT

Search Email

Lists the messages in the user’s mailbox.

Properties

NameTypeControl TypeDescription
Max ResultsNUMBERNUMBERMaximum number of messages to return.
Page TokenSTRINGTEXTPage token to retrieve a specific page of results in the list.
FromSTRINGTEXTThe address sending the mail
ToSTRINGTEXTThe address receiving the new mail
SubjectSTRINGTEXTWords in the subject line
CategorySTRINGSELECTMessages in a certain category
Labels[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.
Include Spam TrashBOOLEANSELECTInclude messages from SPAM and TRASH in the results.

Output

Type: OBJECT

Properties

TypeControl Type
[{STRING(id), STRING(threadId)}]ARRAY_BUILDER
STRINGTEXT
NUMBERNUMBER

Send Email

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

Properties

NameTypeControl TypeDescription
To[STRING($email)]ARRAY_BUILDERRecipients email addresses.
SubjectSTRINGTEXTSubject of the email.
Bcc[STRING($email)]ARRAY_BUILDERBcc recipients email addresses.
Cc[STRING($email)]ARRAY_BUILDERCc recipients email addresses.
Reply To[STRING($email)]ARRAY_BUILDERReply-to email addresses.
BodySTRINGTEXTBody text of the email
Attachments[FILE_ENTRY]ARRAY_BUILDERA list of attachments to send with the email.

Output

Type: OBJECT

Properties

TypeControl Type
STRINGTEXT
[STRING]ARRAY_BUILDER
STRINGTEXT

Additional instructions


anl-c-google-mail-md

CONNECTION

Setting up OAuth2

Turning on GMail API