Tag Archives: Google Workspace

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:

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:

Google Workspace for everyone

Since the launch of Gmail in 2004, and Google Docs two years later, we’ve been building flexible, helpful and innovative solutions that allow people to connect, create and collaborate securely — from anywhere on the planet and on any device. When we debuted Google Workspace last October, we not only introduced a new brand, but also our vision for a single, integrated experience for everyone: Everything you need to get anything done, now in one place. Across apps like Gmail, Chat, Calendar, Drive, Docs, Sheets, Meet and more, our consumer, enterprise and education users choose Google Workspace to stay in touch, share ideas and get more done together every day. 

Over the last year, we’ve delivered innovations that bring together the content, communications and tasks that help millions of businesses, nonprofits and classrooms transform how they collaborate, make the most of their time, and have more impact. Now we’re bringing those same innovations to everyone else. Starting today, all of Google Workspace is available to anyone with a Google account.

Bring your projects and passions to life in Google Workspace

By bringing Google Workspace to everyone, we’re making it easy for people to stay connected, get organized and achieve more together, whether it’s advancing a cause, planning your family reunion, assigning next steps for the PTA or discussing this month’s book club pick. 

You can create a secure collaboration space in Google Chat to keep everyone up-to-date, share ideas, and keep track of all your important info in one place, from videos and pictures of your last trip, to a Google Sheet of your family’s annual budget. Smart suggestions help you bring in recommended files and quickly include the right people with @-mentions, whether you’re drafting a message in Gmail to the whole group or scheduling a meeting invite in a shared Calendar. To keep things moving, you can use smart canvas to generate a checklist in Google Docs and quickly assign roles and next steps. And if your project calls for a spontaneous conversation, you can present the Doc, Sheet or Slide you’re working on together directly into a Google Meet call with just one click. 

What’s more, you’ll have peace of mind as you work with others knowing that we designed Google Workspace to operate on a secure foundation, with the protections needed to keep you safe, your data secure, and your information private.

Screenshot of Spaces in Google Workspace, showing a family planning a reunion

Planning the family reunion in Spaces

Starting today, you can enable the integrated experience in Google Workspace by turning on Google Chat. Use Rooms in Google Chat as a central place to connect, create and collaborate with others. Over the summer, we’ll evolve Rooms to become Spaces and introduce a streamlined and flexible user interface that helps you stay on top of everything that’s important. Powered by new features like in-line topic threading, presence indicators, custom statuses, expressive reactions, and a collapsible view, Spaces will seamlessly integrate with your files and tasks, becoming your new home in Google Workspace for getting more done — together. Learn more about our vision for collaborating in Spaces.

Introducing Google Workspace Individual

For some people, pursuing their passion and getting involved in the community leads to great business ideas. For other entrepreneurs, a single Google account is the basis for managing their long-established businesses or getting the word out about their next big endeavor. With Google Workspace Individual, we’re delivering a powerful, easy-to-use solution that was built to help people grow, run and protect their business.

With this new Google Workspace subscription offering, individual small business owners can get more done, show up more professionally and better serve their customers. Building on the integrated Google Workspace experience now available to everyone, the solution provides premium capabilities, including smart booking services, professional video meetings, personalized email marketing and much more on the way. Within their existing Google account, subscribers can easily manage all their personal and professional commitments from one place with access to Google support to get the most out of their solution.

Workspace Individual was created to help people focus their time on doing what they love — like meeting with customers and designing personalized services — and less time on everyday tasks like scheduling appointments and emailing customers. Workspace Individual is rolling out soon to six markets, including the United States, Canada, Mexico, Brazil, Australia and Japan.Sign up to receive updates on Google Workspace Individual. 

GIF of appointment booking page in Calendar

Easily set up and share appointment booking pages in Calendar

Google Workspace: How it’s done

Every day, the world's most innovative companies, schools and nonprofits use Google Workspace to transform how people work and achieve more together. It’s a daily part of how leading healthcare providers revolutionize patient care, schools turn remote learning into an immersive, personalized experience, and aerospace companies rethink flight. Now, with Google Workspace for everyone, you can organize your junior sports league with ease, take that fundraiser to the next level, or even turn your hobby into a business. Whatever it is, Google Workspace helps people (teams, families, friends, volunteers, neighbors...) connect, create and collaborate. Google Workspace is how it’s done.

