Connectors Reference

Gmail

Gmail is a web-based email service from Google. With the Gmail connector, you can perform actions such as send or receive e-mail messages, and trigger flows on new e-mails.

 

Status: Production

Tier: Standard

Version: 1.0

 

Actions:

Name

Summary

GetLabels ()

List all labels

GetEmail (string id, [Optional]boolean includeAttachments)

Get email details

DeleteEmail (string id)

Delete email

SendEmail (SendMessage emailMessage)

Send email

ReplyTo (string id, ReplyMessage replyMessage)

Reply to email

TrashEmail (string id)

Move email to trash

TestConnection ()

Test connection

 

Triggers:

Name

Summary

OnNewEmail ([Optional]string label, [advanced][Optional]string to, [advanced][Optional]string from, [advanced][Optional]string subject, [advanced][Optional]string importance, [advanced][Optional]string starred, [advanced][Optional]boolean fetchOnlyWithAttachments, [advanced][Optional]boolean includeAttachments)

When a new email arrives

 

Objects:

Name

Summary

Attachment

 

DetailedReceiveMessage

 

GmailLabel

 

ReplyMessage

 

SendMessage

 

 

Actions:

GetLabels

Summary: List all labels

Description: List all labels.

 

Syntax:

Gmail.GetLabels ()

 

Returns:

          Type:array of (GmailLabel)

 

GetEmail

Summary: Get email details

Description: This operation retrieves the details of a specific email.

 

Syntax:

Gmail.GetEmail (string id, [Optional]boolean includeAttachments)

 

Parameters:

Name

Type

Summary

Required

Related Action

id

string

(Message ID)

Unique id of the email message.

True

includeAttachments

boolean

(Include Attachments)

If set to true, attachments will also be retrieved along with the email.

False

 

Returns:

          Type:DetailedReceiveMessage

          Description: Details associated with a specific email message.

 

DeleteEmail

Summary: Delete email

Description: This operation is used to delete a specific email permanently.

 

Syntax:

Gmail.DeleteEmail (string id)

 

Parameters:

Name

Type

Summary

Required

Related Action

id

string

(Message ID)

Id of the email to delete.

True

 

Returns:

 

SendEmail

Summary: Send email

Description: This operation is used to send an email to specific recipients.

 

Syntax:

Gmail.SendEmail (SendMessage emailMessage)

 

Parameters:

Name

Type

Summary

Required

Related Action

emailMessage

SendMessage

 

Properties associated with the outgoing email.

True

 

Returns:

 

ReplyTo

Summary: Reply to email

Description: This operation is used to reply to a specific email.

 

Syntax:

Gmail.ReplyTo (string id, ReplyMessage replyMessage)

 

Parameters:

Name

Type

Summary

Required

Related Action

id

string

(Message ID)

Id of the email to reply to.

True

replyMessage

ReplyMessage

 

Properties of an email reply message.

True

 

Returns:

 

TrashEmail

Summary: Move email to trash

Description: This operation is used to move a specific email to trash.

 

Syntax:

Gmail.TrashEmail (string id)

 

Parameters:

Name

Type

Summary

Required

Related Action

id

string

(Message ID)

ID of the email to move to the trash.

True

 

Returns:

 

TestConnection

Summary: Test connection

Description: Test the connection.

 

Syntax:

Gmail.TestConnection ()

 

Returns:

 

Triggers:

Trigger OnNewEmail

Summary: When a new email arrives

Description: This operation triggers when a new email matching the specified criteria arrives.

 

Syntax:

Gmail.OnNewEmail ([Optional]string label, [advanced][Optional]string to, [advanced][Optional]string from, [advanced][Optional]string subject, [advanced][Optional]string importance, [advanced][Optional]string starred, [advanced][Optional]boolean fetchOnlyWithAttachments, [advanced][Optional]boolean includeAttachments)

 

Parameters:

Name

Type

Summary

Required

Related Action

label

string

(Label)

Pick a label (default: Inbox).

False

GetLabels

to

string(email)

(To)

A list of valid email addresses separated by a semicolon or a comma.

False

