Bitrix24 Integration with PanDev Metrics
TL;DR. Create an inbound webhook in your Bitrix24 portal, paste its REST URL into Settings → Integrations → Bitrix24, and name branches with the task key
BX-+ task ID — for examplefeature/BX-33316. A branch with only the number (issue/33316) links only through a custom rule. Audience: admin.
Before you begin
- PanDev Metrics is up and running (Cloud workspace or on-prem instance)
- Admin access to your PanDev Metrics tenant
- A Bitrix24 user allowed to create inbound webhooks and to see the tasks you want to track
Step 1 — Create an inbound webhook in Bitrix24
- In your Bitrix24 portal open Developer resources → Other → Inbound webhook → Create.
- Grant the scopes
task,tasks_extended,userandevent. - Copy the REST URL. It looks like
https://your-portal.bitrix24.ru/rest/1/abcdef1234567890/— the portal address,/rest/, the user ID and the secret.
:::warning Keep the URL private The webhook URL contains the secret. Anyone with the URL can act in Bitrix24 as the webhook's user — treat it like a password. :::
PanDev Metrics sees the tasks that the webhook's user can see in Bitrix24.
Step 2 — Connect Bitrix24 in PanDev Metrics
- Open Settings → Integrations → Bitrix24.
- Turn on Enable integration with Bitrix24.
- Paste the URL from Step 1 into Inbound webhook URL.
- Click Test connection.
- After a successful check, click Save.
To stop syncing, click Disconnect on the same screen.
How updates arrive
- Periodic sync. Every 6 hours PanDev Metrics re-reads tasks changed during the last day. This is how changes arrive by default. On-prem installations can change the schedule with the
BITRIX24_SYNC_CRONenvironment variable. - Real time. An inbound webhook cannot subscribe to Bitrix24 events, so the Receive real-time updates from Bitrix24 switch alone does not make changes arrive faster. Instant delivery needs an Outbound webhook for task events in Bitrix24 that sends them to the PanDev Metrics handler address. The integration screen does not show this address yet: ask PanDev support for it, or on-prem find it in the server log after saving the integration (the line contains
Outgoing-webhook handler URL). The PanDev Metrics server must be reachable from the portal — notlocalhost.
Step 3 — Name branches with the task key
This is what links Git activity to Bitrix24 tasks. Bitrix24 tasks have only a numeric ID, so PanDev Metrics gives each task the key BX- + task ID: task 33316 has the key BX-33316. The ID is the number in the task URL after /view/:
https://your-portal.bitrix24.ru/company/personal/user/1/tasks/task/view/33316/
Put the key anywhere in the branch name:
feature/BX-33316
issue/BX-33316
bugfix/BX-33316-fix-login
BX-33316
| Branch | Result |
|---|---|
issue/BX-33316 | ✅ Linked to task 33316 |
feature/bx-33316 | ✅ Linked — the letter case does not matter |
feature/BX33316 | ✅ Linked — the dash is optional |
bugfix/BX-33316-fix-login | ✅ Linked — text after the key is allowed after -, _ or / |
issue/33316 | ❌ Not linked — the BX prefix is missing |
feature/BX-33316a | ❌ Not linked — a letter or digit right after the number breaks the key |
feature/BX-1-BX-2 | ❌ Not linked when both tasks exist — PanDev Metrics cannot choose. If only one of them exists, the branch links to it |
Branches that start with dependabot/ or renovate/ are never linked to tasks.
PanDev Metrics finds the task among the Bitrix24 tasks it has already synced. If the branch appears before the task is synced, the link is made as soon as the task arrives.
Commits and merge requests on such branches still count toward coding time, but PanDev Metrics cannot attribute them to a task, so per-task analytics (Cycle Time, Lead Time, time per task) stay empty for those tasks. If your branches carry only the number, set a custom rule instead of renaming them.
Merge request titles
A merge request or pull request title in the Conventional Commits form also links to the task when the key is the scope: feat(BX-33316): add login form.
Custom attribution rules
If your branches follow a different pattern, set your own regular expressions in Task Attribution. The first pair of parentheses may capture the whole key (BX-33316) or just the task number (33316): while the Bitrix24 integration is enabled, a bare number is read as the task BX-33316.
| Regex | issue/BX-33316 | issue/33316 |
|---|---|---|
issue/(BX-\d+) | ✅ BX-33316 | ❌ no match |
issue/(\d+) | ❌ no match | ✅ BX-33316 |
issue/(?:BX-)?(\d+) | ✅ BX-33316 | ✅ BX-33316 |
So branches like issue/33316 do not need to be renamed — one rule is enough. Keep in mind that your rules replace the built-in ones: if other branches are still named feature/BX-33316, add a rule for them too, for example (?i)BX-?(\d+).
Verify
- Open a dashboard with a task-tracker widget and confirm that Bitrix24 tasks appear and their statuses match Bitrix24.
- Push a branch named
feature/BX-followed by the ID of an existing task and check that its activity shows up under that task.
Troubleshooting
"The inbound webhook works, but it lacks the task scope"
The webhook was created without the task scope, so tasks are not imported. Edit the webhook in Bitrix24, add the scopes from Step 1, and save the integration again.
"URL must be a Bitrix24 inbound webhook"
The URL must look like https://your-portal.bitrix24.ru/rest/1/abcdef1234567890/. Copy the REST URL of the inbound webhook, not the address of the portal page.
Changes appear only after a few hours
This is the default: without an Outbound webhook, changes arrive with the periodic sync every 6 hours. For faster delivery, set up the Outbound webhook described in How updates arrive and check that the PanDev Metrics server is reachable from the portal.
A branch does not link to the task
Check the branch name against the table in Step 3: it must contain BX- followed by the task ID. If you have set custom rules, check it against them instead — they replace the table. Also check that the task is visible to the webhook's user — PanDev Metrics only sees the tasks this user can open.
Next steps
- Install the JetBrains plugin — capture IDE time per Bitrix24 task
- Install the VS Code plugin — same for VS Code, Cursor, and Windsurf
- Connect GitLab — join commits and merge requests with Bitrix24 tasks
Related
- How-to: Task Attribution
- How-to: Jira integration
- How-to: ClickUp integration
- How-to: YouTrack integration
- How-to: Linear integration
- How-to: Azure Boards integration