12 Google Workspace updates for better collaboration

Since we launched Google Docs and Sheets 15 years ago, we’ve been pushing work documents away from being just digital pieces of paper and toward collaborative, linked content inspired by the web. Our mission is to build the future of work, and smart canvas is our next big step. 

Specifically, we're enhancing the apps that hundreds of millions of people use every day — like Docs, Sheets, and Slides — to transform collaboration and make Google Workspace even more flexible, interactive and intelligent. Between now and the end of the year, we’re rolling out new features that’ll make it easier for you to do your work and collaborate with your teammates, wherever you are. 

Here are 12 new features to help make collaboration even more seamless.


@-mention people, files and meetings

Already available, when you @-mention a person in a document, a smart chip shows you additional information like the person’s location, job title and contact information. And starting now, we’re introducing new smart chips in Docs for recommended files and meetings. To insert smart chips into your work, simply type "@" to see a list of recommended people, files and meetings. From web or mobile, your collaborators can then quickly skim associated meetings and people or preview linked documents, all without changing tabs or contexts. Smart chips will come to Sheets in the coming months.


A GIF demonstrating a file chip being inserted into a Doc, and then showing a preview of the linked file.

Use smart chips to recommend files and meetings in Docs.

Pageless Docs

With our new pageless format in Docs, you’ll be able to remove the boundaries of a page to create a surface that expands to whatever device or screen you’re using, making it easier to work with wide tables, large images or detailed feedback in comments. And if you want to print or convert to PDF, you’ll be able to easily switch back to a paginated view.


GIF of a browser window with pageless formatting for Docs, where the user is shrinking the browser and the doc is automatically adjusting to the width.

The new pageless formatting in Docs removes page boundaries and fits the document to your screen.

Emoji reactions in Docs

To gauge the team’s reactions as you work together, we're introducing emoji reactions in Docs in the next few months. ?


Inclusive language recommendations and other new assisted writing features

The assisted writing feature will also offer more inclusive language recommendations when it makes sense — like that you use the word “chairperson” instead of “chairman,” or “mail carrier” instead of “mailman,” for example. It will also make other stylistic suggestions, like to avoid passive voice or offensive language. All of this will help speed up your editing, and make your writing stronger.


Smarter meeting notes template in Docs

This new Docs template will automatically import any relevant information from a Calendar meeting invite, including smart chips for attendees and attached files.


Connected checklists in Docs

Starting this week in Docs, checklists are available on web and mobile. And you’ll soon be able to assign checklist items to other people and see these action items in Google Tasks, making it easier for everyone to manage a project’s To Do list. 


Table templates in Docs

Coming soon, we’ll also introduce table templates in Docs. Topic-voting tables will allow you to easily gather team feedback while project-tracker tables will help you capture milestones and statuses on the fly. 


Work in Meet directly from your Doc, Sheet or Slide

You can now present your content to a Google Meet call on the web directly from the Doc, Sheet, or Slide where you’re already working with your team. Jumping between collaborating in a document and a live conversation without skipping a beat helps the project — and the team — stay focused. And in the fall, we’re bringing Meet directly to Docs, Sheets, and Slides on the web, so people can actually see and hear each other while they’re collaborating.


A GIF of a browser window demonstrating the user launching a Meet directly from a Doc.

Launch a Meet directly from your Doc for easier collaboration.

Live captions and translations in Google Meet 

We currently offer live captions in five languages, with more on the way. And we’re introducing live translations of captions later this year, starting with English-language live captions translated into Spanish, Portuguese, French, or German, with many more languages to follow.


Timeline view in Sheets

You’ll be able to toggle between new views in Sheets to better manage and interact with your data. Our first launch will be a timeline view that makes tracking tasks easier and faster. This flexible view allows you to organize your data by owner, category, campaign, or whichever attribute fits best. Using a dynamic, interactive timeline strengthens your ability to manage things like marketing campaigns, project milestones, schedules, and cross-team collaborations. 


