Documentation Index
Fetch the complete documentation index at: https://docs.archetypeai.app/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Both Google Sheets integration methods require OAuth 2.0 credentials to authenticate with the Google Sheets API. This guide walks through the one-time setup process.Prerequisites
- Google account with access to Google Cloud Console
- Admin permissions to create a new project or access to an existing project
Configuration Steps
Step 1: Enable Google Sheets API
- Navigate to Google Cloud Console
- Select an existing project or create a new one using the project dropdown
- In the search bar, type “Google Sheets API”
- Select the Google Sheets API from the results
- Click Enable to activate the API for your project
Step 2: Create OAuth 2.0 Credentials
Configure OAuth Consent Screen
- In the left sidebar, navigate to APIs & Services → Credentials
- Click + CREATE CREDENTIALS → OAuth client ID
- If prompted, configure the OAuth consent screen first:
- User Type: Select External (unless using Google Workspace)
- App Information:
- App name: “Newton Sheets Integration” (or your preferred name)
- User support email: Your email address
- Developer contact: Your email address
- Scopes: No additional scopes needed (defaults are sufficient)
- Test users: Add your email address
- Click Save and Continue through each section
Generate Client ID
- Return to Credentials → + CREATE CREDENTIALS → OAuth client ID
- Application type: Select Desktop app
- Name: “Newton Demo Client” (or your preferred identifier)
- Click Create
Step 3: Download and Install Credentials
- In the OAuth 2.0 Client IDs list, locate your newly created client
- Click the Download button (⬇) to download the JSON file
- Rename the downloaded file to exactly:
credentials.json - Place the file in the appropriate directories:
- For File-to-Sheets:
newton-demos/spreadsheet-analysis/cl-to-sheets - For Spreadsheet-Driven:
newton-demos/spreadsheet-analysis/spreadsheet-driven
- For File-to-Sheets:
Both integration methods require their own copy of
credentials.json in their respective directories.Step 4: First-Time Authentication
When you run either integration script for the first time:- Your default browser will open automatically
- Sign in with your Google account
- Review the permissions request
- Click Allow to grant access
- The script creates
token.picklefor future authentication
The
token.pickle file stores your authentication token locally. Keep this file secure and do not commit it to version control.Security Best Practices
File Management
- Add
credentials.jsonandtoken.pickleto.gitignore - Never commit authentication files to version control