Google brings Gemini to Apps Script with block-by-block code review
Edited and reviewed by AI Ping Editorial Team
3-line summary
- Google has moved Gemini in the Apps Script editor out of beta. Users can request code and fixes in plain language and review individual blocks.
- Eligible subscriptions include Business and Enterprise Standard and Plus, and personal Google AI Pro and Ultra plans.
- Workspace rollout began November 12. Saving and running a script, and authorizing it to access data, still follow Apps Script’s existing rules.
Google announced general availability of the Gemini side panel in the Apps Script editor on November 16. Users can describe a repetitive task in Sheets or Docs to get a script, or ask for changes to existing code. The release adds controls to accept or reject individual blocks when Gemini proposes several edits in the editor.
Google’s release notes first listed the feature for customers enrolled in Gemini Beta on August 3. The general release covers Workspace Business and Enterprise Standard and Plus, AI Expanded Access, Google AI Pro for Education, and personal Google AI Pro and Ultra subscriptions. A gradual rollout to Workspace domains on both the Rapid and Scheduled Release tracks began November 12. Google says it can take up to 15 days for the feature to appear.
Selecting code changes inside the editor
Apps Script automates tasks in Google Sheets, Docs, Slides and Forms. It can also run as a standalone project. Google gives the example of turning data in a sheet into a formatted report in Docs. In an existing project, Gemini uses saved context from the active project. Users can refer to a function or variable in their working file when requesting an edit.
When Gemini proposes code, the working file displays a comparison with additions and deletions highlighted. Users can move through the suggestions and keep or discard one block at a time, or take the same action on all of them from the panel. The accepted code can then be saved and run through Apps Script. The panel can also answer general questions and show example code in its response.
For a function that has already returned an error, the execution log offers a Gemini action that explains the failure and proposes edits. Google says the feature takes the error details and nearby code into account. The user can review and save the change, then rerun the function to see whether it resolved the error.
Scripts still run under existing account permissions
Accepting a code block and authorizing the script to access Google data are separate steps. Apps Script checks the services used by the code and derives the OAuth permissions it needs. It prompts for permission when required at execution. Changes that introduce a new service can prompt for further authorization even if the earlier version was already approved. A script that previously worked only with Sheets, for example, can require calendar access once it starts updating events.
The existing rule for installable triggers also applies when a user sets a function to run automatically. Google says an installable trigger runs under the account of the person who created it. Even when several people edit the same document, the account that installed the trigger determines whose authorization applies when it fires.
The usual Apps Script execution limits still apply. Google’s quota table lists six minutes per execution for a standard script on both consumer and Workspace accounts. Individual services have their own usage limits and can stop a run with an error when a quota is exceeded. These limits apply when the code runs, after any suggestions from Gemini have been reviewed.
Google says the panel respects the organization’s existing Apps Script service settings and its Workspace controls for Gemini. Access can be managed by organizational unit or group. Employees in the same company can therefore see different features even when they are on eligible plans. When an organization switches off the Apps Script service itself, it also blocks script creation, editing and executions. Google’s administration help says existing triggers are blocked under that setting as well.
Google’s administration guide says administrators can look at Apps Script project activity through Drive log events, and see daily counts for users and projects. The usage chart covers the past six months and includes both manual and automatic executions. Organizations that control outbound connections can also specify which external addresses scripts are allowed to reach.
Sources
- November 16 announcement, plans and rollout — Google Workspace Updates
- November general availability and August beta — Google for Developers
- Gemini in the Apps Script editor — Google for Developers
- Authorization for Google services — Google for Developers
- Installable triggers — Google for Developers
- Monitor and control Apps Script use — Google for Developers
- Turn Apps Script on or off for users — Google Workspace Help
- Apps Script service quotas — Google for Developers