Build a Notification Bot with Google Chat for Aria Orchestrator

Send Orchestrator notifications straight to a Google Chat space with an incoming webhook. No bot to host and no SMTP setup: one small action posts a JSON message from any workflow. Tested on VCF Operations Orchestrator 9.1.1.

In this article

How about a bot that brings Orchestrator notifications right into Google Chat, so your team gets the important bits without leaving the conversation? Chat is simpler and more fun to watch than email 😉, and it doesn’t need any SMTP configuration in Orchestrator. In this post, I’ll show how to send Google Chat messages from a workflow using an incoming webhook.

Tested on: VCF Operations Orchestrator 9.1.1 (Node.js 24 runtime, Nov 2026) and vRealize Orchestrator 8.x (original post, 2022).

Note: Google Chat webhooks need a Google Workspace Business or Enterprise account, and your admin must allow webhooks.

A vRO Notifications bot message in a Google Chat space

Why Google Chat

  • Notify a team space when a workflow completes successfully.
  • Send error notifications and assign them to a team member with an @mention.
  • Post daily reports and validation results to a team space.
  • And many more.

How it works

Incoming webhooks let you send messages into a Google Chat space from applications that aren’t Chat apps themselves. For example, Orchestrator can notify the team when a server goes down. There’s no bot application to write and host: Orchestrator just sends an HTTPS POST with a small JSON body to the webhook URL. It’s the low-effort way to add alerts and information feeds.

Orchestrator sending notifications to Google Chat through an incoming webhook

Step by step

Step 1: Register the incoming webhook

  • Open Google Chat in your browser.
  • Create a new space, or go to the space where you want the notifications.
Creating a new space in Google Chat
  • Click the arrow next to the space name and select Apps & integrations, then Add webhooks. (In 2022 this menu was called Manage webhooks, as in the screenshot.)
Space menu in Google Chat with the webhooks option
  • Name the webhook vRO Notifications, add an avatar URL, and click Save. You can use this 128×128 px avatar for your bot.
Incoming webhook named vRO Notifications with an avatar URL
  • Copy the webhook URL and keep it handy. You’ll need the part after https://chat.googleapis.com later. Treat it like a password, because anyone with this URL can post to your space.
Webhook URL listed next to the new webhook

Step 2: Import the Node.js action

  • Download the package from GitHub (see Download from GitHub below) and import it into Orchestrator.
  • Open the action sendNotificationsToGoogleChat. This action sends the message to Google Chat.
  • On 9.x: the package was built with the Node.js 12 runtime, which 9.x doesn’t have. Set the runtime to Node.js 24 and replace the script with the code below, which waits for Google’s response before it finishes.
