• Stars
    star
    494
  • Rank 89,130 (Top 2 %)
  • Language
    JavaScript
  • License
    Apache License 2.0
  • Created almost 7 years ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Google Chat app samples.

Google Chat code samples

This repository contains the code samples for Google Chat apps. There are folders of samples dependent on language and platform. Generally the Java and Python samples live in each respective directory, but JavaScript has multiple form factors (client-side, server-side/Node.js, Google Apps Script [also server side], and Cloud Functions [GCP or Firebase]).

Which JS platform you choose depends on the type of app application you're using/writing. Apps Script features tighter integration with Google Workspace data and applications, while Google Cloud Functions has a tighter integration with Google Cloud Platform services and APIs. Finally, mobile apps or mobile web apps are more likely to want to take advantage of Cloud Functions for Firebase. It is also generally straightforward to port from one JS implementation to another, for example, to Node.js.

In each folder, you can find a language-specific implementation of the one or more of the following code samples:

  • Basic app: This app receives event notices and messages from Google Chat and responds synchronously with simple text responses. This sample demonstrates how to create an HTTP endpoint app using Google App Engine.
  • Basic async app: This app receives event notices and messages from Google Chat and responds asynchronously with simple text responses. The responses will appear in the same thread that raised the original event or message. This sample is an HTTP endpoint app built upon Google App Engine.
  • Pub/Sub app: This app uses Google Cloud Pub/Sub to receive messages from Google Chat. The app responds back to Google Chat asynchronously.
  • Card app: This app receives event notices and messages from Google Chat and responds synchronously with a card-formatted response. This sample is an HTTP endpoint app built upon Google App Engine.
  • Vote app: This app demonstrates updating interactive cards by providing a platform whereby users can vote on topics, such as who can do lunch today, who wants to play ball at lunch, etc. Samples can feature images or be text-only.

For additional details about how to set up and run each sample, consult the README file included with the sample.

Note: The Google Chat application, and the developer platform, are only available to Google Workspace accounts. You will not be able to develop or test a app with an @gmail.com account.

Contributing changes

See CONTRIBUTING.md.

Licensing

This is not an official product.

This library is licensed under Apache 2.0. Full license text is available in LICENSE.

More Repositories

1

apps-script-samples

Apps Script samples for Google Workspace products.
JavaScript
4,536
star
2

md2googleslides

Generate Google Slides from markdown
TypeScript
4,479
star
3

apps-script-oauth2

An OAuth2 library for Google Apps Script.
JavaScript
1,546
star
4

python-samples

🐍 Python samples for Google Workspace APIs
Python
1,203
star
5

android-samples

Android samples for Google Workspace APIs
Java
636
star
6

node-samples

Node samples for Google Workspace APIs.
JavaScript
467
star
7

browser-samples

Web samples for Google Workspace APIs
HTML
332
star
8

java-samples

β˜• Java samples for Google Workspace APIs.
Java
324
star
9

solutions

Community contributed solutions for Google Workspace
JavaScript
299
star
10

php-samples

PHP samples for Google Workspace APIs
PHP
290
star
11

add-ons-samples

Sample Google Workspace Add-ons
JavaScript
273
star
12

go-samples

Go samples for Google Workspace APIs
Go
214
star
13

drive-quickeditors

A text editor for Android, iOS, and web illustrating how to open and save files with the Google Drive API
Objective-C
213
star
14

drive-utils

Google Drive API utility functions.
JavaScript
189
star
15

dotnet-samples

.NET samples for Google Workspace APIs
C#
168
star
16

sheets-api-codelab

Use Google Sheets as your application's reporting tool
JavaScript
152
star
17

apps-script-oauth1

An OAuth1 library for Google Apps Script.
JavaScript
138
star
18

gmail-add-on-codelab

JavaScript
122
star
19

ruby-samples

πŸ’Ž Ruby samples for Google Workspace APIs
Ruby
79
star
20

apps-script-intro-codelab

JavaScript
59
star
21

cloud-search-samples

Samples for Google Cloud Search
Java
54
star
22

hangouts-chat-apps-script-codelab

JavaScript
54
star
23

ml-integration-samples

This repo contains a collection of code samples and utilities for integrating Google Cloud AI & ML into Google Workspace.
JavaScript
42
star
24

gsuite-apis-intro

Python
32
star
25

chat-framework-nodejs

TypeScript
29
star
26

google-docs-hast

Converts the JSON representation of a Google Docs document into an HTML abstract syntax tree (HAST).
TypeScript
26
star
27

hubot-google-hangouts-chat

Hubot adapter for Google Chat.
JavaScript
24
star
28

awesome-workspace

Awesome list for Google Workspace.
TypeScript
23
star
29

slides-api

Learn How to Use the Google Slides API
JavaScript
22
star
30

gws-genai-addon-sample

A sample Google Workspace add-on for Gmail and Google Drive using Node.js and demonstrating how to use various Generative AI APIs
JavaScript
21
star
31

workspace-guardrails-ps-ca

18
star
32

gws-odo-addon

"Odo" is a Workspace Add-on that lets anyone easily demonstrate the capabilities of Workspace integrations for their customers, all without coding. Simply set the name + logo of the customer you are presenting to, configure Odo's behavior, and do a quick demo. This will help your customers visualize what Workspace extensibility can do for them.
JavaScript
18
star
33

slides-advisor-add-on

JavaScript
16
star
34

ios-samples

iOS samples for Google Workspace APIs
Objective-C
14
star
35

appointment-scheduler-codelab

JavaScript
13
star
36

.github

10
star
37

redriveapp

ReDriveApp (short for "Recommended" or "Replacement" DriveApp). AppsScript class that provides equivalent methods offered by the built-in DriveApp, but that does not require use of full '/drive' OAuth scope (which is a "Restricted" scope"). Instead, uses only these Recommended (non-sensitive) and/or Sensitive scopes.
JavaScript
10
star
38

docs-transcript-codelab

Java
7
star
39

python-oauth-token-manager

Python
6
star
40

meet

TypeScript
5
star
41

drive-picker-element

A web component for Google Drive Picker
TypeScript
4
star
42

.allstar

4
star
43

python-classroom-addon

Reference implementation of a Google Classroom add-on, written in Python and broken into steps corresponding to a walkthrough tutorial https://developers.google.com/classroom/add-ons/walkthroughs/walkthroughs-overview.
Python
3
star
44

oneroster-integration-conformance-tests

Jupyter Notebook
3
star
45

java-classroom-addon

About Reference implementation of a Google Classroom add-on, written in Java and broken into steps corresponding to a walkthrough tutorial https://developers.google.com/classroom/add-ons/walkthroughs/walkthroughs-overview.
Java
2
star
46

group-based-role-assignment-migration-util

Python
2
star
47

python-calendar-insights-demo

Python
2
star
48

drivetocloudbot

Python
1
star
49

drive-cse-upload

Python
1
star