Skip to content
terminal

GitHub Action

Google Chat Text Message

v1.0.0 Latest version

Google Chat Text Message

terminal

Google Chat Text Message

Send google Chat Text message to a Space using Webhook

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Google Chat Text Message

uses: teknatha136/[email protected]

Learn more about this action in teknatha136/actions-google-chat-text-message

Choose a version

Send Google Chat Text Message using space incoming Webhook

Note: This action is only for sending text messages, does not support Card messages.

TO make use of this action add the following steps to your GitHub Action workflow:

      - uses: ByteBhutan/actions-google-chat-text-message@main
        with:
          google-chat-webhook: ${{ secrets.GOOGLE_CHAT_WEBHOOK }}
          text-message: The actual Message

In above action google-chat-webhook take the Google Chat Space's incoming webhook. Follow docs https://developers.google.com/chat/how-tos/webhooks#create_a_webhook to create a webhook.

text-message is the actual message you want to send.

Example usage

name: Google Chat
on:
  push:
    branches: ["**"]    
jobs:
  send-message:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout Code
        uses: actions/checkout@v3
      - uses: ByteBhutan/actions-google-chat-text-message@main
        with:
          google-chat-webhook: ${{ secrets.GOOGLE_CHAT_WEBHOOK }}
          text-message: Hello,\nThis is a test message.\nMessage sent by ${{ github.actor }}

This example delivers message as below.

Text message example