dusk botintegrationsgoogle sheets
replace specific google sheets cell values with ai
fix the opening hours without retyping the weekly sheet. give the bot the spreadsheet, tab and replacement values.
it can update a known block while leaving the rest alone. but the write stretches to fit incoming data. ask for old values, replacements and their row and column counts before it writes.

what it does
a tidy preview saves a messy repair. the bot writes your values and adjusts the target to fit them. count the incoming rows and columns, not just the range you named. too much data can overwrite nearby cells or add rows.
give the file link and actual tab name. choose literal text to keep values as written: otherwise an equals sign can start a formula, and 01/02 can become a date.
when you would use it
- change seasonal opening hours. replace the agreed block after checking the old schedule.
- fix one customer name. confirm the row before correcting the spelling.
- fill the weekly report. write agreed totals while leaving formula columns alone.
- bring statuses up to date. replace only the cells that your reviewed checklist covers.
try it
paste this into a chat with your bot
each wednesday at 09:25, read the 'current opening hours' file in the pebblewick museum project folder. compare it with visitor hours, b4:c6, in the museum spreadsheet.
- show the old and proposed values here
- accept exactly three rows and two columns, as literal text
- ask me before you change anything, then report the saved cells
if values match already, stay quiet. stop if the new values don't fit or the target contains formulas. never write outside that block or add rows.- when
- wednesdays at 09:25
- needs
- the project folder for reading; google sheets read and write, with tab lookup, range reads and values updates
what comes back looks like this (an example)
visitor hours, b4:c6: proposed change
- friday: 10:00-17:00
- saturday: 10:00-18:00
- sunday: 11:00-16:00
three rows, two columns, literal text. clara must review before the write. no extra rows.set it up
- connect the spreadsheet. allow read and write for the required actions. give the bot the source folder too.
- confirm the actual tab. paste the file link and ask for tab names before reading the cells.
- preview both sides. state the range, row count, column count and literal-text choice. ask before overwriting.
- open one saved update. compare it with the sheet. pause the routine when the seasonal schedule ends.
what it needs from you
| input | required | what it is |
|---|---|---|
range | yes | The A1 notation of the range to update values in (e.g., 'Sheet1!A1:C2', 'MySheet!C:C', or 'A1:D5'). |
values | yes | The data to write. |
spreadsheet_id | yes | The unique identifier of the Google Spreadsheet to update. |
value_input_option | yes | How the input data should be interpreted. |
major_dimension | no | The major dimension of the values. |
auto_expand_sheet | no | If True (default), automatically expands the sheet's dimensions (adds columns/rows) when the target range exceeds the current grid limits. |
from composio's catalog for Google Sheets (action GOOGLESHEETS_VALUES_UPDATE, read 12 november 20264). your bot fills these in from what you tell it.
how dusk bot handles it
dusk bot counts Update spreadsheet values as a change: it alters something in Google Sheets, and the sending setting does not cover it. a bot you allow only to read can never call it.
the permissions Google Sheets asks for to run it: drive, drive.file, spreadsheets.
where it stops
- writes can spill into nearby cells. preventing added rows stops growth, not overwrites inside the existing sheet.
- a guessed default tab can select the first tab. read the real name instead of assuming sheet1.
- an equals sign can become a formula. choose literal input for text that must stay text.
- updates replace formulas too. read the target cells before approving the write.
what it looks like
invented opening-hours edit for a made-up manager
before
clara has three rows of hours to replace in b4:c6. the incoming file has four rows.after the bot
the bot stops: four rows will not fit your three-row block. choose which row to leave out.
no cells changed.an illustration with made-up names and numbers.
try it in 2 minutes
- pick a small block with no formulas
- ask the bot to read its current values
- give replacements with matching rows and columns
- review the preview before any write
before the cells change
- the tab name matches the actual file
- the data fits exactly three rows and two columns
- the destination contains no formulas to preserve
- literal text is the intended format
mistakes people make
trusting b4:c6 to contain any amount of data
count the incoming rows and columns. extra values can reach neighbouring cells.
turning off added rows and calling it safe
inspect nearby cells too. existing cells can still be overwritten.
questions
is a small range enough to stop a larger overwrite?
no. the write stretches to fit the values. count the rows and columns going in.
how do i stop a code becoming a date or formula?
ask for literal text, using raw input. the other mode interprets values like typing them into sheets.
sources
drafted with ai help from the dusk bot docs and the sources listed on this page, then checked against them. if something here is wrong or out of date, write to [email protected].
a google sheets bot with a clear range to work in
add new records to the end of a google sheets table
match google sheets rows by a unique number before updating them
claude connectors: connect the job you actually need
match weekly receipts to the sheet you already keep
copy one google sheets tab into another spreadsheet