⚙️ Manage Claude Code sessions from Matrix with YouTrack and GitLab

⚡ 178 views · ⚙️ DevOps & CI/CD

Description

Manage AI coding sessions from Matrix with YouTrack and GitLab

Who is this for

Development teams using Claude Code who want a chat-ops interface for project management. Instead of SSH-ing into a server to run Claude, your whole team interacts with it through a Matrix chat room — with issue tracking and CI/CD pipeline visibility built in.

What it does

Template Image

Screenshot from 20260312 183201.png

How it works

The workflow polls a Matrix room for new messages. A command router parses !commands and dispatches them to the right handler:

Requirements

> This is a self-hosted template. It requires your own infrastructure — > it will not run on n8n Cloud without a server accessible via SSH.

How to set up

  1. Import the workflow into n8n
  2. Edit the Gateway Config Set node with your URLs and paths
  3. Set YOUTRACK_TOKEN and GITLAB_TOKEN as environment variables on your server (not in the workflow)
  4. Create n8n credentials: SSH Private Key and HTTP Header Auth (Matrix bot token as Authorization: Bearer <token>)
  5. Create the SQLite database on your server:
CREATE TABLE sessions (
  issue_id TEXT PRIMARY KEY, issue_title TEXT,
  session_id TEXT, started_at TEXT, last_active TEXT,
  message_count INTEGER DEFAULT 0, paused INTEGER DEFAULT 0,
  is_current INTEGER DEFAULT 0
);
CREATE TABLE queue (
  id INTEGER PRIMARY KEY AUTOINCREMENT,
  issue_id TEXT, message TEXT, queued_at TEXT
);
CREATE TABLE session_log (
  id INTEGER PRIMARY KEY AUTOINCREMENT,
  issue_id TEXT, issue_title TEXT, session_id TEXT,
  started_at TEXT, ended_at TEXT,
  message_count INTEGER, outcome TEXT
);
  1. Activate the workflow

How to customize

🔗 Nodes Used

HTTP Request, SSH, Schedule Trigger

📥 Import

Download workflow.json and import into n8n: Workflow menu → Import from File

📖 Importing guide · 🔑 Credential setup