A GIF showing Sheets transitioning to a timeline view of the data

Use the new timeline view in Sheets to better manage and interact with your data.

More assisted analysis functionality in Sheets

We’re also adding more assisted analysis functionality in our Sheets web experience, with formula suggestions that make it easier for everyone to derive insights from data. Sheets intelligence helps you build and troubleshoot formulas, making data analysis faster and reducing errors.


A GIF of Sheets demonstrating assisted analysis functionality with a column of data

Use the assisted analysis functionality to help you build and troubleshoot formulas.

Create and edit Sheets, Docs and Slides from Google Chat rooms

Teams can now jump from a discussion in Google Chat directly to building content together. Creating and editing Sheets and Docs from Google Chat rooms is already live in our web experience, and we’ll enable it for Slides in the coming weeks. 


A still image of a Sheet open side-by-side in Rooms

Edit Sheets directly from a Google Chat room. 

As smart canvas drives the next era of collaboration in Google Workspace, we remain committed to providing a solution that’s flexible, helpful and that fuels innovation for organizations in every industry. On the frontlines, in corporate offices and across the countless workspaces in between, Google Workspace will continue to transform how work gets done.


A video introducing smart canvas, a new product experience for Google Workspace
10:25

See how a team collaborates with smart canvas to bring their best work to life — together.

12 Google Workspace updates for better collaboration

Since we launched Google Docs and Sheets 15 years ago, we’ve been pushing work documents away from being just digital pieces of paper and toward collaborative, linked content inspired by the web. Our mission is to build the future of work, and smart canvas is our next big step. 

Specifically, we're enhancing the apps that hundreds of millions of people use every day — like Docs, Sheets, and Slides — to transform collaboration and make Google Workspace even more flexible, interactive and intelligent. Between now and the end of the year, we’re rolling out new features that’ll make it easier for you to do your work and collaborate with your teammates, wherever you are. 

Here are 12 new features to help make collaboration even more seamless.


@-mention people, files and meetings

Already available, when you @-mention a person in a document, a smart chip shows you additional information like the person’s location, job title and contact information. And starting now, we’re introducing new smart chips in Docs for recommended files and meetings. To insert smart chips into your work, simply type "@" to see a list of recommended people, files and meetings. From web or mobile, your collaborators can then quickly skim associated meetings and people or preview linked documents, all without changing tabs or contexts. Smart chips will come to Sheets in the coming months.


A GIF demonstrating a file chip being inserted into a Doc, and then showing a preview of the linked file.

Use smart chips to recommend files and meetings in Docs.

Pageless Docs

With our new pageless format in Docs, you’ll be able to remove the boundaries of a page to create a surface that expands to whatever device or screen you’re using, making it easier to work with wide tables, large images or detailed feedback in comments. And if you want to print or convert to PDF, you’ll be able to easily switch back to a paginated view.


GIF of a browser window with pageless formatting for Docs, where the user is shrinking the browser and the doc is automatically adjusting to the width.

The new pageless formatting in Docs removes page boundaries and fits the document to your screen.

Emoji reactions in Docs

To gauge the team’s reactions as you work together, we're introducing emoji reactions in Docs in the next few months. ?


Inclusive language recommendations and other new assisted writing features

The assisted writing feature will also offer more inclusive language recommendations when it makes sense — like that you use the word “chairperson” instead of “chairman,” or “mail carrier” instead of “mailman,” for example. It will also make other stylistic suggestions, like to avoid passive voice or offensive language. All of this will help speed up your editing, and make your writing stronger.


Smarter meeting notes template in Docs

This new Docs template will automatically import any relevant information from a Calendar meeting invite, including smart chips for attendees and attached files.


Connected checklists in Docs

Starting this week in Docs, checklists are available on web and mobile. And you’ll soon be able to assign checklist items to other people and see these action items in Google Tasks, making it easier for everyone to manage a project’s To Do list. 


Table templates in Docs

Coming soon, we’ll also introduce table templates in Docs. Topic-voting tables will allow you to easily gather team feedback while project-tracker tables will help you capture milestones and statuses on the fly. 


Work in Meet directly from your Doc, Sheet or Slide

