Published 1 month ago
This workflow allows you to monitor multiple Github repos simultaneously without polling due to use of Webhooks. It programmatically allows for adding and deleting of repos to your watchlist to make management convenient.
Generate a personal access token on github by following these esteps;
if you need more help, see here:
https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens
In Register Github Webhook
Authenticaion > Generic Credential Type
Generic Auth Type > Header Auth
Header Auth > Create New Credential with Name set to 'Authorization' and Value set to 'Bearer <YOUR GITHUB TOKEN HERE>'.
(You can reuse this for Delete Github Webhook
and Get Existing Webhooks
).
Now in Register Github Webhook
, scroll down to Send Body > JSON and inside the JSON, change the value of "url" to the webhook address given as Production URL in the node Webhook Trigger
.
In the third row, link up the Webhook Trigger to any API of your choice. Slack and Telegram are given as examples.
You can also format the notification message as you wish.
Setup time: roughly 10 minutes.
Repos to Monitor
, add any repo you want to monitor changes for.Webhook Trigger
, Click Test Workflow
and if your Github credentials were set correctly, it will automatically register the webhooks. - You can test this by running the single node Get Existing Webhook
and confirming it outputs the repo addresses.Webhook Trigger
and activate the workflow.Implement complex processes faster with n8n