List Google Sheet pages?

i want a node or nodes to get all id’s of my sheet pages(or tabs whoever calls them whatever)

image

i had the same issue with google document that i managed to figure out using custom node and documentation on google doc, but documentation on google sheets lacks this, the only way i can see to solve this is requesting the whole page but it is … in html. and i reeeeeallllyyyy dont want to work with it.

any ideas ? ty

the basic idea is OUR people use one google doc for multiple tasks, and they might add or delete sheets when they are done, so to assist them automatically i need that functionality i guess.

switch to an HTTP Request node (use your existing Google Sheets OAuth creds) and hit this URL: https://sheets.googleapis.com/v4/spreadsheets/YOUR_SPREADSHEET_ID

make sure to add a query parameter: fields = sheets.properties

that tells Google to only return the tab names and IDs instead of the whole file. which returns a clean JSON array.

5 Likes

GOAT, works
now i can automate it. sheet ID can be used in regular google sheet node in n8n. ty so much

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.