Setting Up the Integration
Step 1: Create a Google Cloud Project
Section titled “Step 1: Create a Google Cloud Project”- Go to the Google Cloud Console
- Click the project dropdown and select New Project
- Name it (e.g., “NodeKAT”) and click Create
- Select the new project from the project dropdown
Step 2: Enable the Drive API
Section titled “Step 2: Enable the Drive API”- In your project, go to APIs & Services → Library
- Search for Google Drive API
- Click on it and press Enable
Step 3: Configure the OAuth Consent Screen
Section titled “Step 3: Configure the OAuth Consent Screen”- Go to APIs & Services → OAuth consent screen
- Choose External (or Internal if you have a Google Workspace) and click Create
- Fill in the app name (e.g., “NodeKAT”) and your support email
- Click Save and Continue through the remaining screens
- Under Scopes, add the Drive scope:
https://www.googleapis.com/auth/drive.readonly
This is the only scope NodeKAT uses — read-only access to Drive files.
Test user note: If your consent screen is set to External and you haven’t published the app, add the Google account that will authorize the integration as a Test user under Audience so the authorization flow works.
Step 4: Create an OAuth Client
Section titled “Step 4: Create an OAuth Client”- Go to APIs & Services → Credentials
- Click Create Credentials → OAuth client ID
- Choose Desktop app as the application type
- Name it (e.g., “NodeKAT Desktop”) and click Create
- Download the
credentials.jsonfile
Step 5: Authorize NodeKAT and Generate the Token File
Section titled “Step 5: Authorize NodeKAT and Generate the Token File”The credentials.json file must be exchanged for an authorized user token file (token.json). This requires a one-time authorization with the Google account that owns (or can access) the files you want to extract:
- Run the Google OAuth authorization flow using the downloaded
credentials.json - Sign in with the Google account that has access to the target files
- Accept the read-only Drive permissions prompt
- Save the resulting authorized token file as
token.json
The token file grants NodeKAT read access to the files that account can see. Treat it as sensitive — it is the equivalent of a password for your Drive content.
Step 6: Optional — Limit Extraction Scope
Section titled “Step 6: Optional — Limit Extraction Scope”By default, NodeKAT extracts all files accessible to the authorized account. To limit extraction, provide the relevant IDs to your NodeKAT administrator:
| Scope | Description |
|---|---|
| Parent folder IDs | Extract only from specific folders (including all nested subfolders) |
| Shared drive ID | Extract only from a specific shared drive |
If neither is provided, NodeKAT syncs all accessible files.
Next Steps
Section titled “Next Steps”Provide the following credentials to your NodeKAT administrator:
- Authorized token file (
GOOGLE_CREDENTIALS_FILE, e.g.,token.json) — required - Parent folder IDs or shared drive ID — optional, to limit extraction scope
Your administrator will configure NodeKAT to use these credentials.
Authentication Architecture
Section titled “Authentication Architecture”NodeKAT authenticates to the Google Drive API using the authorized user token:
| Required | Yes |
| Used For | File listing and download (Docs, Sheets, Slides, PDFs) |
| Access Scope | drive.readonly — read-only, cannot create, edit, or delete files |
| Inbound Access | None — NodeKAT only makes outbound API calls to Google |
| Supported Files | Google Docs, Sheets, Slides, and PDFs |