ba5c2c5821f252a013789b471140e37bbb1df6a4
Google Sheets Rate Assistant
This Node.js application pulls configured Google Sheets documents and exports them as CSV files.
Setup
- Copy
config.example.jsontoconfig.json. - Configure authentication in
config.json— choose one of:
- Service account: place your service account JSON in
credentials.jsonand setcredentialsPath, or add one or more entries to theserviceAccountsarray (each entry may be a path string or an object withpath/credentialsPathand optionalrateLimitPerMinute). - API keys: add one or more API keys to the
apiKeysarray inconfig.json(each entry may be a string or an object withkeyand optionalrateLimitPerMinute).
- Install dependencies:
npm install
- Run the application:
node index.js
Setup Guides
For detailed instructions on authentication methods, please refer to the following guides:
Sample config.json
Here is an example config.json matching the repository's config.example.json:
{
"apiKeys": [
{ "key": "YOUR_API_KEY_1", "rateLimitPerMinute": 50 },
{ "key": "YOUR_API_KEY_2", "rateLimitPerMinute": 50 }
],
"serviceAccounts": [
{ "path": "credentials.json", "rateLimitPerMinute": 50 }
],
"documents": [
{
"documentId": "YOUR_SPREADSHEET_ID",
"outputDir": "output/your-document",
"sheets": [
{ "name": "Sheet1", "outputFilename": "sheet1.csv" }
]
}
]
}
Rate limiting
The app enforces a maximum of rateLimitPerMinute requests per minute to avoid exceeding API limits.
Output
CSV files are written to output by default. Individual documents may override this with their own outputDir in config.json.