AppsScriptPulse

Using webhooks to interact with Google Chat using Google Apps Script

Learn how to conduct a pirate raid in Google Chat Spaces with Webhooks and Google Apps Script. Video Included.

Google continue to add and enhance Google Chat. The fun doesn’t stop at the end user experience, Google also adding functionality to the Google Chat API. A low-lying entry point for Google Workspace developers is using Google Chat webhooks. As a HTTP endpoint you can use your coding language of choice.

In this tutorial from Scott Donald you can learn how Google Apps Script can be used to interface Google Chat using webhooks. The post includes everything you need to get started including a tutorial video. There are some nice tips including how to post replies to a chat thread and formatting responses using the card service. Follow the link to start learning more…

Source: Creating Webhooks for Google Chat App with Apps Script – Yagisanatode

Adding users to Google Chat spaces on demand with Google Apps Script

Image credit: Pablo Felip

A Chat space membership authorization workflow built using Google Forms, Sheets and Apps Script. … In the coming sections, we’ll build a workflow for process managers to review and authorize membership requests sent by users willing to join a predefined set of chat spaces.

Lots of talk about Meta’s new Threads … is there an API for that. Meanwhile Pablo Felip has been busy putting together this very comprehensive tutorial which explains how you can use Google Forms as part of a process to administer Google Chat Spaces membership.

The API call spaces.members.create is relatively straightforward when compared to the amount of effort to setup the Google Cloud project. This is all covered in the source post and the code provided can easily be modified to suit other worksflows.

Source: Adding users to Google Chat spaces on demand with Apps Script

NEW Google Chat Import Mode APIs to support message platform migration are now in developer preview

We’re excited to announce that new Google Chat Import Mode APIs are now available in the Developer Preview Program! Import Mode allows developers to import data from other messaging systems while maintaining historical timestamps for messages and spaces. Data from large channels can be copied into Chat spaces silently without notifying the user, sending emails, etc until the admin is ready to have users start using the new space in Chat.

Google are continuing to add developer features to the Google Chat platform, the latest being Import Mode APIs. Theses APIs are designed to help when transitioning from other messaging platforms to Google Chat. Google highlight the following advantages of the new Import Mode APIs:

  • Preservation of resource creation timestamps. You can set a historical time for the creation times of space and message resources, letting Chat apps retain historical context during user adoption of Google Chat.
  • End users can’t view or access spaces in import mode. To prevent user interference of a space undergoing data import, or to avoid possible user confusion as a result of viewing an in-progress data import, spaces in import mode are hidden from end users. After a space has completed import mode, you can add users to the space.
  • Chat turns off notifications during import mode, so that users can avoid unnecessary alerts about the migration. [Ref]

The new Import Mode APIs are currently in Developer Preview and if not already part of the preview program the linked page includes information on how to join.

Source: Overview of developing Google Chat apps to import user data  |  Google for Developers

Google Chat developer platform release notes – new Chat APIs generally available

Video credit: Pablo Felip Monferrer / @pfelipm

Build Chat apps that bring your services and resources right into Google Chat, letting users get information and take action without leaving the conversation.

Google has been spending a lot of effort recently adding features to Google Chat. This just hasn’t been limited to the user interface and Google recently announced a long list of new Chat API methods are now generally available. For Google Workspace developers and administrators this opens up more opportunities to manage chat messages, spaces and membership.

For Apps Script developers I think it’s unlikely you’ll see a ChatApp or a Chat Advanced Service, but with an OAuth2 library you’ll be able to make calls to the Chat REST API. With the new Google Chat API methods comes the ability to access user data and perform operations on the authenticated user’s behalf. I don’t think it will take long before we see example solutions appearing from the community and given this video from Pablo Felip Monferrer I’ll be keep a close eye on his blog pablofelip.online.

Source: Google Chat developer platform release notes  |  Google for Developers

Develop a Google Chat App Currency Converter with Google Apps Script – Yagisanatode

Have you ever wanted to convert currencies instantly while in Google Chat with colleagues and clients? In this tutorial, we are going to build a Currency Converter Google Chat App with Google Apps Script to do just that.

This tutorial is a multi-media series containing step-by-step video instructions for each stage of the process along with code snippets for each stage, important links and some further details on the more unusual parts of the code.