You can now present your content to a Google Meet call on the web directly from the Doc, Sheet, or Slide where you’re already working with your team. Jumping between collaborating in a document and a live conversation without skipping a beat helps the project — and the team — stay focused. And in the fall, we’re bringing Meet directly to Docs, Sheets, and Slides on the web, so people can actually see and hear each other while they’re collaborating.


A GIF of a browser window demonstrating the user launching a Meet directly from a Doc.

Launch a Meet directly from your Doc for easier collaboration.

Live captions and translations in Google Meet 

We currently offer live captions in five languages, with more on the way. And we’re introducing live translations of captions later this year, starting with English-language live captions translated into Spanish, Portuguese, French, or German, with many more languages to follow.


Timeline view in Sheets

You’ll be able to toggle between new views in Sheets to better manage and interact with your data. Our first launch will be a timeline view that makes tracking tasks easier and faster. This flexible view allows you to organize your data by owner, category, campaign, or whichever attribute fits best. Using a dynamic, interactive timeline strengthens your ability to manage things like marketing campaigns, project milestones, schedules, and cross-team collaborations. 


A GIF showing Sheets transitioning to a timeline view of the data

Use the new timeline view in Sheets to better manage and interact with your data.

More assisted analysis functionality in Sheets

We’re also adding more assisted analysis functionality in our Sheets web experience, with formula suggestions that make it easier for everyone to derive insights from data. Sheets intelligence helps you build and troubleshoot formulas, making data analysis faster and reducing errors.


A GIF of Sheets demonstrating assisted analysis functionality with a column of data

Use the assisted analysis functionality to help you build and troubleshoot formulas.

Create and edit Sheets, Docs and Slides from Google Chat rooms

Teams can now jump from a discussion in Google Chat directly to building content together. Creating and editing Sheets and Docs from Google Chat rooms is already live in our web experience, and we’ll enable it for Slides in the coming weeks. 


A still image of a Sheet open side-by-side in Rooms

Edit Sheets directly from a Google Chat room. 

As smart canvas drives the next era of collaboration in Google Workspace, we remain committed to providing a solution that’s flexible, helpful and that fuels innovation for organizations in every industry. On the frontlines, in corporate offices and across the countless workspaces in between, Google Workspace will continue to transform how work gets done.


A video introducing smart canvas, a new product experience for Google Workspace
10:25

See how a team collaborates with smart canvas to bring their best work to life — together.

New ways we’re making Meet calls easier (and more fun)

Almost exactly one year ago, in an effort to help everyone stay connected safely as the pandemic was taking hold, we announced that we were making Google Meet free for everyone. Since then, Meet has helped millions of people connect around the world. While it’s been hard for all of us to remain apart this past year, I’ve been proud to work on a product that’s let so many of us come together.

Helping everyone safely connect and collaborate is what drives us to continue improving Meet — from introducing features that make video calls more inclusive, such as automated live captions in five languages, to controls that create a safer and more dynamic learning environment for educators and students, to new mobile capabilities that promote a more inclusive meeting experience. Today, we’re announcing even more ways that Meet will continue providing you with secure, reliable and engaging meetings, starting with a refreshed look on the web and helpful features built with the latest in artificial intelligence.

A new design that makes it easier to present and engage with others

A presentation being unpinned to view all participants in a 12-person video meeting.

Unpin to make the presentation tile smaller and view all participants.

Starting next month, when viewing and sharing content with any group of people, you’ll have more space to see the content and others’ video feeds through our refreshed new look and improved ability to pin and unpin content. In the coming months, you will be able to pin multiple tiles to customize what you focus on. For example, you can highlight a presentation and the speaker, or multiple speakers at the same time. Participants’ names will always be visible, so you can quickly see who’s who, and better engage with everyone on the call. 

Two speakers pinned during a 16-tile video meeting.

Highlight different speakers and tiles for a better experience.

People have told us they concentrate better and often feel less tired when they don’t see themselves while talking. So we’re making it possible to resize, reposition or hide your own video feed. When doing so, you can use the freed-up space to see even more people on the call.

A participant minimizing their video feed in a 13-person group call.

Minimize your own video feed from view.

High-quality and reliable meetings on any device

