Year in review: the Google Workspace Platform 2021

Posted by Charles Maxson, Developer Advocate

In 2021, we saw many changes and improvements to the Google Workspace Platform geared at helping developers build new solutions to keep up with the challenges of how we worked, like hybrid and fully remote office work. More than ever, we needed tools for virtual collaboration and digital processes to keep our work going. As paper processes in the office were less viable and we continued to go see digital transformations become necessary, many new custom solutions like desk reservation systems and automated test logging have evolved.

2021 was also a year for Platform milestones, Google Workspace grew to more than 3 billion users globally, we reached more than 5,300 public apps in the Google Workspace Marketplace, and we crossed over 4.8 billion apps installed (up from 1 billion in 2020)! We were also busy bringing Platform innovations and improving our developer experience to help building for Google Workspace easier and faster. Here’s a look at some of the key enhancements the Google Workspace Platform brought to the developer community.

Google Cloud Champion Innovators program

Community building is one of the most effective ways to support developers, which is why we created Google Cloud Innovators.This new community program was designed for developers and technical practitioners using Google Cloud and we welcome everyone.

And when we say everyone, it’s not just professional developers, data scientists, or student developers and hobbyists, we also mean non-technical end users. The growing Google community has something for everyone.

GWAO Alternate Runtimes goes GA

Google Workspace Add-ons are customized applications that tightly integrate with Google Workspace applications, and can be found in the Google Workspace Marketplace, or built specifically for your own domain. The development of these applications were limited to using Apps Script, our native scripting language for the Google Workspace Platform. With the launch of Alternate Runtimes you can now develop add-ons with your preferred hosting infrastructure, development tool chain, source control system, coding language, and code libraries; it was a highly requested update from the developer community, opening up the Platform to many new developer scenarios.

Card Builder UI Application

The GWAO Card Builder tool allows you to visually design the user interfaces for your Google Workspace Add-ons and Google Chat apps projects. It is a must-have for Google Workspace developers using either Apps Script or Alternate Runtimes, enabling you to prototype and design Card UIs super fast without hassle and errors of hand coding JSON or Apps Script on your own.

Card Builder tool for building Google Workspace Add-ons and Chat Apps

Recommended for Google Workspace

This program showcases a selection of market-leading applications built by software vendors across a wide range of categories, including project management, customer support, and finance in our Google Workspace Marketplace. These apps undergo rigorous usability and security testing to make sure they meet our requirements for high quality integrations. They must also have an exemplary track record of user satisfaction, reliability, and privacy.

Recommended for Google Workspace program showcases high quality applications

Chat Slash Commands and Dialogs

Slash commands simplify the way users interact with your Chat bot, offering them a visual leading way to discover and execute your bot’s primary features. As a developer, slash commands are straightforward to implement, and essential in offering a better bot experience. In addition to Slash Commands, Dialogs were a new capability introduced to the Chat App framework that allows developers to build user interfaces to capture inputs and parameters in a structured, reliable way. This was a tremendous step forward for bot usability because it simplified and streamlined the process of users interacting with bot commands. Now with dialogs, users can be led visually to supply inputs via prompts, versus having to rely on wrapping bot commands with natural language inputs.

Forms API beta

Google Forms enables easy creation and distribution of forms, surveys, and quizzes. Forms is used for a wide variety of use cases across business operations, customer management, event planning and logistics, education, and more. With the Google Forms API Beta announcement, developers were able to provide programmatic access for managing forms and acting on responses, empowering developers to build powerful integrations on top of Forms.

Google Workspace Marketplace updates

We made many updates to the Google Workspace Marketplace to improve both the user and developer experience. We added updates to the application detail page that included pricing and when the listing was last updated. The homepage also saw improvements with various curated categories by the Google team under Editor’s Choice. Finally, we launched the marketplace badges for developers to promote their published applications on websites and marketing channels. Oh, and we also had a logo update if you hadn’t noticed.

Google Workspace Marketplace Badges for application promotion

Farewell 2021 and here’s to welcoming in 2022

2021 brought us many innovations to the Google Workspace Platform to help developers address the needs of their users and it also brought more empowerment to knowledge workers to build the solutions they needed with our no-code and low-code platforms. These are just the highlights for the Google Workspace Platform and we look forward to more innovation in 2022. To keep up with all the news about the Platform, please subscribe to our newsletter.

Extend Google Apps Script with your API library to empower users

Posted by Keith Einstein, Product Manager

Banner image that shows the Cloud Task logo

Google is proud to announce the availability of the DocuSign API library for Google Apps Script. This newly created library gives all Apps Script users access to the more than 400 endpoints DocuSign has to offer so they can build digital signatures into their custom solutions and workflows within Google Workspace.

The Google Workspace Ecosystem

Last week at Google Cloud Next ‘21, in the session “How Miro, DocuSign, Adobe and Atlassian are helping organizations centralize their work”, we showcased a few partner integrations called add-ons, found on Google Workspace Marketplace. The Google Workspace Marketplace helps developers connect with the more than 3 billion people who use Google Workspace—with a stunning 4.8 billion apps installed to date. That incredible demand is fueling innovation in the ecosystem, and we now have more than 5,300 public apps available in the Google Workspace Marketplace, plus thousands more private apps that customers have built for themselves. As a developer, one of the benefits of an add-on is that it allows you to surface your application in a user-friendly manner that helps people reclaim their time, work more efficiently, and adds another touchpoint for them to engage with your product. While building an add-on enables users to frictionlessly engage with your product from within Google Workspace, to truly unlock limitless potential innovative companies like DocuSign are beginning to empower users to build the unique solutions they need by providing them with a Google Apps Script Library.

