This package allows you to send notifications to Microsoft Teams.

Overview

skrepr

Teams connector

Releases LICENSE Issues PR Commits Stars Forks

This package allows you to send notifications to Microsoft Teams.

Installation

You can install the package using the Composer package manager. You can install it by running this command in your project root:

composer require skrepr/teams-connector

Then create an incoming webhook on your Microsoft teams channel for the package to use.

Basic Usage

Create a simple card



declare(strict_types=1);

use Skrepr\TeamsConnector\Card;
use Skrepr\TeamsConnector\Client;

$endPoint = 'https://...';
$httpClient = new \GuzzleHttp\Client();
$teamsClient = new Client($endPoint, $httpClient);

$card = (new Card('Larry Bryant created a new task'))
    ->setText('Yes, he did')
    ->setThemeColor(CardInterface::STATUS_DEFAULT)
    ->setTitle('Adding Title to the card');

$teamsClient->send($card);

Adding a section



declare(strict_types=1);

use Skrepr\TeamsConnector\Card;
use Skrepr\TeamsConnector\Section;

$card = new Card('Larry Bryant created a new task');

$section = (new Section('![TestImage](https://47a92947.ngrok.io/Content/Images/default.png)Larry Bryant created a new task'))
    ->setActivitySubtitle('On Project Tango')
    ->setActivityImage('https://teamsnodesample.azurewebsites.net/static/img/image5.png')
    ->addFact('Assigned to', 'Unassigned')
    ->addFact('Due date', 'Mon May 01 2017 17:07:18 GMT-0700 (Pacific Daylight Time)');

$card->addSection($section);

Adding actions and inputs to the card



declare(strict_types=1);

use Skrepr\TeamsConnector\Card;
use Skrepr\TeamsConnector\Actions\ActionCard;
use Skrepr\TeamsConnector\Actions\HttpPostAction;
use Skrepr\TeamsConnector\Inputs\TextInput;

$card = new Card('Larry Bryant created a new task');

$actionCard = (new ActionCard('Add a comment'))
    ->addInput(new TextInput('comment', 'Add a comment here for this task'))
    ->addAction(new HttpPostAction('Add comment', 'http://...'));

$card->addPotentialAction($actionCard);

HTTP Clients

In order to talk to Microsoft Teams API, you need an HTTP adapter. We rely on HTTPlug which defines how HTTP message should be sent and received. You can use any library to send HTTP messages that implements php-http/client-implementation.

Testing

composer test

Credits

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

License

The MIT License (MIT). Please see License File for more information.

You might also like...
Laravel SMS allows you to send SMS from your Laravel application using multiple sms providers, allow to add custom sms provider

Laravel SMS Laravel SMS allows you to send SMS from your Laravel application using multiple sms providers, allow to add custom sms provider Requiremen

Laravel package to launch toast notifications.
Laravel package to launch toast notifications.

Laravel package to launch toast notifications. This package provides assistance when using toast notifications. Using the iziTOAST package, which allo

A package to simplify automating future notifications and reminders in Laravel
A package to simplify automating future notifications and reminders in Laravel

Laravel Snooze Schedule future notifications and reminders in Laravel Why use this package? Ever wanted to schedule a future notification to go out at

Laravel package to enable sending push notifications to devices

Laravel Push Notification Package to enable sending push notifications to devices Installation Update your composer.json file to include this package

Standalone PHP library for easy devices notifications push.

NotificationPusher Standalone PHP library for easy devices message notifications push. Feel free to contribute! Thanks. Contributors Cédric Dugat (Aut

A very lightweight library to handle notifications the smart way.
A very lightweight library to handle notifications the smart way.

NAMSHI | Notificator Notificator is a very simple and lightweight library to handle notifications the smart way. It took inspiration from other librar

Takes care of Apple push notifications (APNS) in your PHP projects.

Notificato Notificato takes care of push notifications in your PHP projects. Italian: notificato è: participio passato English: notified Why use Notif

Sends notifications via one or more channels (email, SMS, ...).

Notifier Component The Notifier component sends notifications via one or more channels (email, SMS, ...). Resources Documentation Contributing Report

Laravel Security Notifications

This package adds security notifications to warn your users when significant security events occur so that they aren't the next victim of an attacker.

Comments
Releases(0.2.0)
  • 0.2.0(Nov 21, 2022)

    What's Changed

    • feat(deps): decouple from "php-http/discovery", replace by friendsofphp/well-know… by @EJTJ3 in https://github.com/skrepr/teams-connector/pull/1

    New Contributors

    • @EJTJ3 made their first contribution in https://github.com/skrepr/teams-connector/pull/1

    Full Changelog: https://github.com/skrepr/teams-connector/compare/0.1.0...0.2.0

    Source code(tar.gz)
    Source code(zip)
Owner
skrepr
Specialist in het ontwikkelen van maatwerk software
skrepr
Service that helps you to send notifications for a series of failed exceptions.

Laravel Failure Notifier This package helps you to track your exceptions and do what you want to do with them such as sending an SMS or and Email. You

Kamyar Gerami 7 Nov 26, 2022
This package makes it easy to send notifications using RocketChat with Laravel 9.0+.

laravel-rocket-chat-notifications Introduction This package makes it easy to send notifications using RocketChat with Laravel 9.0+. Contents Installat

Team Nifty GmbH 25 Dec 1, 2022
This package makes it easy to send web push notifications with Laravel.

Web push notifications channel for Laravel This package makes it easy to send web push notifications with Laravel. Installation You can install the pa

Laravel Notification Channels 564 Jan 3, 2023
:computer: Send notifications to your desktop directly from your PHP script

About JoliNotif JoliNotif is a cross-platform PHP library to display desktop notifications. It works on Linux, Windows or MacOS. Requires PHP >= 7.2 (

JoliCode 1.2k Dec 29, 2022
A PHP Library to easily send push notifications with the Pushwoosh REST Web Services.

php-pushwoosh A PHP Library to easily send push notifications with the Pushwoosh REST Web Services. First sample, creating a Pushwoosh message // Crea

gomoob 63 Sep 28, 2022
Notifications in PHP (notify-send, growl, etc) like that.

#Nod Notifications in PHP (notify-send, growl, etc) like that. ##Examples Letting Nod figure out the best Adapter to use (not recommend ATM, only work

Filipe Dobreira 51 Mar 26, 2019
Send push notifications to apple devices (iPhone, iPad, iPod).

Apple Apn Push Send push notifications to apple devices (iPhone, iPad, iPod). Support authenticators: Certificate Json Web Token Supported protocols:

Vitaliy Zhuk 157 Dec 1, 2022
Send Firebase push notifications with Laravel php framework.

FCM Notification Channel for Laravel Send Firebase push notifications with Laravel php framework. Installation You can install this package via compos

Ankur Kumar 23 Oct 31, 2022
WebPush can be used to send notifications to endpoints which server delivers Web Push

WebPush can be used to send notifications to endpoints which server delivers Web Push notifications as described in the Web Push protocol. As it is standardized, you don't have to worry about what server type it relies on.

null 1.5k Jan 7, 2023
It's Pimcore Bundle to send notifications to Google Chat, Slack or Email from admin panel inside Pimcore

Send notifications to Discord, Google Chat, Slack and more from Pimcore It's Pimcore Bundle to send notifications to Discord, Google Chat, Slack, Tele

LemonMind.com 6 Aug 31, 2022