AppsScriptPulse

Streamlining Conditional Formatting in Google Sheets with Apps Script

I’ve created a small (pseudo) class that more easily clears and creates conditional formatting rules in a Google Sheet tab with Google Apps Script. Why? Well in Google Apps Script, conditional formatting rules are all or nothing. You can only ever set, get or clear ALL rules in a specified Google Sheet tab.

Conditional formatting in Google Sheets can be a powerful tool. However, Google Apps Script’s native setConditionalFormatRules() method replaces the entire set of rules, requiring the retrieval and reconstruction of the complete rule array to add, modify, or remove a single rule. This can be cumbersome and inefficient.

Fortunately Scott Donald has developed Range_ConditionalFormatting(), a valuable utility that simplifies conditional formatting management. This includes a SetRule method that allows you to add new rules without overwriting existing ones, and the position parameter provides precise control over rule order, which is crucial as conditional formatting rules are applied sequentially.

Scott’s post includes all the code you need to get this working in your own project along with a number of example snippets. This makes managing conditional formatting much more efficient and manageable.

Source: Clear and Set Conditional Formatting Rules to a Specific Range in Google Sheets with Apps Script – Yagisanatode

Calling all Google Workspace developers! Apps Script Meetup at Google Cloud Next 2025

Calling all Google Workspace developers! Join us for a lively discussion on Apps Script, the cloud-based JavaScript platform that empowers you to automate tasks, connect services, and extend the functionality of your favorite Google apps. Whether you’re a seasoned Apps Script pro or just starting out, this session offers a space to share knowledge, exchange tips, and connect with fellow enthusiasts.

I’m delighted to announce that I’ll be joining Steve Bazyl, Head of Google Workspace DevRel, to co-facilitate the Apps Script Meetup at Google Cloud Next 2025. The last Next meetup we had was in 2018 so this is long overdue.

To help us plan an amazing meetup, we’d love your input! Steve and I have got this very quick survey that we’ll use to help us tailor the content and activities to your interests. The meetup is scheduled for April 10 at 12:15pm and is limited to Google Cloud Next attendees.

If you are attending Cloud Next there are a couple of other meetups:

Source: Apps Script developers meetup Google Cloud Next 25

Create Responsive Emails Easily with Google Apps Script and MJML

Today I had the task of implementing a newsletter for internal updates and decided to use Google Apps Script since I was already using it for managing the project data. Based upon past experiences with emails using HTML I need this area was full of landmines and I didn’t want to navigate through it. 💣

So I decided to use MJML with Google Apps Script.

Sending emails using Google Apps Script is a common task, however, creating HTML emails that render consistently across different email clients and that look visually appealing can be challenging.

Justin Poehnelt’s post on DEV Community, “Using MJML in Google Apps Script to Send Beautiful Emails,” offers a solution to this problem. MJML is a markup language that makes it easy to create responsive HTML emails. It removes some of the complexities of HTML email development, allowing users to focus on the content of their emails.

In the post, Justin explains how to use MJML with Google Apps Script to send beautiful, responsive emails. He also mentions that he has published a library, MJMLApp, that “hides the gnarly bits” of using MJML with Google Apps Script. This library is available on GitHub in the mjml-apps-script repo where you can find the library ID and basic usage information.

Source: Using MJML in Google Apps Script to Send Beautiful Emails

Beyond Basic Q&A: What is the future of the Google Apps Script community and development?

The data reveals a notable decrease in Stack Overflow activity related to Google Apps Script from 2023 to 2024. There’s a reduction in total questions, questioners, answerers, and tags used. Interestingly, the ratios of answered and solved questions have increased. This suggests that while there’s less activity, a higher proportion of questions are getting resolved. A key factor influencing these trends is likely the rise of generative AI.

The latest report on the google-apps-script tag on Stack Overflow, published by Kanshi Tanaike, paints a fascinating picture: Google Apps Script is a maturing platform, but it’s also undeniably at a critical juncture. As Tanaike notes, “the rise of generative AI” is reshaping the developer landscape, and this is clearly reflected in the data.