sendNotificationsToGoogleChat action in the Orchestrator action editor
exports.handler = (context, inputs, callback) => {
    const https = require('https');
    const data = JSON.stringify({ text: inputs.message });
    const options = {
        hostname: 'chat.googleapis.com',
        port: 443,
        path: inputs.webhookPath,
        method: 'POST',
        headers: {
            'Content-Type': 'application/json; charset=UTF-8',
            'Content-Length': Buffer.byteLength(data)
        }
    };
    const req = https.request(options, res => {
        let body = '';
        res.on('data', d => { body += d; });
        res.on('end', () => {
            console.log('statusCode: ' + res.statusCode);
            callback(undefined, { status: res.statusCode, body: body });
        });
    });
    req.on('error', error => {
        console.log(error.message);
        callback(error.message, undefined);
    });
    req.write(data);
    req.end();
};
  • Run the action with two inputs: webhookPath (the webhook URL without https://chat.googleapis.com) and a test message.
Running the action with the webhook path and a test message

If everything is OK, you’ll see the message in your space:

Test message from the vRO Notifications bot in Google Chat

Step 3: Use the action in a workflow

Now let’s attach the action to a workflow, so the team is notified automatically. In this example, we’ll notify the team when the workflow fails.

  • Create a workflow named Demo Workflow – Chatbot and add a scriptable task that fails.
Demo workflow with a scriptable task that always fails
  • Add a Default error handler item, a scriptable task and the sendNotificationsToGoogleChat action.
Default error handler followed by a scriptable task and the notification action
  • In the new scriptable task, paste this script with the webhook path from your space. webhookPath and message are workflow variables bound to the action’s inputs.
webhookPath = "/v1/spaces/........";
message = "Important message for <users/all>: The workflow *";
message += workflow.rootWorkflow.name;
message += "* has failed";
  • Add an error variable and set it in Exception Handling on all the workflow items.
Error variable set in the Exception Handling of a workflow item
  • Click Run and wait for the workflow to fail.
Failed run of the demo workflow

Result

Check your space. The bot posts the failure message and @mentions everyone:

Workflow failure notification posted in Google Chat

Tip: the demo workflow is included in the package, so you can try it right away.

Format your messages

The message you pass to the action is the text of a Google Chat message. Here’s how to make it look nice.

Plain text

Every Google Chat message is a JSON object. A basic message with just plain text looks like this:

{ "text": "Your workflow \"Create Edge Gateway\" has completed successfully" }

In Google Chat, it looks like this:

Plain text message in Google Chat

Bold, italic and more

Google Chat supports basic formatting. Wrap the text with these symbols:

FormatSymbolExampleResult
Bold**hello*hello
Italic_ (underscore)_hello_hello
Strikethrough~~hello~hello
Monospace` (backquote)`hello`hello
Monospace block“` (three backquotes)“`
Hello
World
“`
Hello
World

For example, this JSON:

{ "text": "Your workflow *has completed successfully*!\nCustomer created with ID: _A21347-VPC_" }

puts this message in the space:

Message with bold and italic text in Google Chat

If your message contains a plain URL, such as https://example.com/foo, Google Chat links it automatically. To show different link text, use this syntax:

SyntaxRendering
<https://cloudblogger.co.in|my link text>my link text

The pipe and link text are optional, so <https://example.com/foo> and https://example.com/foo are the same.

@mention a user

The bot can @mention a user with their user ID, using this syntax: <users/USER_ID>. For example:

{ "text": "Hello <users/113352777658254482749> from vRO!" }

This produces a message like this:

Message that @mentions a user in Google Chat

To find a user’s ID in Google Chrome, right-click the user’s name in the chat and click Inspect:

Inspect option on a user's name in Google Chat
Developer tools highlighting the user element

The user ID is in the data-member-id attribute. Change user/human/113352777658254482749 to users/113352777658254482749 when you paste it into your message.

data-member-id attribute containing the user ID

@mention everyone

Use the special user ID all to @mention all the people in a space:

{ "text": "Important message for <users/all>: Code freeze starts at midnight tonight!" }

Card messages

Google Chat also supports cards, a richer layout that can show much more about your infrastructure. Here’s a simple example:

Example of a Google Chat card message

Things to watch out for

  • Rate limit. Webhooks in a space share a limit of about one message per second, so don’t post from a tight loop.
  • Chat apps must be allowed. If only some organizational units in your domain have Chat apps enabled, webhooks fail with 403 PERMISSION_DENIED: The caller does not have permission.
  • Direct messages. Webhooks work in direct messages only when all users have Chat apps enabled.
  • Browser only. You can set up webhooks only in Chat on the web, not in the mobile app.
  • One-way. A webhook can post messages, but it can’t read or reply to them.
  • Keep the URL secret. The webhook URL includes a key and token. Store it in a configuration element (as a SecureString) rather than hard-coding it in workflows you share.

Download from GitHub

Wrapping up

With one small action, any workflow can tell your team what’s happening, right where they already talk. If you build something nice on top of this, like card messages with VM details, feel free to share it in the comments. See you in the next post.


Discover more from Cloud Blogger

Subscribe to get the latest posts sent to your email.

Enjoyed this post?

Was this helpful?

4 responses to “Build a Notification Bot with Google Chat for Aria Orchestrator”

  1. shashank Avatar
    shashank

    i tried to build a card layout chat message with webhook, but getting errors i think card layouts are not supported in webhook.

    1. Mayank Goyal Avatar

      will check.

  2. Oscar Avatar

    Hi! I put this package in my vRO and say some like “polyglot” error… do you can write the code in only basic lenguage of programation… i understand “polyglot” need more licences. Thanks in advance.

Leave a Reply