Apps Script enables Google Workspace customization

Many users are currently unlocking the power of Google Apps Script by creating the solutions and automations they need to help them reclaim precious time. Publishing a Google Apps Script Library is another great opportunity to bring a product into Google Workspace and gain access to those creators. It gives your users more choices in how they integrate your product into Google Workspace, which in turn empowers them with the flexibility to solve more business challenges with your product’s unique value.

Apps Script libraries can make the development and maintenance of a script more convenient by enabling users to take advantage of pre-built functionality and focus on the aspects that unlock unique value. This allows innovative companies to make available a variety of functionality that Apps Script users can use to create custom solutions and workflows with the features not found in an off-the-shelf app integration like a Google Workspace Add-on or Google Chat application.

The DocuSign API Library for Apps Script

One of the partners we showcased at Google Cloud Next ‘21 was DocuSign. The DocuSign eSignature for Google Workspace add-on has been installed almost two-million times. The add-on allows you to collect signatures or sign agreements from inside Gmail, Google Drive or Google Docs. While collecting signatures and signing agreements are some of the most common areas in which a user would use DocuSign eSignature inside Google Workspace, there are many more features to DocuSign’s eSignature product. In fact, their eSignature API has over 400 endpoints. Being able to go beyond those top features normally found in an add-on and into the rest of the functionality of DocuSign eSignature is where an Apps Script Library can be leveraged.

And that’s exactly what we’re partnering to do. Recently, DocuSign’s Lead API Product Manager, Jeremy Glassenberg (a Google Developer Expert for Google Workspace) joined us on the Totally Unscripted podcast to talk about DocuSign’s path to creating an Apps Script Library. At the DocuSign Developer Conference, on October 27th, Jeremy will be teaming up with Christian Schalk from our Google Cloud Developer Relations team to launch the DocuSign Apps Script Library and showcase how it can be used.

With the DocuSign Apps Script Library, users around the world who lean on Apps Script to build their workplace automations can create customized DocuSign eSignature processes. Leveraging the Apps Script Library in addition to the DocuSign add-on empowers companies who use both DocuSign and Google Workspace to have a more seamless workflow, increasing efficiency and productivity. The add-on allows customers to integrate the solution instantly into their Google apps, and solve for the most common use cases. The Apps Script Library allows users to go deep and solve for the specialized use cases where a single team (or knowledge worker) may need to tap into a less commonly used feature to create a unique solution.

See us at the DocuSign Developer Conference

The DocuSign Apps Script Library is now available in beta and if you’d like to know more about it drop a message to [email protected]. And be sure to register for the session on “Building a DocuSign Apps Script Library with Google Cloud”, Oct 27th @ 10:00 AM. For updates and news like this about the Google Workspace platform, please subscribe to our developer newsletter.

App pricing, update details, and Editor’s choice now available on Google Workspace Marketplace.

Posted by Mike Rhemtulla, Product Manager

Banner image that shows the Google Workspace logo

Google Workspace Marketplace is proud to announce the availability for developers to display pricing for their applications published in the Google Workspace Marketplace, and the date their application listing was last updated.

Launched over 11 years ago, Google Workspace Marketplace has been helping developers connect with the more than 3 billion people who use Google Workspace—with a stunning 4.8 billion apps installed to date. That incredible demand is fueling innovation in the ecosystem, and we now have more than 5300 public apps available in the Google Workspace Marketplace, plus thousands more private apps that customers have built for themselves.

App Pricing

For developers, you can now specify the app pricing choosing from Free, Paid with a Free trial, Paid with free features or Paid. The app pricing can be updated in the Google Workspace Marketplace SDK – Store Listing tab. We encourage you to specify this in order to provide more information about your Marketplace application for Workspace administrators and end users to evaluate and install your app.

Screenshot of app pricing drop down menu shows different pricing models to choose from

Developers can select which app pricing model is available to users

Screenshot of additional information section now shows pricing

Pricing will now be shown in the application information in Google Workspace Marketplace

App listing update

When a developer updates the app listing or configuration in the Google Workspace Marketplace SDK, administrators and users are now able to see when the application listing was last updated by the developer.

Screenshot of app listing shows a date when the listing was last updated

When the application listing was last updated will now be shown in the application details in Google Workspace Marketplace

Editor’s choice

We have also added a new Editor’s choice section in the Google Workspace Marketplace. This new section has three curated categories; Work from everywhere, these apps help your organization be more productive, Business essentials, these apps help increase workflow productivity, and Apps to discover, these apps are new and innovative. You can find out more about the eligibility for these categories here.

Screenshot shows new Editor's Choice section in Google Workpace Marketplace

New “Editor’s choice” section contains three curated categories in Google Workspace Marketplace

If you’d like to stay informed about updates like these and others to the Google Workspace platform please subscribe to the developer newsletter. And find us at Next ‘21, where we have sessions, demos, and labs covering the latest updates to the Google Workspace platform.

Announcing the Google Forms API

Posted by Christian Schalk, Developer Advocate

Announcing the Google Forms API

Google is proud to announce the Google Forms API! The Forms API is currently available in Restricted Beta, with Open Beta expected to follow in Q4.

Launched in 2008, Google Forms enables easy creation and distribution of forms, surveys, and quizzes. Forms is used for a wide variety of use cases across business operations, customer management, event planning and logistics, education, and more.

Bringing Automation to Google Forms

Image shows two laptops with a phone in the middle

