Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Google Cloud Repo - Discord webhook integration

Hi,

I want to integrate git hooks to my discord channel.

Looking for help to this. Thanks in advance!

0 2 1,027
2 REPLIES 2

Discord does not seem to have native integration with Google Cloud Repositories, but you can make use of a few GCP services to manually push messages to a Webook. Cloud Source Repositories is able to publish messages to a Pub/Sub topic. These messages are triggered from events like pushing changes to a repo, or creating and deleting repositories. 

Cloud Pub/Sub is able to send a POST request to an endpoint with the message. In this case, the endpoint should be a Cloud Function that receives your message. This is so you can build the request that the Discord Webhook API expects to properly run a Webhook.

Hi! Can you make a guide about this specific topic? I can't find a guide that easy-to-understand.