PHPackages                             zing/dingtalk-robot - 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. zing/dingtalk-robot

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

zing/dingtalk-robot
===================

Send message via dingtalk robot

2.0.1(1y ago)37911MITPHPPHP ^8.0CI passing

Since Feb 24Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/zingimmick/dingtalk-robot)[ Packagist](https://packagist.org/packages/zing/dingtalk-robot)[ Docs](https://github.com/zingimmick/dingtalk-robot)[ Fund](https://www.paypal.com/paypalme/zingimmick)[ RSS](/packages/zing-dingtalk-robot/feed)WikiDiscussions 2.x Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (18)Used By (0)

Dingtalk Robot
==============

[](#dingtalk-robot)

[![Build Status](https://github.com/zingimmick/dingtalk-robot/actions/workflows/tests.yml/badge.svg?branch=2.x)](https://github.com/zingimmick/dingtalk-robot/actions)[![Code Coverage](https://camo.githubusercontent.com/cd643b336702e2f31245ad54755068901edb414b1663eb5eb044bc6194295eae/68747470733a2f2f636f6465636f762e696f2f67682f7a696e67696d6d69636b2f6c61726176656c2d736d732f6272616e63682f322e782f67726170682f62616467652e737667)](https://codecov.io/gh/zingimmick/dingtalk-robot)[![Latest Stable Version](https://camo.githubusercontent.com/f7d722540fb4e9ffcfe96d1ee942ea820f717187088ca747ac28b6e0b3cd73b9/68747470733a2f2f706f7365722e707567782e6f72672f7a696e672f64696e6774616c6b2d726f626f742f762f737461626c652e737667)](https://packagist.org/packages/zing/dingtalk-robot)[![Total Downloads](https://camo.githubusercontent.com/c4dfc9e445fa7f6b1c908a2029500b782f77025bf4c2a037e9b8e37c502cf2b7/68747470733a2f2f706f7365722e707567782e6f72672f7a696e672f64696e6774616c6b2d726f626f742f646f776e6c6f616473)](https://packagist.org/packages/zing/dingtalk-robot)[![Latest Unstable Version](https://camo.githubusercontent.com/238d38dc0eb8b34d59fdd38d8239d738efc4cab6e913f0bf0c50311b2996c754/68747470733a2f2f706f7365722e707567782e6f72672f7a696e672f64696e6774616c6b2d726f626f742f762f756e737461626c652e737667)](https://packagist.org/packages/zing/dingtalk-robot)[![License](https://camo.githubusercontent.com/a0242543c980b23779122dc13d0e8e768188f3055e86f576b9d56bbddf3e6b23/68747470733a2f2f706f7365722e707567782e6f72672f7a696e672f64696e6774616c6b2d726f626f742f6c6963656e7365)](https://packagist.org/packages/zing/dingtalk-robot)[![Code Climate](https://camo.githubusercontent.com/ed8c3903ad2d946f47270201999793ae9ba5de45b6e0fd7e698ba0a12a9696e8/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f31653937393234666131663232343166356137372f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/zingimmick/dingtalk-robot/maintainability)

> **Requires [PHP 8.0+](https://php.net/releases/)**

Require Dingtalk Robot using [Composer](https://getcomposer.org):

```
composer require zing/dingtalk-robot
```

Usage
-----

[](#usage)

```
use Zing\DingtalkRobot\Messages\ActionCardMessage;
use Zing\DingtalkRobot\Messages\Button;
use Zing\DingtalkRobot\Messages\FeedCardMessage;
use Zing\DingtalkRobot\Messages\Link;
use Zing\DingtalkRobot\Messages\LinkMessage;
use Zing\DingtalkRobot\Messages\MarkdownMessage;
use Zing\DingtalkRobot\Messages\SingleActionCardMessage;
use Zing\DingtalkRobot\Messages\TextMessage;
use Zing\DingtalkRobot\Robot;

$robot = new Robot('access_token', 'secret');

// text类型
$robot->send('我就是我, 是不一样的烟火');
$robot->send((new TextMessage('我就是我, 是不一样的烟火'))->atAll());

// markdown类型
$robot->send((new MarkdownMessage(
    '杭州天气',
    "#### 杭州天气 \n> 9度，西北风1级，空气良89，相对温度73%\n> ![screenshot](https://img.alicdn.com/tfs/TB1NwmBEL9TBuNjy1zbXXXpepXa-2400-1218.png)\n> ###### 10点20分发布 [天气](https://www.dingtalk.com) \n"
))->at('150XXXXXXXX'));

// link类型
$robot->send(new LinkMessage(
    '时代的火车向前开',
    '这个即将发布的新版本，创始人xx称它为红树林。而在此之前，每当面临重大升级，产品经理们都会取一个应景的代号，这一次，为什么是红树林',
    'https://www.dingtalk.com/s?__biz=MzA4NjMwMTA2Ng==&mid=2650316842&idx=1&sn=60da3ea2b29f1dcc43a7c8e4a7c97a16&scene=2&srcid=09189AnRJEdIiWVaKltFzNTw&from=timeline&isappinstalled=0&key=&ascene=2&uin=&devicetype=android-23&version=26031933&nettype=WIFI',
    'https://img.alicdn.com/tfs/TB1NwmBEL9TBuNjy1zbXXXpepXa-2400-1218.png'
));

// 整体跳转ActionCard类型
$robot->send(new SingleActionCardMessage(
    '乔布斯 20 年前想打造一间苹果咖啡厅，而它正是 Apple Store 的前身',
    '![screenshot](https://gw.alicdn.com/tfs/TB1ut3xxbsrBKNjSZFpXXcXhFXa-846-786.png)
 ### 乔布斯 20 年前想打造的苹果咖啡厅
 Apple Store 的设计正从原来满满的科技感走向生活化，而其生活化的走向其实可以追溯到 20 年前苹果一个建立咖啡馆的计划',
    '阅读全文',
    'https://www.dingtalk.com/'
));

// 独立跳转ActionCard类型
$robot->send((new ActionCardMessage(
    '我 20 年前想打造一间苹果咖啡厅，而它正是 Apple Store 的前身',
    "![screenshot](https://img.alicdn.com/tfs/TB1NwmBEL9TBuNjy1zbXXXpepXa-2400-1218.png) \n\n #### 乔布斯 20 年前想打造的苹果咖啡厅 \n\n Apple Store 的设计正从原来满满的科技感走向生活化，而其生活化的走向其实可以追溯到 20 年前苹果一个建立咖啡馆的计划",
    [
        new Button(
            '内容不错',
            'https://www.dingtalk.com/'
        ),
        new Button(
            '不感兴趣',
            'https://www.dingtalk.com/'
        ),
    ]
))->btnHorizontally()->hideAvatar());

// FeedCard类型
$robot->send(new FeedCardMessage(
    [
        new Link(
            '时代的火车向前开1',
            'https://www.dingtalk.com/',
            'https://img.alicdn.com/tfs/TB1NwmBEL9TBuNjy1zbXXXpepXa-2400-1218.png'
        ),
        new Link(
            '时代的火车向前开2',
            'https://www.dingtalk.com/',
            'https://img.alicdn.com/tfs/TB1NwmBEL9TBuNjy1zbXXXpepXa-2400-1218.png'
        ),
    ]
));
```

License
-------

[](#license)

Dingtalk Robot is an open-sourced software licensed under the [MIT license](LICENSE).

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance67

Regular maintenance activity

Popularity19

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity66

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

Recently: every ~373 days

Total

15

Last Release

53d ago

Major Versions

0.1.1 → 1.0.02021-05-06

1.x-dev → 2.0.02022-12-12

PHP version history (2 changes)0.0.1PHP ^7.2 || ^8.0

2.0.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/5fafa5bffa28dcd722432b244bf3f0bfe773406df29fea295847e2397b95d50b?d=identicon)[zingimmick](/maintainers/zingimmick)

---

Top Contributors

[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (94 commits)")[![zingimmick](https://avatars.githubusercontent.com/u/26657141?v=4)](https://github.com/zingimmick "zingimmick (92 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (6 commits)")

---

Tags

dingtalkrobotdingtalkrebot

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/zing-dingtalk-robot/health.svg)

```
[![Health](https://phpackages.com/badges/zing-dingtalk-robot/health.svg)](https://phpackages.com/packages/zing-dingtalk-robot)
```

###  Alternatives

[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[chowjiawei/laravel-help-plugin

Integrating useful auxiliary functions into laravel,Assistant tools based on laravel.

671.6k](/packages/chowjiawei-laravel-help-plugin)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[ymlluo/group-robot

钉钉、企业微信、飞书 自定义群组机器人。支持链式语法创建发送消息。支持文本、Markdown、图片、文件、图文、卡片等消息。

233.8k1](/packages/ymlluo-group-robot)

PHPackages © 2026

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