The declining volume of basic Google Apps Script questions on Stack Overflow is arguably not a sign of the platform’s decline, but rather a signal of a significant evolution. This shift demands our attention and a willingness to explore the new opportunities and challenges it presents. This means actively seeking out new opportunities, adapting our skillsets, and rethinking traditional approaches to Google Apps Script development.

I believe the future of Apps Script rests on the skills of its developers and the strength of its community. Fostering a community capable of tackling complex integrations, building sophisticated automation within Google Workspace, and leveraging AI to enhance Apps Script’s capabilities is paramount. Supporting both current and new Apps Script developers, enabling them to unlock the platform’s full potential, is a key part of this future. The core value proposition, Apps Script’s unparalleled integration with the Google ecosystem, remains strong.

The real challenge, and the opportunity, lies in how the Google Apps Script community adapts, supporting knowledge sharing that goes beyond basic Q&A and cultivating a culture of deep understanding, critical thinking, and collaborative problem-solving. For us at AppsScriptPulse, this means continuing to share not just code snippets, but also design patterns, architectural best practices, and strategies for effectively integrating and evaluating AI-generated code.

Source: Trend of google-apps-script Tag on Stackoverflow 2025

Google Workspace Developer News: Managing Folders with Limited and Expansive Access with the Drive API

There are nine updates highlighted in this month’s Google Workspace Developer News. The news that caught my eye the most relates to updates to the Google Drive API and upcoming changes to My Drive folders with restricted access.

Google Drive API: Managing Folders with Limited and Expansive Access

Google recently announced that by 2026, it will stop allowing restricted access on specific files and folders in My Drive, instead consistently managing it via the limited access folder setting. These changes will align the My Drive experience with Shared Drives, which use an expansive access model where everyone sees the same items in a folder. For developers wanting to get ahead of the curve, there are several new fields that can be used. The Google Workspace Developer News episode gives an overview of these, and there is a new Google Developers Documentation guide on Manage folders with limited and expansive access. In summary:

  • Restricting Folder Access: To limit access to a folder, developers can set the boolean inheritedPermissionsDisabled field on the files resource to true.
  • Opt-in API Behavior: Developers can also opt in to expansive access API behavior in My Drive ahead of any future mandatory enforcement by setting the enforceExpansiveAccess request parameter to true on the permissions.delete() and permissions.update() methods.

Other Updates

Here’s a brief overview of the other updates covered in the Google Workspace Developer News video:

  • Apps Script Rhino Runtime Deprecation: Also already highlighted in Pulse, the Apps Script Rhino runtime will no longer function after January 31, 2026.
  • Google Meet API Enhancements: All meeting participants can query conference data, including the conference records, the conference artifacts, and the participant records, using the Google Meet API.
  • Google Meet Pre-Configurations: Auto-recording, auto-transcripts, and “take notes for me” can now be pre-configured within a meeting space when created. This feature is available through the Developer Preview Program.
  • Google Meet Media API: The Google Meet Media API is now available through the Developer Preview Program, granting access to real-time media from Google Meet conferences.
  • Reports API Updates: Google Chat now supports the customerUsageReports.get() and userUsageReports.get() methods for the Reports API.

Source: Apps Script’s Rhino runtime deprecated, launch of Meet Media API, and more!

Unlock Your Productivity Potential with Gemini and Google Calendar (and other Workspace APIs)


As a Google Workspace Developer Advocate, I’m always exploring innovative ways to leverage technology. I’m thrilled to share my new Jupyter Notebook that showcases the power of Gemini and the Google Calendar API for productivity coaching. 🚀✨

This notebook dives into:
– Using Gemini’s multimodal capabilities to analyze calendar data. 📅
– Leveraging function calling to connect Gemini with Google Workspace APIs. 🔗
– Developing a personalized AI productivity coach. 🧑‍🏫

