AppsScriptPulse

[Event] Connected Workers: Using AppSheet to bring the frontline and head office together – Online October 19, 2023 at 14:00 UTC

Join us for an exciting showcase event with Google presenting an AppSheet demo developed to connect frontline workers with head office.

On October 19, 2023 at 14:00 UTC you can join me for a free online live webinar with Tony Martin, Google Workspace specialist and Dominic Parkes, Google Workspace Customer Engineer at Google to discuss a demo app created in Google AppSheet to help bring frontline/deskless workers and head office together more efficiently.

This session is an opportunity to discover how AppSheet can be used to make it easy to administer everyday business tasks such as: reporting sickness, managing shifts, payslips and HR records, onboarding and training. We’ll be discussing the benefits of using AppSheet to solve this problem and getting Tony and Dom’s top tips when it comes to Google AppSheet app creation.

Follow the source links to reserve your place…

Source: Connected Workers: Using AppSheet to bring the frontline and head office together – CTS Website

Request Google Analytics data for Google Sheets using natural language with the PaLM API and Google Apps Script

This video shows how to use the Palm API with Google Apps Script to extract data from Google Analytics 4 accounts. This can be useful for a variety of purposes, such as creating custom reports, automating data analysis, and building new data-driven applications.

Following on from the last post in Pulse where we looked at using Google PaLM API and MakerSuite in Google Apps Script, here’s another example from GDE Linda Lawton. As the video in the post shows Linda has been able to engineer prompts that allow you to use natural language to extract reports from Google Analytics. This shows the emergent capabilities of LLMs as well as some clever prompt engineering. The source post contains more detail, but here is an example:

var text = "The current date is '"+ date + "'. Create a JSON object which contains five parameter's dimension, metrics, start_date, end_date and property_id. The dimension and metric parameter's will be comma separated strings they can be empty if there is no valid text for it. The value of the dimension parameter should be a comma separated string of these dimensions names 'country, eventName, city, audienceName' and the value of the metric parameter should be a comma separated string of these metric names 'activeUsers, eventCount, screenPageViews', the property_id field will also be a string it will be a large number, start date and end date must be in the following format YYYY-MM-DD, which can be found in the given this text '" + prompt + "'. If no start date is found use set it to seven days ago and if no end date is found set it to today."

A couple of highlights worth noting:

  • Context – The current date is included programmatically to give the LLM a reference point
  • Reinforcement – ‘start date and end date must be in the following format YYYY-MM-DD’
  • Exceptions – ‘If no start date is found use set it to seven days ago and if no end date is found set it to today’

Source: GA4 + Palm API with Google App script

GenAI for Google Workspace: Exploring the PaLM 2 API and LLM capabilities in Google Sheets with Google Apps Script — Part 1

This post has covered how you can quickly copy MakerSuite code examples to run them in Google Apps Script. To make the iterative process easier I’ve created GenerativeLanguageApp so that once you’ve created/saved an API key, you can drop these code snippets into your Google Apps Script project:

Generative AI (GenAI) is a rapidly developing field that has the potential to revolutionize many industries, including the way we work. Google has developed a number of LLMs that are generally available to developers, including foundation models trained for text, chat and code which are accessible as part of the PaLM 2 API. To help developers explore the capabilities of these models, Google has created the MakerSuite site.

In this post I share GenerativeLanguageApp, a Google Apps Script helper class which makes it easy to quickly copy MakerSuite code examples to run them in Google Apps Script. This is a great way to start experimenting with LLMs and seeing how they can be used in Google Workspace.

In the next part of this series, I’ll explore some of the capabilities of when using the PaLM 2 API with data from Google Sheets. Stay tuned!

Source: GenAI for Google Workspace: Exploring the PaLM 2 API and LLM capabilities in Google Sheets with…

Efficiently deleting rows by conditions in Google Sheets with Google Apps Script

In this report, I would like to introduce a sample script for efficiently deleting rows by conditions on Google Spreadsheet using Google Apps Script. Recently, I had a situation for being required to achieve this situation. In my report, it has already known that when Sheets API is used, the rows can be efficiently deleted by a condition. Ref However, in that case, Sheets API couldn’t be used. Under this situation, I came up with a method. In this report, I would like to introduce this method.

Here’s a clever method from Kanshi Tanaike for deleting rows in Google Sheets based on a column condition. The solution makes use of the built-in .removeDuplicates() method, the clever bit is the script first copies the header row into any row that matches the condition. As this creates duplicate rows the .removeDuplicates() method can be called to the entire data range. Using this method Kanshi was able to improve an execute of an earlier function from 67 seconds to 13 seconds!

Source: Benchmark: Efficiently Deleting Rows by Conditions on Google Spreadsheet using Google Apps Script

Become a recognized AppSheet Google Developer Expert (GDE)!

Image credit: Google

If you have strong AppSheet technical skills along with solid Google Workspace skills and would like to share your expertise globally as a recognized “Google Developer Expert” (GDE), we would like to invite you to apply to become an official GDE member specializing in AppSheet and Workspace!

The Google Developer Experts program is a great way to get recognised for your abilities, but more importantly an opportunity to get close to the Google product teams to learn and share your day-to-day experiences. Whilst AppSheet is positioned as a no/low code solution it doesn’t mean there aren’t individuals out their developing sophisticated apps and supporting the community along the way.

If this sounds like you the AppSheet team are looking for community experts to become the next AppSheet GDEs. This source post includes some more information as well as a form where you can note your interested. As a GDE of 9+ years I’m also happy to share my experience of the program and what I think it takes to stand out from the crowd.

Source: Become a recognized AppSheet Google Developer Expert (GDE)!

[Official] Apps Script project history – New Feature overview!

We are excited to announce the general availability of project history for Apps Script! Find out how you can get started using this feature.

In Pulse we’ve previously featured the announcement that the new project history was rolling out to Google Apps Script. This feature should have finished following out and this video from the Google Workspace team covers how you can use project history in the Apps Script IDE. As well as the video there is also an update to the Google Apps Script Versions documentation page.

The key takeaway for Google Apps Script users is unlike Google Docs which can automatically save a version history of a document, Apps Script project history requires the user to use deployments (Deploy > Manage deployments) to create a version should you want to see get a highlights or code changes between the current and previous versions. This will be less of an issue if you are using Google Apps Script to  deploy web apps, Workspace Add-ons or libraries, which already use deployments, but for other situations like container bound scripts you might want to get into the habit of using the Deploy button to create a version.

Source: Apps Script project history – New Feature!

5 steps to deploying Google Workspace Editors Add-ons to the Google Workspace Marketplace

This guide is not documentation, but a condensed reminder of what you must do.

Max Makhrov has put together this very succinct guide to publishing Google Workspace Editor Add-ons to the Google Workspace Marketplace. As explained by Max the guide isn’t a step-by-step tutorial, but instead provides the key steps you should remember to do. There are some great tips in this post, particularly around what to include in the recorded screencast required by the Google oAuth verification team.

Source: 5 STEPS to Deploy Google Sheets External Editors add-on

[Live] Tips and tricks to getting the most out of Google Workspace with Apps Script – October 06, 2023 @ 9am PT / 4pm UTC

Join the experts on October 6th to learn Apps Script tips and tricks to combine APIs, automation, configuration as code, and more to improve your productivity using Google Workspace. Whether you’re a seasoned developer or just getting started with low-code development, this event will provide you with the insights and information you need to start building custom solutions with Google Apps Script.

Recently on Pulse we highlighted the ‘Getting the most out of Google Workspace with Apps Script, tips and tricks’ session as part of Google Cloud Next ’23. This wasn’t one of the livestreamed sessions, but the good news is the session is being rerun online on October 06, 2023 @ 9am PT / 4pm UTC, hosted by Charles Maxson and Kara Ireland from the Google Workspace team.

As well as using the source link to register for the event there is a form link where you can submit your questions in advance. If you can’t make the live session registering will also mean you’ll get notified about the recording. Looking forward to seeing other community members in the YouTube Live chat!

Source: Tips and tricks to getting the most out of Google Workspace with Apps Script

Bringing JSON Data from an API into Looker Studio with Google Apps Script

Learn how to seamlessly integrate JSON data from an API into Looker Studio using a custom connector built with Google Apps Script.

This post is a useful reminder of that Google Apps Script can be used to make a data connector for Google online visualisation and reporting tool, Looker Studio. The post by Dimitris Paxinos covers all you need to know about integrating a third-party API as a data source, exposing configuration settings and deploying the connector. All the code is on Github and is a great boilerplate if you have other APIs you are interested in integrating.

Source: Bringing JSON Data from an API into Looker Studio

How to extract images from Google Docs and Google Slides using Google Apps Script

Learn how extract all the embedded images from a Google Document or Google Slides presentation and save them as individual files in a specified folder in your Google Drive.

Often I’ll use Google Docs for drafting blog posts. With the introduction of Duet AI having a generative assistant in situ helps with the creative process. As well as text Google Docs is a really simple canvas for quickly copy/pasting screenshots. Copying content from Google Docs to WYSIWYG editors can sometimes be challenging, particularly, when it comes to images.

Next time I encounter this problem I’ll be using the script solution from Amit Agarwal, which can extract images from Google Docs and Slides and save them to Google Drive. I’m sure there are many other situations where this snippet could come in handy.

Source: How to Extract Images from Google Docs and Google Slides – Digital Inspiration