We’re continuously investing in new ways to improve your audio and video experience in Meet. To support video calls when you’re on the go, we’re launching Data Saver this month. This feature limits data usage on mobile networks to allow you and the person you’re calling to save on data costs, which is especially important in countries where data costs can be high, like India, Indonesia and Brazil. 


Last year, we introduced low-light mode for Meet on mobile, using artificial intelligence to automatically adjust your video to make you more visible if you’re in a dark environment. Having too much light behind you — such as a window on a sunny day — can also be challenging for many cameras. Now, Google Meet on the web automatically detects when a user appears underexposed and enhances the brightness to improve their visibility. Light adjustment will be rolling out to Meet users everywhere in the coming weeks.
A person in the Green room of Google Meet where their video is brightened by the new Light adjustment feature.

Automatically enhance brightness and improve visibility. 

In addition, we’re introducing another feature powered by AI called Autozoom, which helps others see you more clearly by zooming in and positioning you squarely in front of your camera. Autozoom will be available to Google Workspace (paid) subscribers in the coming months. 

Fun new backgrounds on mobile and web 

Last month, we started rolling out background replace, Q&A and Polls for Meet to Android and iOS devices. In the coming weeks, we’re adding the ability to replace your background with a video. Video background replacement can help you maintain privacy for what’s behind you while also making your video calls more fun. There will initially be three options to choose from: a classroom, a party and a forest, with more on the way soon.

A person video calling using Google Meet with an animated background featuring cartoon characters dancing under a disco ball.

Use a video background to make calls more fun.

When we introduced a free version of Google Meet to the world a year ago, none of us knew just how much we’d come to rely on virtual meetings and gatherings to keep us connected to friends, family, colleagues and classmates. We’re grateful for all the stories and feedback our users and customers have shared along the way, helping us make Google Meet more engaging for everyone. Looking ahead, we’re excited to continue improving the Meet experience to further help in all the ways people connect, collaborate and celebrate.

More options for nonprofits with Google Workspace

Over 150,000 nonprofits use Google productivity tools every day to get more done for their communities. PlanetRead is an organization based in India that’s bringing literacy to millions by making reading a part of entertainment through Same Language Subtitling. They rely on Google Workspace — especially Gmail, Calendar, and Docs — to maximize their impact. Other mission-focused organizations use Google Workspace to better serve their communities, like Norway-based nonprofit ISFO Innherred Seniorforum. With the help of Google tools, they developed the SeniorSmart app to help seniors fight loneliness. To meet needs of organizations like these, we’re providing nonprofits with greater choice and flexibility.


Say hello to Google Workspace for Nonprofits 

G Suite for Nonprofits is now Google Workspace for Nonprofits. Like its predecessor, Google Workspace for Nonprofits helps teams collaborate more effectively. As was the case with G Suite, Google Workspace for Nonprofits is available at no cost and includes the productivity apps you know and love — Gmail, Calendar, Drive, Docs, Sheets, Slides, Meet and many more. 


Get continued access to Google Classroom at no additional cost

With Google Workspace for Nonprofits, organizations focused on education will still have access to Google Classroom to create and manage classes, assignments and grades online. Virginia-based MySecureKid is an organization that equips disadvantaged children for life and job readiness. They rely on Classroom — and will continue to do so —  for their online courses that covering topics ranging from entrepreneurship and financial literacy to internet safety and self-esteem. 

Image of three women in front of a sign that says, "Connecting to the future".

MySecureKid provides positive role models and hosts training, workshops and activities to help people feel confident in themselves to achieve their dreams. 

Find a plan that meets your needs 

For nonprofits that need access to more advanced tools to drive their mission forward, we have new discounts with you in mind. These discounts are designed specifically for nonprofit organizations that want to access the Business Standard, Business Plus and Enterprise editions of Google Workspace. Compare features and discounts of each edition here, so you can pick what works for your organization. 

With over 375,000 organizations across more than 60 countries in the program, Google for Nonprofits is on a mission to equip nonprofits with the best of Google tools. For organizations looking to get started with Google Workspace, check out our video tutorial and help center. You can also learn more about new Google Workspace features on the Cloud Blog.

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.

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.