The new Google Forms API provides programmatic access for managing forms and acting on responses, empowering developers to build powerful integrations on top of Forms. The API supports two key use cases:

  • Automating form creation and editing:The API enables developers to automate form creation and editing. This is especially powerful when dealing with large volumes of forms that need to be auto-generated from question banks or other data.

  • Reacting to incoming responses: The API also allows developers to build automations for acting on incoming responses. Examples include developing real-time dashboards or visualizations and triggering business workflows based on response data.

Example Use Cases

Education Automation Integrations

  • Integrations with Learning Management Systems

  • Custom form/quiz generation from question banks

  • Student tracking with real-time dashboards

Customer Management and Support

  • Auto-generate surveys / forms based on customer data

  • Trigger notifications and processes based on responses from customers

Data Analysis and Visualization

  • Create custom visualizations with response data

  • Leverage push notifications to update in realtime

Google Forms API Functionality

The API provides the following specific functionality.

Form Schema and Metadata

Create and Update

  • Create new forms and quizzes
  • Edit existing forms
  • Add questions, point values, correct answers
Read Form Metadata

Read forms content and metadata, including:

  • Questions and answer options
  • Correct answers
  • Point values
  • Feedback

Form Responses

Read Responses
Read responses to forms, including:

  • Answers to each question
  • Response submission time
  • Grades and feedback
  • Push Notifications

    Notifications via Cloud PubSub

    Subscribe to real-time form updates via Cloud Pub/Sub:

    • Receive either push or pull notifications when forms change

    • Get notified when a form is edited or when a form response is submitted

    For the complete Forms API reference documentation visit:

    developers.google.com/forms/api/reference/rest

    Early Forms API Partner Highlights

    Zapier , a leading workflow automation platform, will leverage the new Google Forms API to deliver a better experience for Zapier and Google Workspace users. Today, thousands of businesses use Zapier to connect Google Forms to 4k+ applications to automate tasks and key workflows.

    To date, Zapier has used the Google Drive and Google Sheets API to deliver this integration. Now, a dedicated Forms API will provide a more stable and purpose-driven platform to build from.

    The most common use case for Zapier’s integration with Google Forms is to send Form submission data to an app of the user’s choice within Zapier’s ecosystem whenever one is submitted. For example, a user can automatically create a Google Calendar event for a meeting booked via a Google Form.

    Doing this today requires setting up “watches” via the Google Drive API on the spreadsheet that is tied to the Google Form a user wishes to integrate with Zapier. While this implementation is functional, it puts significant pressure on the Drive endpoint, which carries strict rate limits.

    When a change to the Google Sheet is registered by the Drive API, Zapier then uses the Sheets API to identify the new rows on the spreadsheet that are tied to the Google Form and reads the required data.

    With the new Forms API, Zapier will be able to achieve the same functionality through the Pub/Sub notification system to track new responses and the Forms API to find, read, and send the necessary data to third-party apps via Zapier.

    This new implementation will result in faster and more reliable automations between Google Forms and the 4000+ apps in Zapier’s app directory.

    Zzish, an innovator in the education industry, is leveraging the new Google Forms API in their Quizalize product to empower educators to personalize their teaching for every student.

    Zzish will use the Forms API to help teachers easily convert between Google Forms quizzes and quizzes in Quizalize. This will enable teachers to search Quizalize’s database of 500,000 standards-aligned quizzes and use them as Google Forms. Teachers will also be able to easily deploy their Google Forms as a fun classroom game in Quizalize.

    Google Forms API Launch Roadmap

    We anticipate promoting the API to Open Beta in Q4 2021, with GA following in 2022.

    Become a Forms API Early Adopter!

    The Forms API is currently in Restricted Beta. We encourage you to apply here to be an early adopter to get started with the API today! We’ll also send you important updates about Open Beta and improvements to the API. To keep up to date with all the APIs of your favorite Google Apps, please subscribe to the Google Workspace Developer Newsletter.

    Next ‘21: Must-see Google Workspace sessions for developers and creators

    Posted by Charles Maxson, Developer Advocate

    Banner image that shows the Google Workspace logo

    Google Workspace offers a broad set of tools and capabilities that empowers creators and developers of all experience levels to build a wide range of custom productivity solutions. For professional developers looking to integrate their own app experiences into Workspace, the platform enables deep integrations with frameworks like Google Workspace Add-ons and Chat apps, as well as deep access to the full suite of Google Workspace apps via numerous REST APIs. And for citizen developers on the business side or developers looking to build solutions quickly and easily, tools like Apps Script and AppSheet make it simple to customize, extend, and automate workflows directly within Google Workspace.

    At Next ‘21 we have 7 sessions you won’t want to miss that cover the breadth of the platform. From no-code and low-code solutions to content for developers looking to publish in the Google Workspace Marketplace and reach the more than 3 billion users in Workspace, Next ‘21 has something for everyone.

    1. See what’s new in Google Workspace

    Matthew Izatt, Product Manager, Google Cloud

    Erika Trautman, Director Product Management, Google Cloud

    Join us for an interactive demo and see the latest Google Workspace innovations in action. As the needs of our users shifted over the past year, we’ve delivered entirely new experiences to help people connect, create, and collaborate—across Gmail, Drive, Meet, Docs, and the rest of the apps. You’ll see how Google Workspace meets the needs of different types of users with thoughtfully designed experiences that are easy to use and easy to love, Then, we’ll go under the hood to show you the range of ways to build powerful integrations and apps for Google Workspace using tools that span from no-code to professional grade.

    2. Developer Platform State of the Union: Google Workspace

    Charles Maxson, Developer Advocate, Google Cloud

    Steven Bazyl, Developer Relations Engineer, Google Cloud

    Google Workspace offers a comprehensive developer platform to support every developer who’s on a journey to customize and enhance Google Workspace. In this session, take a deeper dive into the new tools, technologies, and advances across the Google Workspace developer platform that can help you create even better integrations, extensions, and workflows. We’ll focus on updates for Google Apps Script, Google Workspace Add-ons, Chat apps, APIs, AppSheet, and Google Workspace Marketplace.

    3. How Miro, Docusign, Adobe and Atlassian are helping organizations centralize their work

    Matt Izatt, Group Product Manager, Google Cloud

    David Grabner, Product Lead, Apps & Integrations, Miro

    Integrations make Google Workspace the hub for your work and give users more value by bringing all their tools into one space. Our ecosystem allows users to connect industry-leading software and custom-built applications with Google Workspace to centralize important information from the tools you use every day. And integrations are not limited to Gmail, Docs, or your favorite Google apps – they’re also available for Chat. With Chat apps, users can seamlessly blend conversations with automation and timely information to accelerate teamwork directly from within a core communication tool.

    In this session, we’ll briefly review the Google Workspace platform and how Miro and Atlassian are helping organizations centralize their work and keep important information a mouse click or a tap away.

    4. Learn how customers are empowering their workforce to customize Google Workspace

    Charles Maxson, Developer Advocate, Google Cloud

    Aspi Havewala, Global Head of Digital Workplace, Verizon

    Organizations small and large are seeing their needs grow increasingly diverse as they pursue digital transformation projects. Many of our customers are empowering their workforces by allowing them to build advanced workflows and customizations using Google Apps Script. It’s a powerful low-code development platform included with Google Workspace that makes it fast and easy to build custom business solutions for your favorite Google Workspace applications – from macro automations to custom functions and menus. In this session, we’ll do a quick overview of the Apps Script platform and hear from customers who are using it to enable their organizations.

    5. Transform your business operations with no-code apps

    Arthur Rallu, Product Manager, Google Cloud

    Paula Bell, Business Process Analyst, Kentucky Power Company, American Electric Power

    Building business apps has become something anyone can do. Don’t believe us? Join this session to learn how Paula Bell, who self describes as a person with “zero coding experience” built a series of mission-critical apps on AppSheet that revolutionized how Kentucky Power, a branch of American Electric Power, runs their field operations.

    6. How AppSheet helps you work smarter with Google Workspace

    Mike Procopio, Senior Staff Software Engineer, Google Cloud

    Millions of Google Workspace users are looking for new ways to reclaim time and work smarter within Google Workspace. AppSheet, Google Workspace’s first-party extensibility platform, will be announcing several new features that will allow people to automate and customize their work within their Google Workspace environment – all without having to write a line of code.

    Join this session to learn how you can use these new features to work smarter in Google Workspace.

    7. How to govern an innovative workforce and reduce Shadow IT

    Kamila Klimek, Product Manager, Google Cloud

    Jacinto Pelayo, Chief Executive Officer, Evenbytes

    For organizations focused on growth, finding new ways that employees can use technology to work smarter and innovate is key to their success. But enabling employees to create their own solutions comes at a cost that IT is keenly aware of. The threats of external hacks, data leaks, and shadow IT make it difficult for IT to find a solution that gives them the control and visibility they need, while still empowering their workforce. AppSheet was built with these challenges in mind.

    Join our session to learn how you can use AppSheet to effectively govern your workforce and reduce security threats, all while giving employees the tools to make robust, enterprise-grade applications.

    To learn more about these sessions and to register, visit the Next ‘21 website and also check out my playlist of Next ‘21 content.

    Deliver asynchronous notifications in Google Chat using webhooks

    Posted by Charles Maxson, Developer Advocate & Justin Wexler, Strategic Cloud Engineer

    As Google Workspace is redefining the future of team collaboration and Google Chat Rooms evolve into Spaces, webhooks are a useful feature that already exists in the current Chat rooms of today that allow you to deliver asynchronous messages directly into Chat rooms where users work. Webhooks in Chat are powerful and simple to use. Unlike the more well known Chatbots, which are applications built specifically for interacting synchronously with users using the Google Chat API, webhooks enable asynchronous messaging into Google Chat from applications that aren’t bots themselves. In this post, we’ll explore using webhooks in Chat and demonstrate a real world use case from our work internally at Google.

    The Case for Webhooks in Google Chat

    Teams create and use Rooms (now Spaces) in Google Chat for many purposes. Some rooms may work along themes, such as Sales Support or Customer Service topics, while others may be more generic for specific departments or company-wide conversations. But all these use cases are centered on human activity, and as we rely on them more and more, they have become a critical way we communicate with each other.

    Webhooks allow you to add another dimension to rooms by introducing information and updates from other systems and applications that fit in with the theme of these rooms and conversations. For example, in a Sales Support room, a webhook could provide alerts from a CRM system notifying users when a deal closes or when a RFP deadline is approaching. In a Customer Service room, a webhook can post urgent alerts for requests to immediately get the attention of the whole team. For more generic scenarios, webhooks can be used to remind folks in a department about upcoming deadlines or broadly share a company’s stock price with all employees at the close of the market. Whatever the situation, webhooks can help efficiently deliver data and information in real time.

    A Google Real World Use Case

    We have a Chat room at Google named G Workspace Community that is used to connect Googlers who want to ask questions and stay up to date with news across our product and customer teams focused on Google Workspace. As you can imagine, this room is widely used, resulting in a constant flow of posts and responses every day. One of the most commonly discussed topics is around new features, which includes keeping track of their launch timing and status on our roadmap.

    At Google, we also produce the Google Workspace Updates blog, a public feed that lets everyone know when new Workspace features ship. It would be logical to assume every member of the G Workspace Community also subscribes to the Updates blog and is up to date on every feature release. But the truth is the G Workspace Community Chat room has become the main resource where Googlers get the latest information about Google Workspace. Instead of referring room members to check the blog first before posting in the Chat room asking about releases, we decided to bring the Google Workspace Updates feed into the Google Workspace Community room. Webhooks in Google Chat made it easy, and now everybody can easily stay up to date on all the updates from Google Workspace.

    Meet the Google Workspace Updates “bot”

    As posts about new Workspace features are released on the Updates blog, the Google Workspace Updates “bot” (aka the Google Wexbot as its known internally after its creator, Justin Wexler) adds a new thread to the Chat room that calls out the post’s title and the first 250 characters of it’s main content. This offers room members a quick glimpse of what just launched, as well as a place to quickly have a discussion around the blog content. Users can ask questions or add comments about the feature release, making it a much more enhanced and collaborative experience, and they can get the full story on the Updates blog by simply clicking READ MORE.

    Image of Google Workspace Updates bot

    Webhooks + Apps Script = Magic

    For community members receiving these timely updates, this “bot” may seem magical. In reality, it’s neither magic nor a traditional Chat bot, so the reference in the Chat UI calling it a “bot” is a bit of a misnomer. The Google Updates “bot” is in fact a simple Google Apps Script application that parses the RSS feed about new posts, and sends them asynchronously to the room via webhooks.

    Apps Script is well suited to help deliver on this use case, as it offers triggers (ie. cron jobs) that can run on time-based intervals to check the Updates blog for new posts, parse the feed XML from those posts, and return those results using the Chat Card format to the waiting webhook via a UrlFetchApp call.

    In our internal implementation of the Google Workspace Updates “bot”, an Apps Script trigger runs hourly to check for new posts to the Update blog. Beyond that, the project itself is a single Apps Script project file that doesn’t require a significant amount of coding, is super easy to configure with Chat rooms, and has been essentially maintenance free. Justin’s effort to create the original version only took a couple of days — and the value for the users is clearly worth it — hence why they insisted on naming it after him 😉

    Add Google Workspace Updates “bot” (aka Wexbot) to your own Chat rooms

    If you are interested in adding your own Google Workspace Updates “bot”, or you’d like to see how you can leverage Apps Script to fulfill other use cases for sending asynchronous messages to Google Chat via webhooks, the project is available up on GitHub for you to explore and implement:

    Google Chat Updates Bot Project – GitHub

    README | Apps Script Code.js

    More Resources

    To start learn more about working with Google Workspace Chatbots and using webhooks, please explore the following resources:

    And remember to sign up for the Google Workspace Developer Newsletter!

    Add dialogs and slash commands to your Google Workspace Chat bots

    Posted by Charles Maxson, Developer Advocate

    Developing your own custom Google Chat bot is a great way for users and teams to interact with your solutions and services both directly and within context as they collaborate in Chat. More specifically, Chat bots can be used in group conversations to streamline workflows, assist with activities in the context of discussions, and provide information and notifications in real time. Chat bots can also be used in direct messages, offering a new way to optimize workflows and personal productivity, such as managing project tasks or reporting time activity. Because use cases for bots are varied, you can consistently reach a growing audience of Chat users over time, directly where they work and uh-hum, chat.

    Once you’ve identified your specific use case for your custom Chat bot, how you design the bot itself is super important. Bots that are intuitive and easy to use see better adoption and develop a more loyal following. Those that are not as fluid or approachable, or come across as confusing and complicated to use, will likely miss the mark of becoming an essential “sticky” tool even if your back end is compelling. To help you build an engaging, must-have Google Chat bot, we recently added a one-two feature punch to the Chat bot framework that allows you to build a much richer bot experience than ever before!

    (Re)Introducing slash commands for Google Chat bots

    The first new(er) feature that you can leverage to enhance the usability of your Chat bots are slash commands. Released a few months back, slash commands simplify the way users interact with your Chat bot, offering them a visual leading way to discover and execute your bot’s primary features. Unlike bots created prior to slash commands, where users had to learn what features a bot offered and then invoke the bot and type the command correctly to execute them, slash commands make Chat bot usage faster and help users get the most out of your bot.

    Users can now simply type “/” in the message line to reveal a list of all the functions offered by the bots available to the room or direct message, and select the one to their liking to execute it. Slash commands can be invoked standalone (e.g. /help) or include user added text as parameters (e.g. /new_task review project doc ) that the developer can handle when invoked. To help make bot command discovery even simpler, the slash commands list filters matching commands once the user starts typing beyond the / (e.g. “/h” shows all commands beginning with H). This is super helpful as more and more bots are added to a room, and as more bots with slash commands are introduced by developers. Also included directly in the Slash Command UI is a description of what each command does (up to 50 characters), easing the guesswork out of learning.

    Example of implementing slashbot in Google Chat

    As a developer, slash commands are straightforward to implement, and daresay essential in offering a better bot experience. In fact, if you have an existing Google Chat bot you’ve built and deployed, it’s likely more than worthwhile to revise your bot to include slash commands in an updated release.

    To add slash commands to any Chat bot, you will need to register your commands in the Hangouts Chat API configuration page. (e.g. https://console.cloud.google.com/apis/api/chat.googleapis.com/hangouts-chat?project=<?yourprojectname?>) There is a section for slash commands that allows you to provide the /name and the description the user will see, along with the important Command Id unique identifier (a number between 1-1000) that you will later need to handle these events in your code.

    Example of editing slash command

    When a user invokes your bot via a Slash Command, there is a slashCommand field attached to the message sent to the bot that indicates the call was initiated from a Slash Command. Remember users can still @mention your bot to call it directly by name without a / command and this helps you distinguish the difference. The message also includes the corresponding commandId for the invoked command based on what you set up in the bot configuration page, allowing you to identify the user’s requested command to execute. Finally, the message also offers additional annotations about the event and includes any argumentText supplied by the user already parsed from the command text itself.

    {
    ...
    "message": {
    "slashCommand": {
    "commandId": 4
    },
    "annotations": [
    {
    "length": 6,
    "slashCommand": {
    "type": "INVOKE",
    "commandId": 4,
    "bot": {
    "type": "BOT",
    "displayName": "Slashbot"
    },
    "commandName": "/debug"
    },
    "type": "SLASH_COMMAND"
    }
    ],
    ...
    "argumentText": " show code",
    "text": "/debug show code",
    ...
    }

    Here is a simple example used to determine if a Slash Command was invoked by the user, and if so, runs the requested command identified by its Command Id.

    function onMessage(event) {

    if (event.message.slashCommand) {

    switch (event.message.slashCommand.commandId) {
    case 1: // Command Id 1
    return { 'text': 'You called commandId 1' }

    case 2: // Command Id 2
    return { 'text': 'You called commandId 2' }

    case 3: // Help
    return { 'text': 'You asked for help' }

    }
    }
    }

    Introducing dialogs for Google Chat bots

    The second part of the one-two punch of new Google Chat bots features are dialogs. This is a brand new capability being introduced to the Chat bot framework that allows developers to build user interfaces to capture inputs and parameters in a structured, reliable way. This is a tremendous step forward for bot usability because it will simplify and streamline the process of users interacting with bot commands. Now with dialogs, users can be led visually to supply inputs via prompts, versus having to rely on wrapping bot commands with natural language inputs — and hoping they correctly executed syntax the bot could decipher.

    For developers, you can design UIs that are targeted to work precisely with the inputs you need users to supply your commands, without having to parse out arguments and logically infer the intent of users. In the end, dialogs will greatly expand the type of solution patterns and use cases that Chat bots can handle, as well as making the experience truly richer and more rewarding for users and developers alike.

    Slashbot project notifier

    Technically, Chat bot dialogs leverage the aforementioned slash commands combined with the existing Google Workspace Add-on Card framework to support the creation and handling of dialogs. To get started, you create a Slash Command that will invoke your dialog by designating it’s Slash command triggers a dialog setting to true in the Slash Command configuration process, as seen below:

    Example of enabling the slash command triggers a dialog setting

    Once you have configured a Slash Command to trigger a dialog, it will send an onMessage event when it’s invoked as it would before, but now it includes new details that indicate it is representing a dialog request. To handle this event you can use the example above with non-dialog Slash Command, using the commandId you can use a switch to determine what the user requested.

    Designing the actual elements that the dialog renders is where you draw from the Google Workspace Add-on Card-based framework. If you’ve built a new generation of Google Workspace Add-on, this part will be familiar where you construct widgets, add headers and sections, create events, etc. In fact, you can even reuse or share some of your Add-on UIs within your Chat bots, but do note there currently is a lighter subset of elements available for bots. The benefits of using Cards allows you to build modern, consistently-styled user interfaces for your bots that doesn’t require that you get bogged down in low level details like managing tags or CSS. You can learn more about working with Cards starting here. To make building your Cards-based interfaces for Add-ons and Chat bots even easier, we have also just introduced the GWAO Card Builder tool, which employs a drag-n-drop visual designer to boost your development efforts.

    Once you’ve assembled your Card’s widgets, to make it render as a dialog when invoked you must specify that its a DIALOG type within the action_response as seen stubbed out here below:

    {
    "action_response": {
    "type": "DIALOG",
    "dialog_action": {
    "dialog": {
    "body": {
    "sections": [
    {
    "widgets": [
    {
    "textInput": {
    "label": "Email",
    "type": "SINGLE_LINE",
    "name": "fieldEmail",
    "hintText": "Add others using a comma separator",
    ...

    Now with a working dialog, all there is left to do is handle user events once it’s displayed. Again this is similar to how you would handle events working with Cards within Add-ons. Your bot will receive an event that is type CARD_CLICKED with a DialogEventType set to SUBMIT_DIALOG. The actionMethodName value will let you know what element the user clicked to process the request, e.g. ‘assign’ as depicted below. The response includes the formInputs details which are the user provided inputs returned from the dialog, which you can process as your solution needs to.

    { dialogEventType: 'SUBMIT_DIALOG',
    type: 'CARD_CLICKED',
    action: { actionMethodName: 'assign' },
    ...
    common:
    { hostApp: 'CHAT',
    formInputs:
    { 'whotochoose-dropdown': [Object],
    whotochoose: [Object],
    email: [Object] },
    invokedFunction: 'assign' },
    isDialogEvent: true }

    Once your bot is finished processing its task, it can respond back to the user in one of two ways. The first is with a simple acknowledgement (aka OK) response letting them know their action was handled correctly and close out the dialog.

    {
    "action_response": {
    "type": "DIALOG",
    "dialog_action": {
    "action_status": "OK",
    ...

    The other option is to respond with another dialog, allowing you to follow-up with a new or revised dialog useful for complex or conditional input scenarios. This is accomplished as it was originally when you called a dialog using a dialog card within an ActionResponse to get started.

    {
    "action_response": {
    "type": "DIALOG",
    "dialog_action": {
    "dialog": {
    ...

    Next Steps

    To get started building Google Workspace Chat bots, or to add slash commands and dialogs to your existing Chat bots, please explore the following resources:

    Evolving Google Workspace Add-ons with Alternate Runtimes


    Posted by Charles Maxson, Developer Advocate

    Google Workspace Add-ons offer developers a simplified, structured, and safe way of integrating your solutions right within the Google Workspace user experience, allowing you to bring the logic and data of your application right within the reach of billions of Google Workspace users. So whether your goal is to help users avoid switching context from their inbox to your application, or to easily bring in data from your solution to Google Sheets, developing your own Google Workspace Add-ons makes a lot of sense to keep users productive, engaged and focused.

    While the concept of Add-ons for Google Workspace isn’t new per se, building add-ons for Google Workspace has come a long way since they were first introduced some years back. Originally designed to allow solution developers to extend our collaboration apps: Google Docs, Sheets, Forms and Slides, it’s now possible to create a single add-on project for Google Workspace that spans the entire suite, including Gmail, Drive and Calendar.

    The original design created for our collaboration apps also required you to use HTML, CSS and Google Apps Script to ‘hand roll’ elements like the user interface and events, requiring a bit more do-it-yourself effort (aka code) for developers, resulting in more inconsistency across the add-on market. That has evolved as Google Workspace Add-ons adopted Card-based interfaces more recently, allowing developers to simplify and standardize add-on building by leveraging just their knowledge of Google Apps Script.

    Introducing Alternate Runtimes for Google Workspace Add-ons

    Today we are pleased to announce that building Google Workspace Add-ons has evolved once again, this time to offer developers an alternative to using Apps Script for building add-ons with the general availability of Alternate Runtimes for Google Workspace Add-ons. Announced via an early access program mid last year, the release of Alternate Runtimes is a major breakthrough for Google Workspace developers who want to use their own development stack: hosting, tools, languages, packages, processes, etc.

    While Alternate Runtimes enables the same functionality that Apps Script does for building add-ons, the flexibility and the freedom to choose your dev environment plus the opportunity to decouple from Apps Script will likely yield greater developer productivity and performance gains for future projects. This commonly requested feature by Google Workspace solution developers has finally become a reality.

    Technically, there’s a little more effort in using the Alternate Runtimes method, as Apps Script does mask much of the complexity from the developer, but it’s essentially swapping in JSON for Apps Script in rendering the Cards service-based interfaces needed to drive Google Workspace Add-ons. Learn more about getting started with Alternate Runtimes here or try the five minute Quickstart for Alternate Runtimes to see it in action.

    Also note, whether you are just getting started or you are an experienced add-on builder, we have recently released the GWAO Card Builder tool that allows you to visually design the user interfaces for your Google Workspace Add-ons projects. It is a must-have for add-on developers using either Apps Script or Alternate Runtimes, enabling you to prototype and design Card UIs super fast without hassle and errors of hand coding JSON or Apps Script on your own.


    Google Workspace Card Builder Design Tool

    Further Introducing the Google Workspace Add-ons Cloud API

    Included with this launch of Alternate Runtimes for general availability is also the debut of the Google Workspace Add-ons Cloud API, which allows you to completely forgo using Apps Script for managing Google Workspace Add-on deployments using Alternate Runtimes. Unlike using Alternate Runtimes during the beta program where you still needed to create an Apps Script project to stub out your project endpoints via the manifest file, the Google Workspace Add-ons Cloud API allows you to create and manage your add-on deployment lifecycle with a series of command line instructions.

    With the Google Workspace Add-ons Cloud API you can create a deployment, install or delete a deployment, get a list of deployments, manage permissions and more. These are straightforward to use from a CLI like gcloud, which will help simplify developing and deploying Google Workspace Add-ons built via Alternate Runtimes. For documentation on how to use the new Add-ons Cloud API, refer back to the Quickstart: Create an add-on in a different coding language example.

    Showcase: Alternate Runtimes in Action

    While Alternate Runtimes for Google Workspace Add-ons is officially generally available as of today, a number of Google Cloud partner teams have already been working with the technology via our early adopter program. One of those Google Cloud partners, Zzapps based out of the Netherlands, has already been creating solutions using Alternate Runtimes in their work building Add-ons for customers.

    We asked Riël Notermans, owner of Zzapps (and Google Developer Expert), whose teams have been developing on Google Workspace for over a decade, to share his team’s key takeaways on Alternate Runtimes. He offered not only his insights, but added a few screenshots of one of their recent projects to illustrate as well. In Riël’s own words: “Now that we can use Alternate Runtimes for Add-ons, it changes how we approach projects from start to finish. Prototyping with GSAO makes it possible for us to quickly draft an add-on’s functionality, creating trust and clearness about what we will deliver. Alternate Runtimes makes it possible to tap into our existing applications with almost no effort. We only need to create a JSON response to push a card to interact with add-ons. Our developers are able to work in their own environment, keeping our own tools and development flow. Here’s an example below using a Node.js Express server project that we used to set email signatures, adding a few routes for the card but using our existing logic. The add-on is used to control the functionality.”


    Routing Add-on requests to existing logic

    “Being able to update your deployment for local development for live testing, without having to create new versions constantly, drastically improves the development experience.”


    Introduces advantage of instant testing of add-ons

    “Because the Add-on runtimes has built-in authorization and tokens, it is really easy to safely interact with the users data without building complex backend authentication.”


    Maximizing use of existing UI with Add-ons

    “In the end, we still offer our users solutions for a great experience with a Google Workspace Add-on, while our developers get to use the tools and processes that make them more productive, capable and accomplished”

    Creating Add-ons with Alternate Runtimes allows flexible, fast UI design

    For More Information

    If you want to learn more about using Alternate Runtimes for building Google Workspace Add-ons, here are some essential links for Google Workspace Add-on resources to get you started:

    Google People API now supports batch mutates and searches of Contacts


    Posted by Ting Huang, Software Engineer

    Some time ago, we announced that the Google Contacts API was being deprecated in favor of the People API, and it is scheduled for sunset on June 15, 2021. To aid in the process of migrating from Contacts API, we are pleased to announce that we have added two sets of new endpoints for working with contacts via the People API.

    First, we now have new write endpoints that allow developers to create, delete, and update multiple contacts at once. In addition, we also have new read endpoints that allow developers to search a user’s contacts using a prefix query. Both will greatly improve working with the People API, so let’s take a quick look at how you can leverage these new endpoints today.

    Getting Started with the People API

    Applications need to be authorized to access the API, so to get started you will need to create a project on the Google Developers Console with the People API enabled to get access to the service. If you are new to the Google APIs, you can follow the steps here to begin accessing People API.

    Google profile image

    Working with Batch Mutate Endpoints

    Once you’re authorized, you can simply create new contacts like this (using the Google APIs Client Library for Java):

    Person person = new Person();
    person.setNames(ImmutableList.of(new
    Name().setGivenName("John").setFamilyName("Doe")));
    ContactToCreate contactToCreate = new ContactToCreate();
    contactToCreate.setContactPerson(person);

    BatchCreateContactsRequest request = new BatchCreateContactsRequest();
    request.setContacts(ImmutableList.of(contactToCreate)).setReadMask("names");

    BatchCreateContactsResponse response =
    peopleService.people().batchCreateContacts(request).execute();

    The scope your app needs to authorize with is https://www.googleapis.com/auth/contacts. Full documentation on the people.batchCreateContacts method is available here.

    Similarly, you can update existing contacts like this:

    String resourceName = "people/c12345"; // existing contact resource name
    Person contactToUpdate =
    peopleService
    .people()
    .get(resourceName)
    .setPersonFields("names,emailAddresses")
    .execute();
    contactToUpdate.setNames(
    ImmutableList.of(new Name().setGivenName("John").setFamilyName("Doe")));

    BatchUpdateContactsRequest request = new BatchUpdateContactsRequest();
    ImmutableMap<String, Person> map =
    ImmutableMap.of(contactToUpdate.getResourceName(), contactToUpdate);
    request.setContacts(map).setUpdateMask("names")
    .setReadMask("names,emailAddresses");

    BatchUpdateContactsResponse response =
    peopleService.people().batchUpdateContacts(request).execute();

    Full documentation on the people.batchUpdateContacts method is available here.

    Working with Search Endpoints

    You can search through the authenticated user’s contacts like this:

    SearchResponse response = peopleService.people().searchContacts()
    .setQuery("query")
    .setReadMask("names,emailAddresses")
    .execute();

    The scope your app needs to authorize with is https://www.googleapis.com/auth/contacts or https://www.googleapis.com/auth/contacts.readonly. Full documentation on the people.searchContacts method is available here.

    You can also search through the authenticated user’s “other contacts” like this:

    SearchResponse response = peopleService.otherContacts().search()
    .setQuery("query")
    .setReadMask("names,emailAddresses")
    .execute();

    The scope your app needs to authorize with is https://www.googleapis.com/auth/contacts.other.readonly. Full documentation on the otherContacts.search method is available here.

    Next Steps

    We hope that these newly added features inspire you to create the next generation of cool web and mobile apps that delight your users and those in their circles of influence. To learn more about the People API, check out the official documentation here.

    Enhancing Add-ons in Gmail with Compose-time functions

    Posted by Jon Harmer, Product Manager, Google Workspace

    Google Workspace Add-ons can already do lots of cool things in Gmail. In addition to providing a way to interact with the other apps that you use every day, from the right hand sidebar as you read a Gmail message, Google Workspace add-ons can also provide another integration point: when you are composing new messages or replying to existing ones. This allows Google Workspace add-ons to make it easier for you to work with multiple applications when you are working on your daily routine of reading and responding to email.

    More ways of creating

    Previously, the only way a developer could modify the draft of a message in Gmail was by inserting content at the user’s cursor. But we have enhanced this functionality, and now you can enable your add-on to modify the To, CC, and BCC fields, the Subject Line, and you can insert content into the top or bottom of the message the user is composing.

    This opens up a number of interesting possibilities. You could use the add-on to BCC your CRM, which allows you to log that message to the appropriate CRM record. Or you could insert a footer to the message or a tag in the subject line depending on who the message is being sent to. You can even insert message templates into the top of the email and help users to compose messages in order to give them a nicer look and feel.

    Enhancing Add-ons in Gmail with Compose-time functions  gif

    Convenient and secure

    These enhancements to Compose Actions are a new feature of Google Workspace Add-ons, which means the moment you authorize action with the feature, they will work in Gmail across mobile and web. Google Workspace admins can also easily allowlist the add-ons they want to enable for their organization.

    Try Compose Actions today

    Google Workspace and Gmail users can check out the Google Workspace Marketplace to find and install add-ons, with more compose actions coming soon. Developers can also consult our documentation to build their own.

    Sign up for early access programs

    If you want to subscribe to news & updates about the Google Workspace developer platform or sign up to be considered for any of our Early Access Programs, click here.