ByteChef LogoByteChef

Google Chat

Google Chat is an intelligent and secure communication and collaboration tool, built for teams.

Categories: Communication

Type: googleChat/v1


Connections

Version: 1

OAuth2 Authorization Code

Properties

NameLabelTypeDescriptionRequired
clientIdClient IdSTRINGtrue
clientSecretClient SecretSTRINGtrue

Connection Setup

Create OAuth 2.0 Application

Creation of OAuth 2.0 application is documented here.

Enable Google Chat API

  1. In the Google Cloud Console, select your project.
  2. Go to the APIs & Services.
  3. Click on ENABLE APIS AND SERVICES.
  4. Search for "google chat api" in the search bar.
  5. Click on Google Chat API.
  6. Click Enable.

Configure Chat Application

  1. In the Google Cloud Console
  2. Click on APIs & Services
  3. Click on Google Chat API
  4. Click on Configuration
  5. Add App name, Avatar URL and Description
  6. Enable "Join spaces and group conversations"
  7. Click on "Use a common HTTP endpoint URL for all triggers" and add some HTTPS URL, we won't use that feature.
  8. Click on "Enter email addresses to add individuals and group" and add your email address.
  9. Click on Save
  10. Done 🚀

Actions

Create Space

Name: createSpace

Creates space in Google Chat.

Properties

NameLabelTypeDescriptionRequired
displayNameSpace NameSTRINGName of the space to create.true

Example JSON Structure

{
  "label" : "Create Space",
  "name" : "createSpace",
  "parameters" : {
    "displayName" : ""
  },
  "type" : "googleChat/v1/createSpace"
}

Output

Type: OBJECT

Properties

NameTypeDescription
nameSTRINGName of the space that was created.
typeSTRINGType of the space.
displayNameSTRINGName of the space that will be displayed.
spaceThreadingStateSTRINGThe threading state in the Chat space.
spaceTypeSTRINGThe type of space.
spaceHistoryStateSTRINGThe message history state for messages and threads in this space.
createTimeSTRINGFor spaces created in Chat, the time the space was created.
lastActiveTimeSTRINGTimestamp of the last message in the space.
membershipCountOBJECT
Properties {}
The count of joined memberships grouped by member type.
accessSettingsOBJECT
Properties {STRING(accessSettings)}
Specifies the access setting of the space.
customerSTRINGCustomer that created the space.
spaceUriSTRINGThe URI for a user to access the space.

Output Example

{
  "name" : "",
  "type" : "",
  "displayName" : "",
  "spaceThreadingState" : "",
  "spaceType" : "",
  "spaceHistoryState" : "",
  "createTime" : "",
  "lastActiveTime" : "",
  "membershipCount" : { },
  "accessSettings" : {
    "accessSettings" : ""
  },
  "customer" : "",
  "spaceUri" : ""
}

Send Space Message

Name: sendSpaceMessage

Sends a new message in selected space.

Properties

NameLabelTypeDescriptionRequired
spaceNameSpace NameSTRINGName of the space in which the message will be sent.true
textMessage TextSTRINGText of the message.true

Example JSON Structure

{
  "label" : "Send Space Message",
  "name" : "sendSpaceMessage",
  "parameters" : {
    "spaceName" : "",
    "text" : ""
  },
  "type" : "googleChat/v1/sendSpaceMessage"
}

Output

Type: OBJECT

Properties

NameTypeDescription
nameSTRINGName of the message that was sent.
senderOBJECT
Properties {STRING(name), STRING(type)}
Sender of the message.
createTimeSTRINGTime when the message was sent.
textSTRINGText of the message.
threadOBJECT
Properties {STRING(name)}
spaceOBJECT
Properties {STRING(name)}
argumentTextSTRING
formattedTextSTRING

Output Example

{
  "name" : "",
  "sender" : {
    "name" : "",
    "type" : ""
  },
  "createTime" : "",
  "text" : "",
  "thread" : {
    "name" : ""
  },
  "space" : {
    "name" : ""
  },
  "argumentText" : "",
  "formattedText" : ""
}

What to do if your action is not listed here?

If this component doesn't have the action you need, you can use Custom Action to create your own. Custom Actions empower you to define HTTP requests tailored to your specific requirements, allowing for greater flexibility in integrating with external services or APIs.

To create a Custom Action, simply specify the desired HTTP method, path, and any necessary parameters. This way, you can extend the functionality of your component beyond the predefined actions, ensuring that you can meet all your integration needs effectively.


Additional Instructions

How to find Space Name

To retrieve the Space Name, use the Google Chat API spaces.list method. Its endpoint is GET https://chat.googleapis.com/v1/spaces.

Troubleshooting

Access Blocked: Verification Process Not Completed

Documentation for how to add a test user can be found here

How is this guide?

Last updated on

On this page