append_row from yesterday needs a sheet ID. But what if you don't remember the exact ID? Your Drive has 15 spreadsheets and the research one is buried in a shared folder. How do you find it?
read_range used the sheet ID directly. There must be a search action — GOOGLESHEETS_SEARCH_SPREADSHEETS — that takes a name query and returns the matching sheets.
Exactly. GOOGLESHEETS_SEARCH_SPREADSHEETS takes a query string — the sheet name or part of it. Returns a list of matching spreadsheet metadata dicts, each with an id and name:
result = toolset.execute_action(
Action.GOOGLESHEETS_SEARCH_SPREADSHEETS,
{"query": "research progress"}
)
sheets = result.get("files", [])
for sheet in sheets:
print(f"{sheet.get('name')}: {sheet.get('id')}")files — not spreadsheets? Google Sheets search returns files?
Sheets are Google Drive files under the hood. The Composio search action surfaces them through Drive's file API — so the key is "files", not "spreadsheets". Print the raw result once if you're unsure of the key name:
def search_sheets(query: str) -> list:
result = toolset.execute_action(
Action.GOOGLESHEETS_SEARCH_SPREADSHEETS,
{"query": query}
)
sheets = result.get("files", [])
print(f"Found {len(sheets)} spreadsheets matching '{query}'")
return sheetsSearch once by name, get the ID, then pass it to read_range or append_row. The discovery step is now programmable.
Your Drive is now a queryable index. No more scrolling to find the research-progress Sheet.
read_range taught me the Sheets data shape. search_sheets gives me the discovery step that makes read_range useful for any sheet. The pattern adds up.
Search results depend on Drive permissions — files not shared with you won't appear. If a lab-group shared Sheet doesn't show up, check that it's been shared to your account or added to your Drive shortcuts.
Param: query — search string for the spreadsheet name
{"files": [{"id": "...", "name": "Research Progress 2026"}, ...]}
Note: key is "files" (Drive API), not "spreadsheets".
search_sheets(query) → get ID → read_range(id, range) or append_row(id, range, values)
The search is a partial match — "Research" returns all spreadsheets with "Research" in the name. Use a specific enough query to get one result, or slice with files[0] and verify the name before proceeding.
append_row from yesterday needs a sheet ID. But what if you don't remember the exact ID? Your Drive has 15 spreadsheets and the research one is buried in a shared folder. How do you find it?
read_range used the sheet ID directly. There must be a search action — GOOGLESHEETS_SEARCH_SPREADSHEETS — that takes a name query and returns the matching sheets.
Exactly. GOOGLESHEETS_SEARCH_SPREADSHEETS takes a query string — the sheet name or part of it. Returns a list of matching spreadsheet metadata dicts, each with an id and name:
result = toolset.execute_action(
Action.GOOGLESHEETS_SEARCH_SPREADSHEETS,
{"query": "research progress"}
)
sheets = result.get("files", [])
for sheet in sheets:
print(f"{sheet.get('name')}: {sheet.get('id')}")files — not spreadsheets? Google Sheets search returns files?
Sheets are Google Drive files under the hood. The Composio search action surfaces them through Drive's file API — so the key is "files", not "spreadsheets". Print the raw result once if you're unsure of the key name:
def search_sheets(query: str) -> list:
result = toolset.execute_action(
Action.GOOGLESHEETS_SEARCH_SPREADSHEETS,
{"query": query}
)
sheets = result.get("files", [])
print(f"Found {len(sheets)} spreadsheets matching '{query}'")
return sheetsSearch once by name, get the ID, then pass it to read_range or append_row. The discovery step is now programmable.
Your Drive is now a queryable index. No more scrolling to find the research-progress Sheet.
read_range taught me the Sheets data shape. search_sheets gives me the discovery step that makes read_range useful for any sheet. The pattern adds up.
Search results depend on Drive permissions — files not shared with you won't appear. If a lab-group shared Sheet doesn't show up, check that it's been shared to your account or added to your Drive shortcuts.
Param: query — search string for the spreadsheet name
{"files": [{"id": "...", "name": "Research Progress 2026"}, ...]}
Note: key is "files" (Drive API), not "spreadsheets".
search_sheets(query) → get ID → read_range(id, range) or append_row(id, range, values)
The search is a partial match — "Research" returns all spreadsheets with "Research" in the name. Use a specific enough query to get one result, or slice with files[0] and verify the name before proceeding.
Create a free account to get started. Paid plans unlock all tracks.