Send Messages to Google Chat

The Idea

If your church/organization is like ours, many staff conversations happen over Google Chat. It’d be pretty cool to let Rock chime in on some of those. This recipe will walk through setting up Rock to be able to send messages to a Chat space.

Overview

  1. Google - Create a Webhook for your Chat space to receive messages from Rock.
  2. Rock - Create a Rock Workflow to send the messages
  3. Extras - Expanding on this and future ideas

Google

Follow Google’s instructions here to create a webhook for the Chat space you want to send messages to. When set up, you’ll be given a url to post messages to. We’ll use this url in our Workflow. It’ll look something like this:

https://chat.googleapis.com/v1/spaces/{YourSpaceId}/messages?key={UniqueKey}

You also get to name the app and select a profile image for it. We use Chip for ours :)

Screenshot_2024-02-16_at_4.55.15 PM.png

Rock

Next we’ll look at creating a workflow action to send some text to the Chat space. What you do with this is up to you, but the example I’ll show here we use to post headcount numbers from our people counter sensors.

Earlier in the workflow, we use our people counter’s api to get the headcount from the last service. Then, we have a Lava Run action with the following code:

Extras