• Stars
    star
    454
  • Rank 94,151 (Top 2 %)
  • Language
    JavaScript
  • License
    Apache License 2.0
  • Created over 6 years ago
  • Updated 2 months ago

Reviews

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

Repository Details

Node samples for Google Workspace APIs.

Node.js samples for Google Workspace APIs docs

API Quickstart Snippets
AppsΒ Script Link ---
Calendar Link Link
Classroom Link Link
Drive V3 Link Link
Gmail Link Link
Sheets Link Link
Slides Link Link
Tasks Link ---

Sample Types

Quickstarts

In about five minutes, you'll have a simple Node.js command-line application that makes requests to a Google Workspace API.

Guides

Learn how to use functions within an API, such as creating a new Google Slide to adding values to a Google Spreadsheet.

Other APIs

Admin SDK

Setup

  1. Install Node.js v6.4.0 or greater.
  2. Clone this repository.
  3. Follow the folder README instructions to run and test samples.

Run Snippet Tests

Create a Service Account

Before running tests, create a service account and download application_credentials.json in this directory.

To create a service account, follow these steps:

  1. Navigate to the Google Cloud Console API Dashboard
  2. Enable APIs for products you'd like to test snippets for like Slides or Drive.
  3. Create a service account key under Credentials.
  4. After creating a new JSON Service account key without a role, rename the downloaded file to application_credentials.json and move the file to this directory.

Run tests

In any snippet directory, npm run test.

Lint

Install and run ESLint. Example:

npm run lint apps-script/**/*.js

Some IDEs (like VS Code) will detect these lint errors within the editor.

Node.js Client Library

Google Workspace APIs use the Google API Node.js client library.

Contributing

Contributions welcome! See the Contributing Guide.

More Repositories

1

md2googleslides

Generate Google Slides from markdown
TypeScript
4,435
star
2

apps-script-samples

Apps Script samples for Google Workspace products.
JavaScript
4,355
star
3

apps-script-oauth2

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

python-samples

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

android-samples

Android samples for Google Workspace APIs
Java
629
star
6

google-chat-samples

Chat Bot Samples for Google Chat.
JavaScript
461
star
7

java-samples

β˜• Java samples for Google Workspace APIs.
Java
315
star
8

browser-samples

Web samples for Google Workspace APIs
HTML
313
star
9

solutions

Community contributed solutions for Google Workspace
JavaScript
296
star
10

php-samples

PHP samples for Google Workspace APIs
PHP
283
star
11

add-ons-samples

Sample Google Workspace Add-ons
JavaScript
263
star
12

drive-quickeditors

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

go-samples

Go samples for Google Workspace APIs
Go
209
star
14

drive-utils

Google Drive API utility functions.
JavaScript
188
star
15

dotnet-samples

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

sheets-api-codelab

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

apps-script-oauth1

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

gmail-add-on-codelab

JavaScript
119
star
19

ruby-samples

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

apps-script-intro-codelab

JavaScript
56
star
21

hangouts-chat-apps-script-codelab

JavaScript
55
star
22

cloud-search-samples

Samples for Google Cloud Search
Java
51
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
40
star
24

gsuite-apis-intro

Python
30
star
25

chat-framework-nodejs

TypeScript
28
star
26

hubot-google-hangouts-chat

Hubot adapter for Google Chat.
JavaScript
23
star
27

google-docs-hast

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

slides-api

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

awesome-workspace

Awesome list for Google Workspace.
TypeScript
17
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
17
star
31

workspace-guardrails-ps-ca

16
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
16
star
33

ios-samples

iOS samples for Google Workspace APIs
Objective-C
13
star
34

appointment-scheduler-codelab

JavaScript
13
star
35

slides-advisor-add-on

JavaScript
11
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
8
star
38

docs-transcript-codelab

Java
7
star
39

python-oauth-token-manager

Python
5
star
40

.allstar

4
star
41

group-based-role-assignment-migration-util

Python
2
star
42

oneroster-integration-conformance-tests

Jupyter Notebook
2
star
43

python-calendar-insights-demo

Python
1
star