Recommended Free Tools
iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
To let a Cosmic AI agent create and update a team spreadsheet, configure a Google Cloud service account, enable the Google Drive and Sheets APIs, give the account access to a Google Workspace Shared Drive, and set up authenticated API requests in Cosmic. The workflow described in Cosmic’s September 25, 2026 tutorial creates the spreadsheet through Drive, writes its contents through Sheets, and can share the file with a reviewer and read it back.
What you need before you start
- A Google Cloud project with the Google Drive API and Google Sheets API enabled.
- A Google service account and its JSON key. Treat the key like a password: store it securely, not in prompts or ordinary agent configuration.
- A Google Workspace Shared Drive that the service account can access. The tutorial recommends this because the service account does not have Drive storage quota of its own.
- A Cosmic agent with the ability to make API requests, plus a way to store credentials as secrets.
The steps and endpoint details below follow Cosmic’s vendor tutorial, authored by Tony Spiro and published September 25, 2026. They are not an independent test or verification of current Google API behavior.
Configure Google access for the agent
1. Enable both APIs
In your Google Cloud project, enable the Google Drive API and Google Sheets API. The tutorial uses Drive for creating and sharing the spreadsheet, and Sheets for managing tabs and cell values; enabling only one leaves part of that workflow unavailable.
Free tools Windows power users keep installed
One-click scans. No signup required.
2. Create a service account and protect its key
Create a service account in the project and generate a JSON key for it. Store the key through Cosmic’s secret-management path or another approved secure store. Anyone who obtains the key may be able to act as the service account, subject to its permissions, so do not expose it in agent instructions, logs, or a shared document.
#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
3. Grant access to the Shared Drive
Add the service account’s email address as a member of the intended Shared Drive and choose a role that permits the operations your workflow needs. The tutorial’s workflow relies on this team-drive location; do not assume that a service account can create the file in an ordinary personal Drive location. Your organization’s administrator may need to approve the membership or role.
Authenticate Cosmic’s API requests
Cosmic’s tutorial describes service-account authentication using an RS256-signed JWT exchanged for an access token. It says the token lasts one hour and that an HTTP request tool by itself does not perform the signing step. For a short walkthrough, it suggests minting a token locally and saving it as a secret. For scheduled use, it suggests a small endpoint controlled by the implementer that signs the JWT and returns a fresh token. The tutorial requests both the Drive and Sheets scopes for its workflow.
Choose an authentication arrangement that your organization can secure and operate. A locally minted token is not a durable credential for a recurring job; plan for renewal before the token expires, and ensure any token-minting endpoint is protected. The token duration, signing approach, and scope requirements here are attributed to the Cosmic tutorial rather than independently verified Google guidance.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →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 in the Shared Drive
The tutorial creates the spreadsheet with the Drive API, rather than calling sheets.spreadsheets.create. Its Drive request creates a file with the Google Sheets MIME type, places the Shared Drive ID in the parent field, and sets supportsAllDrives=true. Save the file ID returned by that request: subsequent Sheets requests use it to address the spreadsheet.
This creation route is central to the tutorial’s approach. If a creation request returns 403, check whether the service account has appropriate access to the target Shared Drive and whether the request is configured for Shared Drive support, rather than assuming the Sheets write request is the cause.
Add tabs and write cell values
Create any additional tabs first
Use the Sheets batchUpdate endpoint to add tabs that do not already exist. A values request cannot target a tab that has not been created, so make tab creation an earlier step in the agent’s sequence.
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
Write rows to a specific range
Send values to the Sheets values endpoint using the spreadsheet’s file ID, a range that identifies the tab and cells, and a two-dimensional array representing rows and cells. For example, a request’s data should preserve the row-and-column structure you want in the sheet; the tutorial does not prescribe a universal schema, so define the columns for your own workflow.
If a tab name contains spaces, URL-encode those spaces in the range used in the request. Confirm that the range names the intended tab; an incorrect or missing tab name can send the write to the wrong location or cause it to fail.
Share the file and verify changes
If a reviewer needs access, the tutorial demonstrates granting it through Drive permissions. Shared Drive membership and inherited permissions affect who can open a file, so a reviewer who is not a member may need explicit sharing. Choose a permission level that fits your organization’s access policy; the example in the tutorial should not be treated as a universal permission recommendation.
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
For a human review loop, the tutorial reads the spreadsheet back with includeGridData=true and a narrow fields mask, which limits the response to relevant data instead of returning unnecessary cell formatting. Reading back the result gives the agent or workflow a way to confirm the current values after edits, but it does not replace a reviewer’s judgment.
Troubleshoot common failures
| Symptom | What to check |
|---|---|
| 403 while creating the spreadsheet | Confirm the service account can access the Shared Drive and that the Drive creation request uses the Shared Drive ID as the parent and supportsAllDrives=true. Cosmic’s tutorial attributes this failure to attempts to create a file where the service account cannot own or store it. |
| Reviewer cannot open the file | Check the drive’s membership and inherited permissions. If the reviewer is outside the Shared Drive, determine whether your policy permits granting access to the individual through Drive permissions. |
| Write fails or reaches the wrong tab | Verify that the tab exists, that the range names the intended tab, and that spaces in the tab name are URL-encoded. |
| A scheduled run loses authentication | Check whether the access token expired. Cosmic’s tutorial says its described token lasts one hour; recurring runs therefore need a protected way to mint a fresh token. |
Source and scope
This procedure reflects the workflow in Cosmic’s tutorial on connecting Cosmic AI agents to Google Sheets, published September 25, 2026. Its endpoint-level instructions are vendor guidance, not independent validation of Google’s current APIs, scopes, quotas, or permission behavior. Confirm operational details against current Google documentation and your Workspace administrator’s policies before deploying a production workflow.
Quick Recap
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.