This is a great video series wrapped in a blog post, which highlights a Google Chat app development process. The particular project presented by Scott Donald is a currency converter but there are many repeatable aspects that would work in a wide range of Google Chat applications. The project is coded in Google Apps Script and the post includes plenty of snippets to help you understand various aspects of Google Chat app development including slash commands and information cards.

Source: Develop a Google Chat App Currency Converter with Google Apps Script – Yagisanatode

Google Chat Apps for Google Apps Script Developers

In this article, we will look at Google Chat Apps and go over some of the basics of developing a chat app with Google Apps Script.

Scott Donald provides a comprehensive overview of everything you need to know to get started with Google Chat app development with Google Apps Script.

One of the nice things about Google Chat app development is there are a number of different implementation architectures you can use, including Google Apps Script. Regardless of the architecture you choose there are some common steps such as GCP setup, receiving/responding to messages and using dialogues and card interfaces all covered in Scott’s post. Click through to find out more…

Source: Google Chat Apps for Google Apps Script Developers – Yagisanatode

Introducing ‘Twitter for Google Chat’ – a Chat app built using Apps Script

Preview tweets and user data when sharing links, along with the ability to follow a specific user or like a particular tweet.

If you haven’t looked at Google Chat apps or not looked at Chat apps for a while this is a great post from Sourabh Choraria outlining the development process using Google Apps Script. As part of this Sourabh includes an overview and source code for a Twitter powered Chat app recently published and available to try out in your Google Workspace domain. The app showcases slash commands as well as a recent new feature of preview links.

Source: Introducing ‘Twitter for Google Chat’ – a Chat app built using Apps Script

Creating Google Workspace Chat Apps: What developers need to know – [online event 24 August 2022 16:00 – 16:45 UTC]

Image credit: Google

Teams and organizations are shifting to Google Chat as their primary way to stay connected and collaborate in real time, giving developers the unique opportunity to build Chat-integrated Google Workspace apps to help their users do more. In this session, we’ll discuss use cases for chat apps, the architectural options you can choose from, and how to get started building your own. Make sure to bring your questions!

Charles Maxson and Chanel Greco are both top presenters and they will be teaming up on the 24 August 2022 for a Google Cloud OnAir event to share the latest on Google Chat app development. For those unfamiliar there are various platforms/architectures for developing Chat apps, one of which is Google Apps Script. You should be able to find out more about this and more at the session.

Source: Creating Google Workspace chat apps—what developers need to know

Make software development much more agile with Google Workspace [Google Chat apps and Add-ons]

Image credit: Google

Learn how developers use Google Workspace to centralize and integrate all of their favorite Agile and DevOps tools like Jira, GitHub, Datadog, and PagerDuty.

From the Google Cloud Blog you can learn how Google Workspace is being used to make software development more agile. For Google Workspace developers this includes a number of products you might want to consider. Additionally, this post is a great way to see how Google Chat apps and Workspace Add-ons are being seamlessly integrated to expand the functionality of Google Workspace. If you haven’t recently looked at the opportunities with developing Google Chat apps you probably should…

Source: Make software development much more agile with Google Workspace | Google Cloud Blog

Create Spaces and add members with the Google Chat API (and introducing the Google Workspace Developer Preview program)

Image credit: Google

In Google Chat, Spaces serve as a central place for team collaboration—instead of starting an email chain or scheduling a meeting, teams can move conversations and collaboration into a space, giving everybody the ability to stay connected, reference team or project info and revisit work asynchronously.

We are pleased to announce that you can programmatically create new Spaces and add members on behalf of users, through the Google Workspace Developer Preview Program via the Google Chat API.

Besides the new ability to programmatically create and populate Google Chat spaces outlined in the source post, if you are a member of the  Google Cloud Partner Advantage program you may want to apply for the new Google Workspace Developer Preview Program. This program will give you access to this new Chat API functionality and other Google Workspace Developer preview developments.

Not a Cloud Partner Advantage member? You can apply to join

If you are interested in building on the Google Chat platform there is the What’s new in the world of Google Chat apps session at Google I/O (this session will be available on-demand from 12 May 2022).

Source: Now in Developer Preview: Create Spaces and Add Members with the Google Chat API