Send board news out and connect GitHub or GitLab
Post card news to Slack, Teams or your own service, and link branches, commits and pull requests to the cards they name.
In short
A board can tell a webhook - Slack, Teams or your own service - when a card is added, moved, finished or commented on. Connected to a GitHub or GitLab repository, it links branches, commits and pull requests to the cards they name.
Before you start
- Who: connecting needs "Create and manage boards" on the board. A webhook must already be added in Settings, Webhooks. A repository also needs the right to add a webhook in GitHub or GitLab.
- Plan: every plan. A board sends to at most 5 webhooks and listens to at most 5 repositories.
- First: keep the secret you are shown; it is shown only once.
Steps
- Add the webhook once for the workspace in Settings, Webhooks (a Slack or Teams incoming webhook, or your own address, which receives signed JSON).
- Open Board settings › "Connections" and press "Set up" on "Webhooks". Only people who manage the board see it.
- Choose one of the workspace's webhooks and tick what it should hear: card added, card moved, card finished, new comment.
- Press "Save".
- Open Board settings › "Connections" and press "Set up" on "Repositories". Choose GitHub or GitLab and name the connection.
- Copy the address and the secret you are shown. The secret is shown this once.
- In GitHub: the repository's Settings, Webhooks, Add webhook. Paste the address as Payload URL, choose application/json, paste the secret, and send pushes, pull requests and branch or tag creation and deletion.
- In GitLab: the project's Settings, Webhooks. Paste the address as URL and the secret as Secret token, and tick Push events and Merge request events.
- Write a card key in a branch name (pay-12-refunds), a commit message or a pull request title or description.
Result: the card shows a Code section with its pull requests, branches and commits and where each stands: open, draft, merged or closed.
Good to know
- A message names the card by its key and title, says who did what and links back to the card. A comment is announced, never quoted.
- A card moved into a done column is sent as finished. A board sends to at most 5 webhooks, only of its own workspace. Deliveries, retries and failures are listed under Settings, Webhooks.
- A board rule can also tell a webhook: under Tell someone, pick a webhook instead of a person.
- A connection belongs to one board, and a key can only ever link to a card of that board. Each delivery is checked against the secret first; one that does not fit is answered Not found. A delivery is applied once, however often it is sent. A board has at most 5 connections.
- A connection changes cards in the name of one person, shown as "Runs as". When that person can no longer change cards, it is paused; anyone who manages the board and can change cards selects "Take over".
- To move a card when its pull request is merged, add a rule with "A pull request is merged" and "Move it to a column".
- What happens next: a card key in a branch name, a commit or a pull request adds a Code section to that card. Deliveries and failures are listed under Settings, Webhooks.
If something goes wrong
- "A board sends to at most 5 webhooks." / "A board listens to at most 5 repositories."
- "This board already sends to that webhook. Open it again and change it there."
- Nothing arrives from the repository: check the address and the secret at GitHub or GitLab, and the events you ticked. If you lost the secret, replace it.
- The connection says it is paused: press "Take over".
Related
- /help/boards/cards-follow-the-work
- /help/boards/card-keys
- /help/settings/webhooks-and-site-ownership