PHPackages                             savan/gchat-error-alert - 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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. savan/gchat-error-alert

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

savan/gchat-error-alert
=======================

Google Chat error alert package for Laravel

v1.0.1(2mo ago)09MITPHPPHP ^7.4|^8.0|^8.1|^8.2|^8.3

Since Mar 3Pushed 2mo agoCompare

[ Source](https://github.com/savan4794/gchat-error-alert)[ Packagist](https://packagist.org/packages/savan/gchat-error-alert)[ RSS](/packages/savan-gchat-error-alert/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

Laravel GChat Alert
===================

[](#laravel-gchat-alert)

Send Laravel application error alerts directly to Google Chat using Incoming Webhooks.

This package integrates with Laravel's logging system and sends log events to a Google Chat space.

Supports Laravel 8, 9, 10, 11 and 12.

---

🚀 Features
----------

[](#-features)

- Google Chat webhook integration
- Custom Monolog logging driver
- Supports Laravel 8--12
- Environment-based log level filtering
- Auto-discovery support
- Works with HTTP &amp; CLI errors
- Compatible with Monolog 2 &amp; 3
- Plug &amp; Play configuration

---

📦 Installation
--------------

[](#-installation)

Install via Composer:

```
composer require savan/gchat-error-alert

```

---

🔧 Step 1: Create Google Chat Webhook
------------------------------------

[](#-step-1-create-google-chat-webhook)

1. Open Google Chat
2. Go to the Space where you want alerts
3. Click Space name → Manage Webhooks
4. Click **Add Webhook**
5. Copy the generated Webhook URL

Example webhook:

```
https://chat.googleapis.com/v1/spaces/XXXX/messages?key=XXX&token=XXX

```

---

⚙ Step 2: Publish Configuration
-------------------------------

[](#-step-2-publish-configuration)

Run:

```
php artisan vendor:publish --tag=gchat-alert-config

```

This will create:

```
config/gchat-alert.php

```

---

🧾 Step 3: Configure Environment Variables
-----------------------------------------

[](#-step-3-configure-environment-variables)

Add to your `.env` file:

```
GCHAT_ALERT_ENABLED=true
GCHAT_ALERT_WEBHOOK=https://chat.googleapis.com/v1/spaces/XXXX/messages?key=XXX&token=XXX
GCHAT_ALERT_LEVEL=error

```

---

📝 Step 4: Configure Logging
---------------------------

[](#-step-4-configure-logging)

Open:

```
config/logging.php

```

Add this channel inside `channels`:

```
'gchat' => [
    'driver' => 'gchat',
],

```

Then add it to your stack:

```
'stack' => [
    'driver' => 'stack',
    'channels' => ['daily', 'gchat'],
],

```

Make sure your default log channel is:

```
LOG_CHANNEL=stack

```

---

🔥 Step 5: Clear Configuration Cache
-----------------------------------

[](#-step-5-clear-configuration-cache)

```
php artisan config:clear
php artisan cache:clear

```

---

🧪 Testing
---------

[](#-testing)

Create a test route:

```
use Illuminate\Support\Facades\Log;

Route::get('/test-alert', function () {
    Log::error('Test error from Laravel GChat Alert');
    return 'Alert Sent';
});

```

Visit:

```
/test-alert

```

You should receive a Google Chat alert.

---

📊 Log Levels
------------

[](#-log-levels)

Available levels (highest to lowest severity):

- emergency
- alert
- critical
- error
- warning
- notice
- info
- debug

If `GCHAT_ALERT_LEVEL=error`, it will send:

- error
- critical
- alert
- emergency

---

🖥 CLI &amp; Queue Support
-------------------------

[](#-cli--queue-support)

This package captures:

- HTTP request errors
- Artisan command errors
- Queue worker failures
- Scheduled task errors
- Runtime CLI exceptions

---

🛠 Requirements
--------------

[](#-requirements)

- PHP 7.4+
- Laravel 8 -- 12
- Google Chat Incoming Webhook

---

❌ Troubleshooting
-----------------

[](#-troubleshooting)

If you are not receiving alerts, check:

1. `LOG_CHANNEL=stack`
2. `GCHAT_ALERT_ENABLED=true`
3. Webhook URL is correct
4. Log level is set correctly
5. Configuration cache is cleared

Run:

```
php artisan config:clear
composer dump-autoload

```

---

🏷 Versioning
------------

[](#-versioning)

This package follows Semantic Versioning:

- v1.0.0 -- Initial release
- v1.1.0 -- Feature update
- v1.1.1 -- Bug fix

---

📜 License
---------

[](#-license)

MIT License

---

👤 Author
--------

[](#-author)

Savan Rathod

---

⭐ Support
---------

[](#-support)

If you find this package useful, please consider giving it a star on GitHub.

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance86

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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 ~0 days

Total

2

Last Release

73d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/40eb5a022a433242e95afde7b137498a1f9f20a8f759101b03afea2300f1eeff?d=identicon)[savan4794](/maintainers/savan4794)

---

Top Contributors

[![savan4794](https://avatars.githubusercontent.com/u/98910431?v=4)](https://github.com/savan4794 "savan4794 (4 commits)")

### Embed Badge

![Health badge](/badges/savan-gchat-error-alert/health.svg)

```
[![Health](https://phpackages.com/badges/savan-gchat-error-alert/health.svg)](https://phpackages.com/packages/savan-gchat-error-alert)
```

###  Alternatives

[spatie/laravel-health

Monitor the health of a Laravel application

85810.0M83](/packages/spatie-laravel-health)[beyondcode/laravel-server-timing

Add Server-Timing header information from within your Laravel apps.

5712.0M1](/packages/beyondcode-laravel-server-timing)[rollbar/rollbar-laravel

Rollbar error monitoring integration for Laravel projects

14110.4M7](/packages/rollbar-rollbar-laravel)[yadahan/laravel-authentication-log

Laravel Authentication Log provides authentication logger and notification for Laravel.

416632.8k5](/packages/yadahan-laravel-authentication-log)[kitloong/laravel-app-logger

Laravel log for your application

101.2M8](/packages/kitloong-laravel-app-logger)[label84/laravel-auth-log

Log user authentication actions in Laravel.

3654.0k](/packages/label84-laravel-auth-log)

PHPackages © 2026

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