from

string(email)

(From)

Example: Sender1 | sender2@domain.com.

False

subject

string

(Subject)

String to look for in the subject.

False

importance

string

(Importance)Values: [All, Important, Not important]

True if the email should be important. (default: All).

False

starred

string

(Starred)Values: [All, Starred, Not starred]

True if the email should be starred. (default: All).

False

fetchOnlyWithAttachments

boolean

(Has Attachments)

True to retrieve only emails with attachments.

False

includeAttachments

boolean

(Include Attachments)

True to retrieve attachments along with the email.

False

 

Returns:

          Type:DetailedReceiveMessage

          Description: Details associated with a specific email message.

 


 

Attachment

Summary:

Description: Properties of an email attachment.

 

          Properties:

Name

Type

Summary

Name

string

Name

Title of the attachment.

ContentBytes

string(byte)

Content

Body of the attachment.

ContentType

string

Content-Type

Type of content in the attachment.

ContentId

string

 

Content ID

Size

integer(int64)

 

Attachment size


 

DetailedReceiveMessage

Summary:

Description: Details associated with a specific email message.

 

          Properties:

Name

Type

Summary

From

string(email)

From

Email address the message was sent from.

SenderName

string

Sender's Name

Email sender's name

To

string(email)

To

Email address the message was sent to.

Cc

string(email)

CC

Email addresses contained in the CC field.

Bcc

string(email)

BCC

Email addresses contained in the BCC field.

Subject

string

Subject

Subject or topic associated with the email message.

Body

string

Body

Content of the email message.

Snippet

string

Snippet

A short part of the message text.

LabelIds

array of (string)

Label IDs

List of labels associated with the email message.

HistoryId

integer(int64)

History ID

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

DateTimeReceived

string(date-time)

Received Date-Time

Example:2017-05-03T20:08:57+00:00

EstimatedSize

integer(int32)

Estimated Size

Estimated size in bytes of the message.

IsRead

boolean

Is Read?

True if the message is read; false otherwise.

IsHtml

boolean

Is HTML

True if the message is in HTML format.

HasAttachments

boolean

Has Attachments

True if the message has attachments.

Attachments

array of (Attachment)

Attachments

List of attachments to the email message.

Id

string

Message ID

The immutable ID of the message.

ThreadId

string

Thread ID

The ID of the thread the message belongs to.


 

GmailLabel

Summary:

Description: Gmail label

 

          Properties:

Name

Type

Summary

Id

string

 

Label ID

DisplayName

string

 

Display name


 

ReplyMessage

Summary:

Description: Properties of an email reply message.

 

          Properties:

Name

Type

Summary

To

string(email)

To

Example: recipient1@domain.com; recipient2@domain.com

Cc

string(email)

CC

Example: recipient1@domain.com; recipient2@domain.com

Bcc

string(email)

BCC

Example: recipient1@domain.com; recipient2@domain.com

Subject

string

Subject

Email subject (if empty, the original subject used).

Body

string

Body

Content of the email.

ReplyAll

boolean

Reply All

True to reply to all recipients. (default: False)

IsHtml

boolean

Is HTML

True to send the reply as HTML. (default: True)

Importance

string

Importance

Pick an importance. (default: Normal)  Values: [Normal, Low, High]

Attachments

array of (Attachment)

Attachments

Details of attachments to be sent along with the reply.


 

SendMessage

Summary:

Description: Properties associated with the outgoing email.

 

          Properties:

Name

Type

Summary

To

string(email)

To

A list of valid email addresses separated by a semicolon or a comma.

Cc

string(email)

CC

A list of valid email addresses separated by a semicolon or a comma.

Bcc

string(email)

BCC

A list of valid email addresses separated by a semicolon or a comma.

Subject

string

Subject

Subject of the outgoing email.

Body

string

Body

Body of the outgoing email.

IsHtml

boolean

Is HTML

True to send the email as HTML. (default: True)

Importance

string

Importance

Importance associated with the email message.  Values: [Normal, Low, High]

Attachments

array of (Attachment)

Attachments

Details of attachments to be sent along with the email.