PHPackages                             guywarner/laravel-google-chat-alerts - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. guywarner/laravel-google-chat-alerts

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

guywarner/laravel-google-chat-alerts
====================================

Send a message to GoogleChat

2.2.0(2y ago)5333.0k↓40.5%4MITPHPPHP ^8.0

Since Jan 4Pushed 2y ago1 watchersCompare

[ Source](https://github.com/guywarner/laravel-google-chat-alerts)[ Packagist](https://packagist.org/packages/guywarner/laravel-google-chat-alerts)[ Docs](https://github.com/guywarner/laravel-google-chat-alerts)[ RSS](/packages/guywarner-laravel-google-chat-alerts/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (11)Versions (16)Used By (0)

Quickly send a message to Google Chat
=====================================

[](#quickly-send-a-message-to-google-chat)

This package can quickly send alerts to Google Chat. You can use this to notify yourself of any noteworthy events happening in your app.

A hard fork of [Laravel Slack Alerts by Spatie](https://github.com/spatie/laravel-slack-alerts)

```
use GuyWarner\GoogleChatAlerts\Facades\GoogleChatAlert;

GoogleChatAlert::message("You have a new subscriber to the {$newsletter->name} newsletter!");
```

Under the hood, a job is used to communicate with Google Chat. This prevents your app from failing in case Google Chat is down.

Want to send alerts to Slack instead? Check out [laravel-slack-alerts](https://github.com/spatie/laravel-slack-alerts).

Want to send alerts to GoogleChat instead? Check out [laravel-discord-alerts](https://github.com/spatie/laravel-google-chat-alerts).

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require guywarner/laravel-google-chat-alerts
```

You can set a `GOOGLE_CHAT_ALERT_WEBHOOK` env variable containing a valid Google Chat webhook URL. You can learn how to get a webhook URL \[in the Google Chat API docs\]( Chat.com/messaging/webhooks).

Alternatively, you can publish the config file with:

```
php artisan vendor:publish --tag="google-chat-alerts-config"
```

This is the contents of the published config file:

```
return [
    /*
     * The webhook URLs that we'll use to send a message to Google Chat.
     */
    'webhook_urls' => [
        'default' => env('GOOGLE_CHAT_ALERT_WEBHOOK'),
    ],

    /*
     * This job will send the message to Google Chat. You can extend this
     * job to set timeouts, retries, etc...
     */
    'job' => GuyWarner\GoogleChatAlerts\Jobs\SendToGoogleChatChannelJob::class,
];
```

Usage
-----

[](#usage)

To send a message to Google Chat, simply call `GoogleChatAlert::message()` and pass it any message you want.

```
GoogleChatAlert::message("You have a new subscriber to the {$newsletter->name} newsletter!");
```

Using multiple webhooks
-----------------------

[](#using-multiple-webhooks)

You can also use an alternative webhook, by specify extra ones in the config file.

```
// in config/google-chat-alerts.php

'webhook_urls' => [
    'default' => 'https://chat.googleapis.com/v1/spaces/XXXX',
    'sales' => 'https://chat.googleapis.com/v1/spaces/YYYYYY',
],
```

The webhook to be used can be chosen using the `to` function.

```
use GuyWarner\GoogleChatAlerts\Facades\GoogleChatAlert;

GoogleChatAlert::to('sales')->message("You have a new subscriber to the {$newsletter->name} newsletter!");
```

Formatting
----------

[](#formatting)

### Markdown

[](#markdown)

You can format your messages with markup. Learn how [in the Google Chat API docs](https://developers.google.com/chat/api/guides/message-formats/basic#using_formatted_text_in_messages).

```
use GuyWarner\GoogleChatAlerts\Facades\GoogleChatAlert;

GoogleChatAlert::message("A message *with some bold statements* and _some italicized text_.");
```

### Messages that @mention all users

[](#messages-that-mention-all-users)

You can use the same emoji codes as in Google Chat. This means custom emoji's are also supported.

```
use GuyWarner\GoogleChatAlerts\Facades\GoogleChatAlert;

GoogleChatAlert::message("New support ticket. ");
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please report to  or via Twitter DM [@DigiGuyDev](https://twitter.com/DigiGuyDev)

Credits
-------

[](#credits)

- [Niels Vanpachtenbeke](https://github.com/Nielsvanpach)
- [Freek Van der Herten](https://github.com/freekmurze)
- [Guy Warner](https://github.com/guywarner/)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity40

Moderate usage in the ecosystem

Community15

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~90 days

Recently: every ~198 days

Total

10

Last Release

784d ago

Major Versions

0.0.4 → 1.0.02022-01-11

1.0.2 → 2.0.02022-01-31

### Community

Maintainers

![](https://www.gravatar.com/avatar/db4316655b0db0e24384ca27d2b5416cd950014f3ca6f907d011921b260187cf?d=identicon)[guywarner](/maintainers/guywarner)

---

Top Contributors

[![freekmurze](https://avatars.githubusercontent.com/u/483853?v=4)](https://github.com/freekmurze "freekmurze (43 commits)")[![Nielsvanpach](https://avatars.githubusercontent.com/u/10651054?v=4)](https://github.com/Nielsvanpach "Nielsvanpach (29 commits)")[![guywarner](https://avatars.githubusercontent.com/u/4702580?v=4)](https://github.com/guywarner "guywarner (26 commits)")[![miclf](https://avatars.githubusercontent.com/u/3188746?v=4)](https://github.com/miclf "miclf (2 commits)")[![riasvdv](https://avatars.githubusercontent.com/u/3626559?v=4)](https://github.com/riasvdv "riasvdv (1 commits)")

---

Tags

google-chat-botlaravellaravellaravel-google-chat-alertsgoogle-chat-bot

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/guywarner-laravel-google-chat-alerts/health.svg)

```
[![Health](https://phpackages.com/badges/guywarner-laravel-google-chat-alerts/health.svg)](https://phpackages.com/packages/guywarner-laravel-google-chat-alerts)
```

###  Alternatives

[spatie/laravel-data

Create unified resources and data transfer objects

1.8k28.9M627](/packages/spatie-laravel-data)[spatie/laravel-livewire-wizard

Build wizards using Livewire

4061.0M4](/packages/spatie-laravel-livewire-wizard)[hirethunk/verbs

An event sourcing package that feels nice.

513162.9k6](/packages/hirethunk-verbs)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

123544.7k](/packages/worksome-exchange)[ralphjsmit/livewire-urls

Get the previous and current url in Livewire.

82270.3k4](/packages/ralphjsmit-livewire-urls)[hydrat/filament-table-layout-toggle

Filament plugin adding a toggle button to tables, allowing user to switch between Grid and Table layouts.

6292.3k1](/packages/hydrat-filament-table-layout-toggle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
