{"_id":"@avoylenko/node-red-contrib-google-sheets","name":"@avoylenko/node-red-contrib-google-sheets","dist-tags":{"latest":"2.0.0"},"versions":{"2.0.0":{"name":"@avoylenko/node-red-contrib-google-sheets","version":"2.0.0","description":"Node-RED node to get, update, append, and clear google sheets.","author":{"name":"Anton Voylenko","email":"anton.voylenko@gmail.com"},"license":"MIT","homepage":"https://github.com/avoylenko/node-red-contrib-google-sheets","repository":{"type":"git","url":"git+https://github.com/avoylenko/node-red-contrib-google-sheets.git"},"engines":{"node":">=18.0.0"},"keywords":["node-red","gsuite","google sheets","gsheet","googleapis"],"node-red":{"nodes":{"gsheet":"gsheet.js"},"version":">=1.0.0"},"dependencies":{"@googleapis/sheets":"^13.0.2"},"gitHead":"df323c02395d9169f2d0f8409ee3083b12bcd7ef","_id":"@avoylenko/node-red-contrib-google-sheets@2.0.0","bugs":{"url":"https://github.com/avoylenko/node-red-contrib-google-sheets/issues"},"_nodeVersion":"24.14.1","_npmVersion":"11.11.0","dist":{"integrity":"sha512-PO9i8A0PwuBi26CLSQDMtQW+9D+WDVSbtbUX9VRDFzk/ttAGfhauMmS8Zq6+hVB0ZXND3idMzNC5/tCSvjnBkg==","shasum":"0e6296bd07ab8c37dee89a8fb822b9efda4e897f","tarball":"https://registry.npmjs.org/@avoylenko/node-red-contrib-google-sheets/-/node-red-contrib-google-sheets-2.0.0.tgz","fileCount":6,"unpackedSize":34346,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC9jnTKAHiZrAIJUeH6RWpl0tYdnat79BKxf11JwAUpLwIgEGTA8pTeCX69bqBNvt9S5lOgaPHoTX66xrnPyc8gqOY="}]},"_npmUser":{"name":"avoylenko","email":"anton.voylenko@gmail.com"},"directories":{},"maintainers":[{"name":"avoylenko","email":"anton.voylenko@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/node-red-contrib-google-sheets_2.0.0_1785236258553_0.9468868421992578"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-28T10:57:38.422Z","2.0.0":"2026-07-28T10:57:38.685Z","modified":"2026-07-28T10:57:38.864Z"},"maintainers":[{"name":"avoylenko","email":"anton.voylenko@gmail.com"}],"description":"Node-RED node to get, update, append, and clear google sheets.","homepage":"https://github.com/avoylenko/node-red-contrib-google-sheets","keywords":["node-red","gsuite","google sheets","gsheet","googleapis"],"repository":{"type":"git","url":"git+https://github.com/avoylenko/node-red-contrib-google-sheets.git"},"author":{"name":"Anton Voylenko","email":"anton.voylenko@gmail.com"},"bugs":{"url":"https://github.com/avoylenko/node-red-contrib-google-sheets/issues"},"license":"MIT","readme":"# node-red-contrib-google-sheets\n\nA Node-RED node to get, update, append, and clear cell values in a Google Sheet using a Google service account.\n\n## Install\n\nInstall from the Node-RED palette manager (Menu → Manage palette → Install), or from the command line inside your Node-RED user directory (typically `~/.node-red`):\n\n```\nnpm install @avoylenko/node-red-contrib-google-sheets\n```\n\n### Requirements\n\n- Node.js >= 18\n- Node-RED >= 1.0\n\n## Auth\n\nTo set up auth this node uses a Google service account:\n\n1. Create a new service account from [this page](https://console.cloud.google.com/iam-admin/serviceaccounts).\n2. Download a JSON credentials key for the service account.\n3. Enable the [Google Sheets API](https://console.cloud.google.com/apis/library/sheets.googleapis.com) for the project.\n4. Paste the entire contents of the JSON key file into the Credentials field of the node's config.\n5. Share your sheet with the email address of the service account, e.g. `nodered@nodered-12345.iam.gserviceaccount.com`. Viewer access is enough for Get Cells; Append Row, Update Cells, and Clear Cells need Editor access.\n\nThe node only requests the `https://www.googleapis.com/auth/spreadsheets` OAuth scope.\n\n## Sheets\n\nThe sheet ID can be found in the URL of your Google Sheet, for example in\n\n`https://docs.google.com/spreadsheets/d/1UuVIH2O38XK0TfPMGHk0HG_ixGLtLk6WoBKh4YSrDm4/edit#gid=0`\n\nthe ID would be `1UuVIH2O38XK0TfPMGHk0HG_ixGLtLk6WoBKh4YSrDm4`.\n\n## Cells\n\nGoogle Sheets uses A1 notation to reference a tab and a range of cells of the worksheet.\n\nThe format is `Sheet1!A1:C3`, where `Sheet1` is the sheet (tab) name, followed by a `!`, then the grid of the first cell e.g. `A1`, then a `:`, and finally the grid of the last cell e.g. `C3`.\n\nA range of cells can be part of a column (`A1:A5`), part of a row (`A1:E1`), or a block (`A1:C3`). A sheet name on its own (`Sheet1`) refers to all of its cells.\n\n## Methods\n\n### Get Cells\n\nReads the given range and sends the values as `msg.payload` — an array of rows, where each row is an array of cell values. An empty range produces `[]`. Ticking the **Flatten Matrix** option flattens the result by one level, which is convenient when reading a single row or column.\n\n### Append Row\n\nAppends `msg.payload` as new row(s) after the last row with data in the given range. On output, `msg.payload` contains a summary of the change (`updatedRange`, `updatedRows`, `updatedCells`, ...).\n\n### Update Cells\n\nWrites `msg.payload` to the given range, overwriting existing values. On output, `msg.payload` contains a summary of the change (`updatedRange`, `updatedRows`, `updatedCells`, ...).\n\n### Clear Cells\n\nClears all values from the given range; `msg.payload` is not used as input. On output, `msg.payload` contains the `spreadsheetId` and the `clearedRange`.\n\n### Input payload for Append Row and Update Cells\n\n`msg.payload` can be:\n\n- a single value — written to a single cell\n- an array of values — written as one row\n- an array of arrays — written as multiple rows (one inner array per row)\n\nValues are written with the `USER_ENTERED` input option: they are parsed as if typed into the sheet by a user, so numbers, dates, and formulas such as `=SUM(A1:A5)` are interpreted.\n\n## Message properties\n\n| Property | Description |\n| --- | --- |\n| `msg.payload` | Data to write for Append Row / Update Cells; carries the result on output. |\n| `msg.sheet` | Spreadsheet ID, used when the node's Spreadsheet ID field is empty. |\n| `msg.cells` | Range in A1 notation, used when the node's Cells field is empty. |\n| `msg.topic` | Legacy alternative to `msg.cells`; may be removed in a future release. |\n\nValues configured in the node take precedence over message properties.\n\n## Example flow\n\nAn example flow demonstrating all four methods ships with the package: Menu → Import → Examples → @avoylenko/node-red-contrib-google-sheets.\n\n## Changes in 2.0\n\n- Published under a new name: `@avoylenko/node-red-contrib-google-sheets`. The original `node-red-contrib-google-sheets` package remains at 1.1.2. Uninstall it before installing this one — both register the same `GSheet`/`gauth` node types, and Node-RED cannot load two packages that provide the same types.\n- Requires Node.js >= 18.\n- Migrated from the monolithic `googleapis` package to the much smaller `@googleapis/sheets` client.\n- The Google Drive OAuth scope is no longer requested; only the `spreadsheets` scope is used.\n- Get Cells now returns `[]` instead of failing when the range contains no values.\n- No changes to node configuration or message properties — existing flows keep working.\n\n## Credits & license\n\nOriginally created by [Sam Machin](https://github.com/sammachin), now maintained by [Anton Voylenko](https://github.com/avoylenko). Licensed under the MIT license.\n","readmeFilename":"README.md","_rev":"1-24fa169514fb412b42d23fa9c96bcab5"}