googleGmail

Procedures and concepts for the Gmail integration.

circle-info

The following documentation is for Gmail v2.0.1 (BDK).

Overview

Gmail is Google's comprehensive email service providing powerful messaging, organization, and collaboration features. This integration enables automated email sending, inbox management, message filtering, and email workflow automation. Streamline communication processes and enhance productivity through intelligent email automation.

Prerequisites

1. Required Books

The following Book(s) need to be added to your agent so it can learn and understand the automation procedures defined within them:

  • Gmail

How to Add the Book(s)

  1. Go to BooksAll Books.

  2. Search for the name of the book and click on it.

  3. Click on Install or Add Connection to add the book to your agent.

  4. If adding a connection, you'll be prompted for connectivity details.

Connectivity

This section outlines the available methods for connecting to the Book, along with the required configuration details for each.

This books supports the connectivity methods described in this section.In here you will find information about what information is required in order to employ each method.

Procedures

to add a label to an (email)

Add a label to one or more emails.

Input Concepts

Concept
Description
Type
Required
Default Value

label

The label to add.

text

Yes

(no default)

email

the email or emails to add the label to

gmail email or list of gmail email

Yes

(no default)

Output Concepts

Concept
Description
Type

email

the email: The email or emails with the label added

gmail email or list of gmail email

Examples

Add a label to emails

to download an (email's attachments)

FILTER - CAPABLE

Get an email attachment as an IO object.

Input Concepts

Concept
Description
Type
Required
Default Value

The email containing the attachment

gmail email

Yes

(no default)

Output Concepts

Concept
Description
Type

The attachment as an IO object

gmail attachment

Examples

Download an attachment

to forward an email

Forward an email to new recipients.

Input Concepts

Concept
Description
Type
Required
Default Value

The email to forward

gmail email

Yes

(no default)

recipients

The recipients to forward the email to

list of text or text

Yes

(no default)

body

Optional additional message to include

text

No

(no default)

html body

Optional additional HTML message to include

text

No

(no default)

cc recipients

Optional CC recipients

list of text or text

No

(no default)

bcc recipients

Optional BCC recipients

list of text or text

No

(no default)

Output Concepts

Concept
Description
Type

The sent email

gmail email

Examples

Forward an email to someone

Forward an email with additional message

to get some (label's emails)

FILTER - CAPABLE

Get emails from a specified label in Gmail.

Input Concepts

Concept
Description
Type
Required
Default Value

label

The name of the label from which to retrieve emails.

text

Yes

(no default)

max result count

Maximum number of emails to retrieve (default: 10).

number

No

10

Output Concepts

Concept
Description
Type

the label's emails: List of GmailEmail objects representing the retrieved emails.

gmail email

Examples

Retrieve all emails from inbox

Retrieve emails with specific subject

to list (labels)

Get all labels from the user's Gmail account.

Output Concepts

Concept
Description
Type

labels

A list of all labels.

text

Examples

List all labels

to remove a label from an (email)

Remove a label from one or more emails.

Input Concepts

Concept
Description
Type
Required
Default Value

label

The label to remove.

text

Yes

(no default)

email

The email or emails to remove the label from.

gmail email or list of gmail email

Yes

(no default)

Output Concepts

Concept
Description
Type

email

the email: The email or emails with the label removed

gmail email or list of gmail email

Examples

Remove a label from an email

to reply an email

Reply to an email.

Input Concepts

Concept
Description
Type
Required
Default Value

The email to reply to

gmail email

Yes

(no default)

body

The body of the reply

text

No

(no default)

html body

The html body of the reply

text

No

(no default)

additional recipients

Additional recipients to include in the reply

list of text or text

No

(no default)

Optional list of attachments to include in the reply

gmail attachment

No

(no default)

Output Concepts

Concept
Description
Type

The sent email

gmail email

Examples

Reply to an email

to send an email

Send an email using Gmail API.

Input Concepts

Concept
Description
Type
Required
Default Value

recipients

The list of recipient email addresses.

list of text or text

Yes

(no default)

subject

The subject line of the email.

text

Yes

(no default)

body

The plain text content of the email.

text

No

(no default)

html body

The HTML content of the email.

text

No

(no default)

cc recipients

Optional list of CC recipients.

list of text or text

No

(no default)

bcc recipients

Optional list of BCC recipients.

list of text or text

No

(no default)

Optional list of file attachments.

gmail attachment

No

(no default)

Output Concepts

Concept
Description
Type

The sent email

gmail email

Examples

Send a basic email

Send an email with CC and BCC

Concepts

Gmail email

A Gmail Email represents an email message in Gmail.

Field Name
Description
Type

id

The unique identifier for the email.

text

thread_id

The unique identifier for the thread containing the email.

text

The list of labels applied to the email.

list of text

state

The state of the email (draft, unread, or read).

text

sender

The sender of the email.

text

The recipients of the email.

list of text

message_id

The unique identifier for the message.

optional[text]

cc_recipients

The cc recipients of the email.

optional[list of text]

bcc_recipients

The bcc recipients of the email.

optional[list of text]

The attachments of the email.

optional[list of gmail attachment reference]

subject

The subject of the email.

optional[text]

plain_body

The plain text body of the email.

optional[text]

html_body

The html body of the email.

optional[text]

sent_date_time

The date and time the email was sent.

optional[datetime]

received_date_time

The date and time the email was received.

optional[datetime]

Gmail attachment reference

A Gmail Attachment Reference represents a reference to a file attached to an email in Gmail.

Field Name
Description
Type

id

The unique identifier for the attachment.

text

email_id

The unique identifier for the email.

text

file_name

The name of the attachment.

text

file_size

The size of the file in bytes.

number

Gmail attachment

A Gmail Attachment represents a file with name.

Field Name
Description
Type

file_name

The name of the attachment.

text

content

The content of the attachment.

file

Last updated

Was this helpful?