It’s amazing to see how generative AI can transform the way we work and optimize our time. ⏳

Explore the notebook on GitHub and discover how to build your own AI-powered productivity tools! 🛠️

👉 Link: https://lnkd.in/gpTxMMAy

Are you struggling to manage your time effectively? Mohammad Al-Ansari, Google Developer Advocate, has recently shared how the Gemini API can act as a personal productivity coach. The solution uses a Google Colab notebook, which is connected to the Google Calendar API. The Gemini API is used to provide personalized insights and recommendations to boost your productivity and improve your work/life balance. For those who don’t know, Google Colab is a free cloud-based platform for running Jupyter Notebooks, which are interactive coding environments that allow users to write and execute code and can be a useful tool to have in the toolbox when exploring data.

Some of the key features in Mohammad’s ‘Productivity Coach’ are:

  • Function Calling: This notebook uses Gemini’s ‘function calling’ capabilities, allowing it to dynamically interact with the Google Calendar API and retrieve real-time data. This ensures that the analysis and recommendations are always up-to-date and relevant to your current schedule.
  • Google Workspace Integration: By integrating with the Google Calendar API, this notebook shows how the Gemini API can be seamlessly integrated with other Google Workspace services. This opens up exciting possibilities for quickly experimenting with other Workspace data sources, such as Google Docs, Sheets or Drive.
  • Personalized Coaching: As a bonus you can see how Gemini can act as your personal productivity coach, so if nothing else you can get some tailored guidance and support about your own calendar

Check out the notebook to explore!

Source: generative-ai/gemini/use-cases/productivity/productivity_coaching_with_google_calendar.ipynb at main · GoogleCloudPlatform/generative-ai

‘AI Agents’ in Google Apps Script: Automate Google Workspace with Natural Language

Imagine that you write in plain English what you want to do in Google Workspace (eg. workflows) and it happens just like magic. Insert text prompt, Gemini will generate the code for you and run it immediately. A dream? No, reality, thanks to my conceptual and practical idea of how to implement AI Agents in Google Apps Scripts to leverage the V8 runtime.

Ivan Kutil has explored the concept of AI Agents in Google Apps Script, enabling Google Workspace automation via plain English descriptions. Users describe their automation needs in natural language, which is then processed by Gemini API to generate the necessary code. The generated code is then executed in your Google Apps Script project.

Ivan’s solution uses the gemini-2.0-flash-thinking-exp-01-21 model, an experimental model within Vertex AI specifically designed to reveal its ‘thinking process’, resulting in more reliable code generation. The enhanced reasoning capabilities of this model are particularly beneficial for complex automation tasks, making it a powerful tool for Google Workspace customisation.

To ensure that the agent is doing the right thing, the clever bit is you can test the execution via a dry-run, where the code created with Gemini Flash Thinking is sent to an internal ‘Tester’ agent, which uses Gemini to comment on the code and summarises it in a log. It’s important to review the script before running it, as Ivan accepts no responsibility for the results of the script. Another nice feature is the generated code is stored in the Cache, so after running a dry-run and then a run, the same version will be executed within the Cache limit (currently set to 5 minutes).

This solution, which mirrors Gemini for Workspace’s ability to generate and execute basic Python code, suggests a future where Gemini for Workspace could write and execute Apps Script code for basic tasks. This has the potential to transform how users interact with and automate their Google Workspace environments.

If you are interested in a version of Ivan’s solution that incorporates my GeminiApp library, follow this link. For additional information on Ivan’s solution including setup instructions follow the source link.

Source: Create AI agents in Google Apps Script with Vertex AI and Gemini

How Apps Script Became the Ultimate LLM Fine-Tuning Tool

If you have domain-specific knowledge that you want an LLM to leverage, you probably have a use case for fine-tuning. Fine-tuning can significantly improve how well the model understands and responds to your queries, whether it’s legal documents, medical texts, financial reports, or niche industry data.

