Skip to content

[Notifier] Support Google Chat #35875

Closed
@GromNaN

Description

@GromNaN

Description
Google Chat is a similar to Slack for Google Suite consumers.

Specificities :

  • Every message creates a new thread or a response to an existing thread (if the thread.name is sent)
  • Authentication uses Google Signin or webhook url for simplicity.
  • 2 exclusive formats : basic or card

API Documentation : https://developers.google.com/hangouts/chat

Example

use Symfony\Component\HttpClient\HttpClient;

$httpClient = HttpClient::create();
$webhookURL = '<INCOMING-WEBHOOK-URL>';

$response = $httpClient->request('POST', $webhookURL, [
    'json' => ['text' => 'Hello from a PHP script!'],
])->toArray();

$response = $httpClient->request('POST', $webhookURL, [
    'json' => ['text' => 'Response to the thread', 'thread' => ['name' => $response['thread']['name']]],
])->toArray();

Screenshot_20200227-221612

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions