We’re happy to announce that AppSheet-powered no-code chat apps are now available in preview for Workspace customers in AppSheet!
You can access this feature right now if you are in the Preview Program, and you can provide any feedback in this thread. If needed, additional information can be found in our help center articles. We’re targeting a full launch for later this year.
I’ve been spending a fair bit of time in Google’s ‘no-code’ platform AppSheet. Even for developers there is plenty to get your teeth into with features like Apps Script integration. One of the incredibly powerful core features of AppSheet is the ability to send dynamic emails which include forms designed in AppSheet. These allow users to interact with your app without leaving their inbox.
Whilst the inbox dominates in many business sectors, support for frontline workers increasingly leans on other communication channels including Google Chat. With the announcement of AppSheet powered no-code Google Chat apps there is now an opportunity to also push dynamic forms, send data and interact with Chat users in that space. For developers there is also the opportunity to do even more with the Apps Script integration. Follow the link to the announcement post to find out more…
Busy old couple of weeks at CTS and it’s been nice to get back to some face-to-face events. Last week I had the pleasure of joining the Google Workspace DevRel team on stage at the Google Workspace Developer Summit, London co-presenting with some guy called Charles Maxson.
A couple of years ago as part of Totally Unscripted we did a ‘State of Script‘ episode with then Apps Script PM Keith Einstein. This latest clip from the Google Workspace Developer YouTube channel captures not just the state of script, but the wider state of Workspace Dev.
The clip is worth a watch to get a summary of some of the new features coming to Workspace development. For me, not only is there plenty to get excited about my overall feeling from the Summit was Workspace development is now a first class citizen in the Google Cloud family. The state of Workspace development is good!
Over the past year, we’ve added more functionality to AppSheet, extending how it can maximize the power of Google Workspace through integrations with products such as Gmail, Google Drive and Apps Script. To improve the experience for app creators and users, we’re excited to introduce in public preview AppSheet databases, a built-in database for citizen developers to easily and securely manage their data.
During public preview, access to AppSheet databases will be enabled by default for everyone but it will not affect existing apps. Use of this feature in public preview will be included at no additional cost in your AppSheet subscription plan, but limited to 10K rows per table, 20 tables per database and 20 databases per user. Please note that these limits may change when the feature is generally available.
For people who tuned in to TU3.5: New workflow solutions with Tables and Google Apps Script back in 2020 AppSheet databases will look very familiar. Since that episode the Area 120 team behind the Tables beta moved into Google Cloud and specifically AppSheet.
The big question for me is whether AppSheet databases can find a sweet spot for citizen developers looking for something with more performance than a Google Sheet and easier to setup than a Google Cloud project. In public preview AppSheet databases are limited to 10,000, which interestingly is the same limit as the old paid version of Tables.
Ultimately this may however be less able size and performance but a data solution that the AppSheet team has full control, particularly removing a reliance on features developed by the Google Sheets team.
Google Workspace is the most popular productivity tool on the planet — relied on by more than 3 billion users. To help organizations thrive in a hybrid world, we’ve invested heavily in immersive connections, our approach to bringing people closer together through our communication products, and smart canvas, our next-generation collaboration experience, while enhancing our cloud-first security model to help people work safer.
Today is the first day of Google Cloud Next ’22 and this flagship event is being used to announce a number of upcoming features for Google Cloud and Workspace. This post (source link at the end) from the Google Cloud blog gives a summary of some of the key announcements including:
Bringing people together with immersive connections – which announces a number of new features being introduced to enhance Google Meet, the much requested feature to include inline threaded conversations in Google Chat as well as broadcast only Chat spaces
Collapsing the boundaries between people and apps with smart canvas – which highlights updates, mainly to Google Docs, to enhance productivity with custom building block and user defined variables. Google Sheets is also getting some smart chips enhancements including smart chips data extraction and third party integration as well as a new timeline view rolling out this month
Work safer with Google – a reiteration of Google’s commitment to security with updates on data loss prevention being extended to Google Chat, Trust rules in Drive and client side encryption for Gmail and Calendar
Extending the power of Workspace – the one perhaps of most interest to Pulse readers are the opportunities to build on Google Workspace with additional APIs for Meet and Chat, a Meet add-on SDK to third party integrations directly in Meet, and an official Google Chat integration from AppSheet apps.
For some of these announcements you’ll have to wait until 2023 at the earliest to get your hands on them. For a wider narrative and to see how the tech press is responding to today’s Google Cloud Next ’22 announcements here are some stories that have caught my eye:
Build an automated system that will be automatically deployed to one of the destination spreadsheets when the code is committed to the GitHub repository.
Managing code particularly in container bound projects can be a real headache for Apps Script developers. The Script REST API has made this a lot easier both is terms of managing scripts but also opening up options for different development environments, including local development using clasp and your preferred IDE.
In terms of version control there are a number of solutions Apps Script developers can now consider. The Google Apps Script GitHub Assistant Chrome Extension is a popular option as it extends the existing online Script Editor with integration with GitHub and several other Source Code Management services (GitHub Enterprise/Bitbucket/GitLab).
For developers interested in developing projects locally there is perhaps even more choice. One solution we’ve featured a couple of times in Pulse is the use of GitHub Actions:
GitHub Actions makes it easy to automate all your software workflows, now with world-class CI/CD. Build, test, and deploy your code right from GitHub. Make code reviews, branch management, and issue triaging work the way you want.
The latest example for using GitHub Actions comes from Goran Kukurin (gorankukurin.com). Goran has shared a setup for developing code in Google Sheets with development and production versions. As well as using GitHub Actions to automatically push code to the correct Google Sheet version a shell script is used to modify the custom menu name as a useful reminder so you can see what version you are testing:
You can visit Goran’s post (linked below) for an example repo and instructions on how to setup. If you are using a UNIX based operating system it should be straightforward. If like me you are on a Windows machine there are some minor tweaks and possibly big
node-gyp
headaches to overcome, which I’ve highlighted below (in Goran’s website post some commands with
--
are displaying as
-
– this GitHub repo and Medium version are ok).
Windows Tips
You are better using PowerShell rather than CMD so you don’t have to modify things like
$HOME
to
%HOMEPATH%
.
If you’ve not already got
node-gyp
installed the setup that worked for me on Windows 11 was:
Node 14.19.3
Python 3.10
Visual Studio Build Tools 2017
After installing with
npm install -g node-gyp
there are Windows specific setup instructions (don’t forget
npm config set msvs_version 2017
).
After creating the spreadsheets I needed to specify the directory by including
src
(I think this is a nit) e.g.:
mv src\.clasp.json .clasp-prd.json
To encrypt your clasp credentials you might need to install install GnuPG.
If you are running the setup build tasks in VS Code and get:
'.' is not recognized as an internal or external command
I solved this by configuring
npm
to use
bash.exe
, some other options are give in this SO answer.
Final thought
There is a lot more you could do with GitHub Actions like pushing to multiple production spreadsheets and much more. This post from Goran Kukurin is a great insight to what is possible and we look forward to seeing where other Apps Script devs go with it.
This is a report for obtaining the values from GOOGLEFINANCE using Google Apps Script. When I tested to retrieve the values from GOOGLEFINANCE function on Google Spreadsheet using Google Apps Script, I noticed that the values can be retrieved.
Another interesting report from Kanshi Tanaike where they test the ability to get values from the Google Sheets
GOOGLEFINANCE
function with Google Apps Script. For context, as highlighted in the report, Google announced in 2016 that historical data from the
GOOGLEFINANCE
function would no longer be accessible using either Google Apps Script or the Google Sheets API.
The 2016 announcement followed news in 2014 that the Finance Service, which allowed direct access to current and historical stock data, was deprecated (if you are interested in seeing what you are missing out on here is the Internet Archive snapshot of Finance Service from 2013).
So clearly there is a trend here in Google not wanting you to programmatically access stock data with their services and I anticipate the
GOOGLEFINANCE
function will be updated to prevent access from Google Apps Script, but in the meantime you can have some fun :)
Master the QUERY function, the most powerful function in Google Sheets, to become a more effective data analyst
Friend of Pulse and Google Sheets guru, Ben Collins, has a new course ‘The QUERY Function in Google Sheets’. The QUERY
function it lets you perform various data manipulations making it easy to reshape, aggregate and explore your data in Google Sheets. The course is designed to be suitable for everyone from beginner to advanced who are interested in ways to work more effectively with your data.
If you are not familiar with the QUERY function Ben provides one example of what is possible in Sheets Tip 204: How To Use Dates In The QUERY Function (check the linked post in this Sheet Tip for an example worksheet).
Bonus:Sheets Tip 204 includes a 50% discount on the course valid until Friday 20 May 2022 at midnight EDT.
Finally, if you are interested in using the QUERY language in Google Apps Script it is possible! Below is some code used in this copy of Ben’s example workbook based on:
// based on https://gist.github.com/tanaikech/053d3ebbe76fa7c0b5e80ea9d6396011#sample-script
function myFunction() {
const doc = SpreadsheetApp.getActive()
const spreadsheetId = doc.getId(); // or set another Spreadsheet ID.
const sheetId = doc.getSheetByName('Data').getSheetId(); // or set another Sheet ID from Spreadsheet ID.
const query = "select C, B where B > date '2000-01-01' and B <= date '2002-12-31'"; // your QUERY
const url = `https://docs.google.com/spreadsheets/d/${spreadsheetId}/gviz/tq?tqx=out:csv&gid=${sheetId}&tq=${encodeURI(query)}&access_token=${ScriptApp.getOAuthToken()}`;
const res = UrlFetchApp.fetch(url,);
console.log(res.getContentText());
const array = Utilities.parseCsv(res.getContentText());
console.log(array);
// SpreadsheetApp.getActiveSpreadsheet(); // This comment line is put for automatically detecting the scopes if directly adding a spreadsheet ID.
}
One the powerful features of Google Apps Script is with a couple of lines of code you can quickly start automating and organising your inbox. For people just getting started with Apps Script Google provide a introductory codelab ‘Accessing Google Sheets, Maps, and Gmail in 4 lines of code!’ and for those wanting to do a bit more the Google Workspace Developer documentation includes a ‘create a mail merge‘ solution.
Mail merge solutions are bit or a reoccurring theme in the world of Google Apps Script. In 2011 the official G Suite Developers Blog featured 4 ways to do Mail Merge using Google Apps Script with community contributions from James Ferreira, Steve Webster and Romain Vialard. The post references Romain’s ‘Yet another Mail Merge’ script, which he went on to develop as a very successful YAMM add-on before refocusing on the Mergo Mail Merge. Even further back when Google Apps Script was officially launched in 2009 this included a introductory video with a mail merge example.
A well as Google official channels the ability to automate your Gmail inbox has regularly caught the attention of the wider tech press. In 2013, Computerworld highlighted Jonathan Kim’s ‘Gmail No Response’ script which goes through your inbox and finds recent emails where you were the last respondent. Jonathan’s blog post is no longer available but the Gmail No Response’ script is on GitHub where it has been forked 100 times.
runs through the emails in your inbox and checks your outgoing messages for a question mark. Once it finds these emails it checks to see if they are in a date range and then sees if you have had a response. If you have not had a reply to your email containing a “?” then it adds the label “No Response”. You can then quickly see all of the threads for which you are awaiting a reply.
If you are interested in more Gmail script solutions then I highly recommend you have a look at content shared by Amit Agarwal. This doesn’t just include Apps Script solutions but also a number of Gmail tips and tricks. As many of these feature the way you can search your Gmail inbox they can also be used with GmailApp.search() or if using the Gmail Advanced Service Gmail.Users.Messages.list. A nice example of where a Gmail user tip can be used in Apps Script is Amit’s post which includes how to Search Emails by Specific Time in Gmail.
Working with dates, times and time zones can often be a bit of a headache. If you’d like to learn more about some of the challenges of dealing with ‘big balls of wibbly-wobbly, timey-wimey… stuff’ I recommend watching Comptuerphile’s Problem with Time & Timezones.
For displaying dates/time values for users in different time zones you can use Utilities.formatDate(date, timeZone, format), the challenge however is working out the user’s
timeZone
. For Google Workspace Add-ons developers can configure the manifest option to include user locale information in event objects included as part of action callback functions [See Accessing user locale and timezone].
function getUserTimeZone() {
var userTimeZone = CalendarApp.getDefaultCalendar().getTimeZone();
Logger.log(userTimeZone)
}
The downside of this approach is it potentially adds an additional authorisation scope the user will need to approve before the script can run. As noted by Google best practice is always to limit the scopes in your Apps Script projects to the ones you need.
If you’ve got other tips for handling user time zones feel free to pop them in the comments.
Use Apps Script to normalize your tweet data into tabular format for easy visualization & analysis.
I’ve a personal interest in Twitter data, in particular, how it can be collected analysed in Google Sheets so it was nice to see this example from Nick Young (@techupover). The solution shared by Nick uses Google Apps Script to parse a downloaded archive from a Twitter account and write it to a Google Sheet. A nice weekend project if you are looking for something to do :)