The most crucial step in this process is structuring your data correctly. If your dataset is well-organized and formatted properly, the rest of the workflow becomes much more manageable. From there, it’s just a matter of setting up a few configurations and automating parts of the process with Apps Script. That’s where things get interesting and surprisingly efficient.

Source: How Apps Script Became the Ultimate LLM Fine-Tuning Tool

Rhino Runtime Retirement: Action Needed for Apps Script Projects

As of February 20, 2025, the Rhino runtime is deprecated. Scripts running on Rhino will continue to function until January 31, 2026, after which they will no longer execute. Please migrate your scripts to the V8 runtime before this date. Refer to Migrate scripts to the V8 runtime.

Attention Google Workspace Developers!

A recent email to Google Workspace administrators announced the upcoming retirement of the Rhino runtime for Apps Script. As also highlighted in the Apps Script release notes, all Apps Script projects still using the Rhino runtime must be migrated to the V8 runtime by January 31, 2026, to avoid execution issues.

What this means for Workspace Developers:

If you are a Workspace developer, even if you don’t have an administrator role, it’s crucial to check your Apps Script projects for Rhino runtime usage. The email to administrators included a CSV file listing affected projects, with details such as:

  • Script URL, Script ID, Last Updated: Identifies the specific script.
  • Creator Email, Owner Email: Identifies the script’s originators.
  • Incompatibility Reason: Explains why the script needs migration.
  • Execution Count: Shows how often the script is used.
  • Additional Information: Includes opt-out status, library dependencies, etc.

Suggested Actions for Developers:

  • Non-Admins: You might want to contact your Workspace administrator to find out if any of your or your colleague Apps Script projects are on the list of affected scripts and ask for guidance on the migration process.
  • Third-Party Developers: You may want to proactively reach out to your customers to inform them of the upcoming changes, offer assistance with the migration, and ensure their scripts are updated before the deadline to prevent any disruption in their services.
  • Workspace Admins: Review the CSV file to identify your affected scripts, prioritize migrating scripts with high usage first to minimize user disruption, and understand the specific issues that need to be addressed in each script.

Important Considerations:

Google provides a migration guide and support resources to assist with the transition. In particular, it is worth noting that:

  • For Apps Script web apps and Google Workspace Add-ons “[You] must create a new version of the script with the V8 adjustments. To make the V8 version available to users, you must re-publish the script with this version.”
  • When updating standalone scripts to run on the V8 runtime, “you need to provide users at least view access to the script in order for the script’s triggers to work properly.”

It’s also important to note that while the V8 runtime generally offers performance advantages, there have been some reports of specific instances where performance with JDBC connectors might not be as efficient as in the Rhino runtime.

So don’t delay, start migrating your Apps Script projects today!

Source: Google Apps Script release notes  |  Google for Developers

Streamline Your Google Sheets: Automate Row Archival with Google Apps Script

Archive Google Sheet Data with Google Sheets API Advanced Service in Google Apps Script

Keeping your Google Sheets organised can be a chore. A recent tutorial by Scott Donald shows you how to automatically archive old rows based on multi-column parameters using Google Apps Script and the Advanced Sheets API, making data management easier and more efficient. This post highlights Scott’s approach to scripting a solution, including how to set up the Sheets API, the main components of the script, and potential applications.

As always Scott packs in a lot of useful tips and guidance; in particular, the tutorial highlights how to archive data using just five API calls, potentially making it faster than the standard SpreadsheetApp approach. Scott also details how to modify the script to suit different processes and includes details on his SsReq class. It provides a structured way to perform common operations like retrieving data, finding rows based on criteria, copying rows, appending rows, and removing rows, making it a great addition to your personal Apps Script toolbox.

For detailed explanations, code examples, and helpful tips, consult the complete tutorial.

Source: Creating a Google Sheets Row Archiver with Google Sheets API Advanced Service and Apps Script – Yagisanatode