PHPackages                             genkovich/dialog-flow-bot-man-middleware - 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. genkovich/dialog-flow-bot-man-middleware

ActiveLibrary

genkovich/dialog-flow-bot-man-middleware
========================================

Middleware for BotMan (BotMan Studio). Integration with DialogFlow API v2.

0.0.6(5y ago)122.2k3[4 issues](https://github.com/genkovich/DialogFlowBotManMiddleware/issues)[1 PRs](https://github.com/genkovich/DialogFlowBotManMiddleware/pulls)MITPHPPHP &gt;=7.0

Since Mar 26Pushed 4y ago3 watchersCompare

[ Source](https://github.com/genkovich/DialogFlowBotManMiddleware)[ Packagist](https://packagist.org/packages/genkovich/dialog-flow-bot-man-middleware)[ RSS](/packages/genkovich-dialog-flow-bot-man-middleware/feed)WikiDiscussions main Synced yesterday

READMEChangelog (6)Dependencies (2)Versions (7)Used By (0)

BotMan DialogFlow Middleware
============================

[](#botman-dialogflow-middleware)

BotMan Middleware to connect DialogFlow with [BotMan](https://github.com/botman/botman)

[![Latest Version on Packagist](https://camo.githubusercontent.com/168b030db5377112e813ce5c3006cd2db1d401e5061a3f2437389d5903dae276/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f67656e6b6f766963682f6469616c6f672d666c6f772d626f742d6d616e2d6d6964646c65776172652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/botman/driver-facebook)![Packagist](https://camo.githubusercontent.com/12b0cfbdb6cf686674b8df4dad1a8c57078d16254015895d09085fe25152e176/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f67656e6b6f766963682f6469616c6f672d666c6f772d626f742d6d616e2d6d6964646c65776172652e737667)

Thank's to [@eclips16](https://github.com/eclips16). The code source was taken from [pull request](https://github.com/botman/botman/pull/1010).

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

[](#installation)

#### Composer

[](#composer)

```
composer require genkovich/dialog-flow-bot-man-middleware

```

Usage
-----

[](#usage)

### .env

[](#env)

```
GOOGLE_CLOUD_PROJECT=project-id
GOOGLE_APPLICATION_CREDENTIALS=/path/to/security-file.json
```

### Where can I get this variables?

[](#where-can-i-get-this-variables)

- Login at
- Create NewAgent (or use an existing one)
- Click on "Settings" icon (1)
- Copy your project id (2) into .env file
- Click on project id (2)

[![Step one](docs/img/first-step.png)](docs/img/first-step.png)

- After that you will find "Service accounts" section (click (1) or (2))

[![Step](docs/img/step-2.png)](docs/img/step-2.png)

- Click on "Create service account", fill "name" field and click "Create"

[![Step](docs/img/step-3.png)](docs/img/step-3.png)

- On the next step you have to add two roles, "DialogFlow API Admin" and "DialogFlow API Client" and click "Done"

[![Step](docs/img/step-4.png)](docs/img/step-4.png)

- Now, go to the page "Manage keys"

[![Step](docs/img/step-5.png)](docs/img/step-5.png)

- Create new key in .json format

[![Step](docs/img/step-6.png)](docs/img/step-6.png)

- Move downloaded file into project root directory
- Add path to file in .env

### Code example

[](#code-example)

```
$dialogflow = \BotMan\Middleware\DialogFlow\V2\DialogFlow::create('en');
$botman->middleware->received($dialogflow);
$botman->hears('smalltalk.(.*)', function ($bot) {
    $extras = $bot->getMessage()->getExtras();
    $bot->reply($extras['apiReply']);
})->middleware($dialogflow);
```

smalltalk.(.\*) - there is action name pattern [![Step](docs/img/step-7.png)](docs/img/step-7.png)

If you create actions with different prefixes, you can use `->ignoreIntentPattern()`

```
$dialogflow = DialogFlow::create('en')->ignoreIntentPattern();
```

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

[](#security-vulnerabilities)

If you discover a security vulnerability within BotMan, please send an e-mail to Marcel Pociot at . All security vulnerabilities will be promptly addressed.

License
-------

[](#license)

BotMan is free software distributed under the terms of the MIT license.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

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

Total

6

Last Release

1869d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/14920737?v=4)[Kirill Sulimovsky](/maintainers/genkovich)[@genkovich](https://github.com/genkovich)

---

Tags

botBotmanDialogflow

### Embed Badge

![Health badge](/badges/genkovich-dialog-flow-bot-man-middleware/health.svg)

```
[![Health](https://phpackages.com/badges/genkovich-dialog-flow-bot-man-middleware/health.svg)](https://phpackages.com/packages/genkovich-dialog-flow-bot-man-middleware)
```

###  Alternatives

[botman/driver-web

Web driver for BotMan

86658.7k7](/packages/botman-driver-web)[botman/driver-telegram

Telegram driver for BotMan

92437.3k6](/packages/botman-driver-telegram)[botman/tinker

BotMan tinker command for your Laravel BotMan project

102201.2k4](/packages/botman-tinker)[botman/driver-facebook

Facebook Messenger driver for BotMan

71301.6k6](/packages/botman-driver-facebook)[botman/studio-addons

BotMan Studio specific addons.

75219.8k50](/packages/botman-studio-addons)[botman/driver-slack

Slack driver for BotMan

51267.0k2](/packages/botman-driver-slack)

PHPackages © 2026

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