PHPackages                             agrandesr/telegram-bot-action - 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. agrandesr/telegram-bot-action

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

agrandesr/telegram-bot-action
=============================

This Custom Action is a implementation for the Agile Router library.

05PHP

Since Apr 2Pushed 3y ago1 watchersCompare

[ Source](https://github.com/AGrandesR/PHPTelegramBotAction)[ Packagist](https://packagist.org/packages/agrandesr/telegram-bot-action)[ RSS](/packages/agrandesr-telegram-bot-action/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

PHPMailerAction
===============

[](#phpmaileraction)

*This package is an extension of Agrandesr/agile-router (v1.0+).*

This Custom Actions is a implementation to use a [Telegram Bot](https://github.com/MoonLiightz/PHP-Telegram-Class) package over Agile Router to send messages using this bot.

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

[](#installation)

First we need to require the package:

```
composer require agrandesr/customactions/TelegramBotAction
```

Next, we need to add to the Router before the run method.

```
require './vendor/autoload.php';

use Agrandesr\Router;

$router = new Router();

$router->addCustomAction('telegram','App\\CustomActions\\TelegramBotAction');

$router->run();
```

Now you can use the new action in your routes file.

```
{
    "mail":{
        "GET":{
            "execute":[
                {
                    "type":"telegram",
                    "content":{
                        "chatId":"example@test.com",
                        "message":"This is a random message",
                        "photo":"src/file/photo.png",
                        "audio":"src/file/audio.mp3"
                    }
                }
            ]
        }
    }
}
```

Finally, be sure that you add the API key of telegram into the .env file:

```
TELEGRAM_TOKEN=%YOUR_API_TOKEN%
```

And that is all, you can create a endpoint to send a email very easy.

Content parameters
------------------

[](#content-parameters)

Like you can see in the example, the action "PhpMailer" have the next parameters:

- chatId\['required'\]:
- message\['optional'\]:
- photo\['optional'\]:
- audio\['optional'\]:

###  Health Score

14

—

LowBetter than 1% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity23

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/61379065?v=4)[A.Grandes.R](/maintainers/AGrandesR)[@AGrandesR](https://github.com/AGrandesR)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/agrandesr-telegram-bot-action/health.svg)

```
[![Health](https://phpackages.com/badges/agrandesr-telegram-bot-action/health.svg)](https://phpackages.com/packages/agrandesr-telegram-bot-action)
```

###  Alternatives

[ornicar/php-user-agent

149310.0k](/packages/ornicar-php-user-agent)[rappasoft/lockout

Put your Laravel application into read-only mode.

96293.3k2](/packages/rappasoft-lockout)[yriveiro/php-backoff

Simple backoff / retry functionality

2780.9k1](/packages/yriveiro-php-backoff)[mdwheele/zalgo

His six mouths speak in different tongues, and the seventh shall sing the song that ends the earth.

4620.1k11](/packages/mdwheele-zalgo)[a2design-inc/laravel-form-builder

Form Builder for the Laravel Framework

102.4k](/packages/a2design-inc-laravel-form-builder)

PHPackages © 2026

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