To let a Cosmic agent create and update a Google Sheet for a team, Cosmic’s tutorial uses a Google Cloud service account, the Google Drive and Sheets APIs, and a Workspace Shared Drive. The agent sends HTTPS requests to those APIs; it needs credentials stored securely, a way to obtain a valid access token, and saved API endpoints for the operations it will perform.
What you need before setup
- A Google Cloud project with both the Google Sheets API and Google Drive API enabled.
- A service account and its JSON key. Treat the key as a password and store it as a secret rather than embedding it in prompts or agent configuration.
- A Google Workspace Shared Drive that the service account can access. Add the service account’s email as a drive member and choose a role that permits the intended actions.
- A Cosmic agent with API-request capability, a stored credential secret, and saved endpoints for the Google API calls in the workflow.
The steps below follow Cosmic’s vendor tutorial by Tony Spiro, published September 25, 2026. They describe that tutorial’s implementation, not independent verification of every API detail. The tutorial characterizes the approach this way: “There is no Cosmic-side Google integration doing anything clever underneath.” Source: Cosmic tutorial.
As an Amazon Associate I earn from qualifying purchases.
Why create the spreadsheet through Drive
In this workflow, spreadsheet creation and spreadsheet-content operations use different APIs. The tutorial creates the file with the Drive API, then uses the Sheets API to add tabs and read or write cell values. It says a service account has no Drive storage quota of its own, so the spreadsheet should be created in a Shared Drive the account can access, rather than relying on the account to own a file in personal Drive storage.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
The demonstrated Drive request sets the file’s MIME type to Google Sheets, sets the Shared Drive ID as its parent, and includes supportsAllDrives=true. The response contains the spreadsheet file ID, which is then used for later Sheets requests. Ensure the service account has the necessary Shared Drive access; the appropriate role depends on your organization’s permissions policy.
#1 Best Overall
- 【Google Sheet Shortcut】The Large mouse pad with shortcuts specifically designed for Google Sheets, making it easy for you to use Google Docs and improve work efficiency.
- 【HD Printing】Printed with high-tech precision for vibrant colors and sharp details, this mouse pad provides quick access to essential functions—an ideal addition to any workspace
- 【High Quality】Crafted from smooth microfiber cloth, this large gaming mouse pad offers a comfortable surface with reinforced stitched edges to prevent fraying. Its 3mm thickness ensures long-lasting durability
- 【Perfect Fit】Measuring 31.5 x 15.7 inches, this mouse pad offers ample space for your keyboard, mouse, and other accessories—perfect for both work and gaming
- 【Easy Maintain】Simply wipe with a damp cloth to keep your workspace clean and tidy
Configure authentication for the agent
For a walkthrough
The tutorial describes service-account authentication as signing an RS256 JWT and exchanging it for an access token. It says the resulting token lasts one hour. Cosmic’s HTTP-request capability does not itself perform that signing, so the tutorial’s walkthrough approach is to mint a token locally and save it as a secret for the agent to use. This is suitable only while the saved token remains valid.
For a scheduled workflow
A scheduled agent needs a fresh token when the previous one expires. The tutorial suggests putting token signing in a small endpoint controlled by the implementer and having that endpoint return a fresh token. Protect that endpoint and its signing credentials; do not expose them in agent-facing content. The tutorial requests both Sheets and Drive scopes for its workflow. Confirm the current scope and authentication requirements against Google’s official documentation and your organization’s security policies before deployment.
Rank #2
- 【Google Shortcut Keys Mouse Pad 】- Extended Large Keyboard Shortcuts for Google Sheets, Mac Shortcuts,Window Spreadsheet Shortcuts Keys Shortcuts Gaming Keyboard Mouse Pad Mousepad Desk Mat
- 【HD Printing】Printed with high-tech precision for vibrant colors and sharp details, this mouse pad provides quick access to essential functions—an ideal addition to any workspace
- 【High Quality】Crafted from smooth microfiber cloth, this large gaming mouse pad offers a comfortable surface with reinforced stitched edges to prevent fraying. Its 3mm thickness ensures long-lasting durability
- 【Perfect Fit】Measuring 31.5 x 15.7 inches, this mouse pad offers ample space for your keyboard, mouse, and other accessories—perfect for both work and gaming
- 【Easy Maintain】Simply wipe with a damp cloth to keep your workspace clean and tidy
Create the spreadsheet and add tabs
- Use the Drive API to create the file. Set the file type to Google Sheets, specify the Shared Drive ID as the parent, and include
supportsAllDrives=trueas shown in the tutorial. Save the returned file ID for the remaining requests. - Create any additional tabs before writing to them. The tutorial uses the Sheets
batchUpdateendpoint to add tabs. A write to a tab that does not exist will not target the intended location. - Write rows with the Sheets values endpoint. Supply the spreadsheet ID, a range that includes the tab name and cell range, and a two-dimensional array: each inner array represents a row, and its entries represent cells. URL-encode spaces in tab names when constructing the request URL.
For example, a range targeting a tab named “Quarterly Review” must encode the space in the tab name in the URL. Keep the range aligned with the tab and cells the agent is meant to change; the tutorial does not establish a universal range for every use case.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallShare the sheet and support review
If a reviewer is not already covered by Shared Drive membership and inherited permissions, the tutorial shows granting access to the file through Drive permissions. Add only the people who need access, and follow your organization’s sharing rules: the tutorial’s example permission request is not a policy recommendation for every team.
Rank #3
- Google SketchUp - New Color Keyboard Shortcut Sticker (keys 11.5x13 mm)
- Keyboard Sticker Shortcut for Google SketchUp are laminated and made with typographical method on high-quality Matt Vinyl using non-toxic materials. Thickness - 80mkn. Made in USA.
- High quality sticker for keyboard! Once you apply the stickers, you can start editing right away.Stickers help all types of users, from beginner to professional.
- Shortcut will help improve your productivity by 15-40%, saving you time, while helping you enjoy your work
- Keyboard Shortcut Google SketchUp . KEYBOARD NOT INCLUDED
For a human editing loop, the agent can read the spreadsheet after the reviewer makes changes. The tutorial demonstrates reading with includeGridData=true and a narrow fields mask so the response avoids unnecessary cell-formatting data. Choose fields appropriate to the values the agent actually needs to inspect.
Troubleshoot common failures
403 when creating the spreadsheet
The tutorial attributes this error to trying to create a file in a location where the service account cannot own or store it. Its proposed workflow is to create the file through Drive in an accessible Shared Drive, with supportsAllDrives=true. Check that the Shared Drive ID is correct and that the service account has the required access.
Rank #4
- 【Google Shortcut Keys Mouse Pad 】- Extended Large Keyboard Shortcuts for Google Sheets, Mac Shortcuts,Window Spreadsheet Shortcuts Keys Shortcuts Gaming Keyboard Mouse Pad Mousepad Desk Mat
- 【HD Printing】Printed with high-tech precision for vibrant colors and sharp details, this mouse pad provides quick access to essential functions—an ideal addition to any workspace
- 【High Quality】Crafted from smooth microfiber cloth, this large gaming mouse pad offers a comfortable surface with reinforced stitched edges to prevent fraying. Its 3mm thickness ensures long-lasting durability
- 【Perfect Fit】Measuring 31.5 x 15.7 inches, this mouse pad offers ample space for your keyboard, mouse, and other accessories—perfect for both work and gaming
- 【Easy Maintain】Simply wipe with a damp cloth to keep your workspace clean and tidy
A reviewer cannot open the file
Check whether the reviewer is a member of the Shared Drive and whether inherited permissions cover the file. If not, grant access through Drive permissions in accordance with your team’s policy.
A write fails or lands on the wrong tab
Verify that the target tab exists, that the range names the correct tab, and that spaces in the tab name are URL-encoded. Also confirm that the request uses the file ID returned when the spreadsheet was created.
A scheduled run stops authenticating
The tutorial says its access token lasts one hour. A token saved once will therefore expire; configure a secure token-minting mechanism that supplies a fresh token when scheduled runs need one.
Quick Recap
Security and deployment checks
- Keep the service-account JSON key and access tokens in Cosmic’s secret-management path or another protected secret store, not in prompts, logs, or ordinary request text.
- Grant the service account only the Shared Drive role needed for its tasks, and verify reviewer access separately.
- Test creation, tab creation, writing, sharing, and read-back with a non-production sheet before connecting the agent to team data.
- For recurring runs, account for token expiry and avoid relying on a long-lived static token.
- Confirm the tutorial’s endpoint, scope, and permission details against current Google documentation before treating them as definitive API guidance.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




