{"id":15963026,"url":"https://github.com/bpazy/webhook-forwarder","last_synced_at":"2026-06-03T16:31:37.338Z","repository":{"id":64300595,"uuid":"571590520","full_name":"Bpazy/webhook-forwarder","owner":"Bpazy","description":"Forward the webhook request","archived":false,"fork":false,"pushed_at":"2024-05-04T17:36:17.000Z","size":69,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-15T10:45:22.595Z","etag":null,"topics":["webhook","webhook-forwarder","webhook-relay"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Bpazy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-28T13:12:25.000Z","updated_at":"2024-05-04T17:35:58.000Z","dependencies_parsed_at":"2024-05-04T16:28:18.806Z","dependency_job_id":"a7097eba-7541-459d-bf69-8cde54447b47","html_url":"https://github.com/Bpazy/webhook-forwarder","commit_stats":null,"previous_names":["bpazy/webhook-relay"],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bpazy%2Fwebhook-forwarder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bpazy%2Fwebhook-forwarder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bpazy%2Fwebhook-forwarder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bpazy%2Fwebhook-forwarder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Bpazy","download_url":"https://codeload.github.com/Bpazy/webhook-forwarder/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240241803,"owners_count":19770463,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["webhook","webhook-forwarder","webhook-relay"],"created_at":"2024-10-07T16:22:19.994Z","updated_at":"2025-12-15T15:06:56.783Z","avatar_url":"https://github.com/Bpazy.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# webhook-forwarder\n\n[![Build](https://github.com/Bpazy/webhook-forwarder/workflows/Build/badge.svg)](https://github.com/Bpazy/webhook-forwarder/actions/workflows/build.yml)\n[![Test](https://github.com/Bpazy/webhook-forwarder/workflows/Test/badge.svg)](https://github.com/Bpazy/webhook-forwarder/actions/workflows/test.yml)\n[![Docker](https://github.com/Bpazy/webhook-forwarder/actions/workflows/docker-publish.yml/badge.svg)](https://github.com/Bpazy/webhook-forwarder/actions/workflows/docker-publish.yml)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=Bpazy_webhook-forwarder\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=Bpazy_webhook-forwarder)\n[![Go Report Card](https://goreportcard.com/badge/github.com/Bpazy/webhook-forwarder)](https://goreportcard.com/report/github.com/Bpazy/webhook-forwarder)\n\nForward the webhook request.\n\n![webhook-forwarder (2)](https://user-images.githubusercontent.com/9838749/205377219-5e0db1d2-6975-43c3-8239-1da1388485cf.png)\n\n## Usage\n\nI suppose your webhook request body looks like this:\n\n```json\n{\n  \"alerts\": [\n    {\n      \"status\": \"resolved\",\n      \"labels\": {\n        \"alertname\": \"325i alert\"\n      }\n    }\n  ]\n}\n```\n\nAnd your backend wanted:\n\n```json\n{\n  \"body\": \"Test Bark Server\",\n  \"title\": \"bleem\"\n}\n```\n\nNow you can use `webhook-forwarder` to receive and redirect and modify the webhook request like this:\n\n```js\n// ~/.config/webhook-forwarder/test.js\nfunction convert(origin) {\n    alert = origin.alerts[0];\n    return {\n        target: [\"https://api.day.app/asd/\"],\n        payload: {\n            title: alert.labels.alertname,\n            body: \"\",\n        }\n    }\n};\n```\n\nFinally your backend will got correct body.\n\u003e Replace `:name` with the name of the file in the `templates` directory.\n\n```sh \ncurl -X POST http://localhost:8080/forward/:name -d '{\"alerts\":[{\"status\":\"resolved\",\"labels\":{\"alertname\":\"325i alert\"}}]}'\n```\n\n## Docker Deploy\n\n```yaml\nversion: '3'\nservices:\n  webhook-forwarder:\n    image: ghcr.io/bpazy/webhook-forwarder:master\n    environment:\n      - PORT=:8080\n    restart: always\n    ports:\n      - \"8080:8080\"\n    volumes:\n      - /home/ubuntu/webhook-forwarder/templates:/root/.config/webhook-forwarder/templates\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbpazy%2Fwebhook-forwarder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbpazy%2Fwebhook-forwarder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbpazy%2Fwebhook-forwarder/lists"}