dusk botintegrationsgoogle sheets
sort a google sheets range without splitting records
put dispatch in due-date order, with every customer still beside their own job. the bot can sort a google sheets range by several columns.
later rules break ties, such as customer name after due date. include the full width of each record, with headers and totals outside. ask it to show the range and wait before reordering.

what it does
a date must travel with its customer and quantity. sorting one column can separate values that belong together. give the bot the sheet link, tab and full record width.
keep headers and totals outside the range. name the last row or ask the bot to find where records end.
put rules in order: due date first, customer second. the second rule only breaks ties in the first.
when you would use it
- put dispatch in order. sort by due date, then customer for matching dates.
- find attendees faster. alphabetise complete records while leaving the header above.
- group the job list. sort by stage, then scheduled date within each stage.
try it
paste this into a chat with your bot
every thursday at 16:30, inspect the dispatch tab in the ottervale joinery spreadsheet. find all current job records and include every record column. exclude the header and totals. propose sorting by due date ascending, then customer ascending. show the exact range and both rules here. ask me before you change anything and wait for agreement. sort only that range, then confirm completion here. never sort one record column on its own.- when
- thursdays at 16:30
- needs
- google sheets read and write for inspecting and sorting the agreed range
what comes back looks like this (an example)
ottervale dispatch sort proposal
records: dispatch a2:f24
first: due date, earliest first
then: customer, a to z
header and totals excluded. waiting before reordering.set it up
- limit the access. connect sheets with read and write for inspection and sorting.
- describe the table. include its link, tab, full record width and where records end.
- choose rule priority. name directions and tie-breakers. require a range preview and your agreement.
- follow a familiar customer. their date and quantity should travel with them. pause the routine if the layout changes.
what it needs from you
| input | required | what it is |
|---|---|---|
range | yes | The range to sort. |
sortSpecs | yes | The sort order per column. |
spreadsheet_id | yes | The ID of the spreadsheet. |
responseRanges | no | Limits the ranges included in the response spreadsheet. |
responseIncludeGridData | no | True if grid data should be returned. |
includeSpreadsheetInResponse | no | Determines if the updated spreadsheet resource appears in the response. |
from composio's catalog for Google Sheets (action GOOGLESHEETS_SORT_RANGE, read 12 november 20264). your bot fills these in from what you tell it.
how dusk bot handles it
dusk bot counts Sort Range 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: spreadsheets, drive.file, drive.
where it stops
- everything in the range moves. include full rows of record data and leave headers and totals out.
- rule order changes the answer. customer first gives a different queue from due date first.
- follow the data after sorting. open a familiar customer’s row and confirm its date still belongs to it.
what it looks like
an invented dispatch example
before
otto sorts only the due-date column. the dates no longer sit beside their own customers.after the bot
the proposed range covers dispatch a2:f24, with the header and totals outside. each complete record moves together.an illustration with made-up names and numbers.
try it in 2 minutes
- paste the sheet link
- ask for the full record range without headers or totals
- name the first sort rule and tie-breaker
- review that plan before sorting
quick checklist
- full record width included
- header and totals excluded
- sort directions and priority clear
- review required before reordering
mistakes people make
sorting only the date column
include the customer, quantity and every other record column.
letting the header join the sort
preview the first and last rows before allowing the change.
questions
can it sort by two columns?
yes. put the rules in priority order. the second breaks ties where the first column has matching values.
will sorting wait for me to approve it?
only if you tell the bot to wait. the sending setting does not pause this edit. include an ask-before-changing instruction.
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].
ask about the values in a specific google sheets range
show the google sheets rows that match your question
a google sheets bot with a clear range to work in
add new records to the end of a google sheets table
copy one google sheets tab into another spreadsheet
start a named google spreadsheet where it belongs