# Route Gitea repo events to Matrix rooms: n8n workflow template

> Started by another system calling it, and works across n8n data table. 22 steps, 4 branches: large, and worth reading before you trust it with anything live.

Source: https://millionrounds.com/workflow/route-gitea-repo-events-to-matrix-rooms (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Integrations](https://millionrounds.com/workflows?category=Integrations#library)

# Route Gitea repo events to Matrix rooms

Started by another system calling it, and works across n8n data table. 22 steps, 4 branches: large, and worth reading before you trust it with anything live.

Large

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Froute-gitea-repo-events-to-matrix-rooms)

**22 steps** Large: read it before trusting it with anything live

**4** Branches: places the flow splits

**0** Loops or waits

**1** Service it connects to

## The flow

Starts it 1 Logic 9 Service 12

The steps in the order they run, from what starts it.

- 1 **Gitea Events** Webhook *Starts it*
- 2 **Parse Event** Code *Logic*
- 3 **Is Repository Event?** If *Logic*
- 4 **Is Created?** If *Logic*
- 5 **Get row(s)** Data Table *Service*
- 6 **Create Matrix Room** Matrix *Service*
- 7 **Get row(s) for Delete** Data Table *Service*
- 8 **Lookup & Format** Code *Logic*
- 9 **Upsert row(s)** Data Table *Service*
- 10 **Format Deleted** Code *Logic*
- 11 **Send to Room** Matrix *Service*
- 12 **Store & Map Users** Code *Logic*
- 13 **Send Deleted** Matrix *Service*
- 14 **Has Author MXID?** If *Logic*
- 15 **Delete row(s)** Data Table *Service*
- 16 **Invite Author** Matrix *Service*
- 17 **Invite Admin** Matrix *Service*
- 18 **Is Author Admin?** If *Logic*
- 19 **Build Admin Payload** Code *Logic*
- 20 **Set Admin** Http Request *Service*
- 21 **Welcome Message** Matrix *Service*
- 22 **Add to Space** Http Request *Service*

## How it's built

- **Starts on:** Another system calling it
- **Steps:** 22, with 4 branches
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** n8n data table
- **Model:** None. This is plumbing, not judgement

## Questions

What does it need to run?

An n8n account. You connect your own accounts after importing it; none are included.

What starts it?

It starts on another system calling it.

Does it use AI?

No. Every step is fixed logic or a call to a service, so it does the same thing every time.

How long does it take to set up?

Take your time. At 22 steps it is large: read it before trusting it with anything live.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

**Before you run it**

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 22 steps before you point it at anything that matters.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Froute-gitea-repo-events-to-matrix-rooms)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Connects to

Each opens the other workflows that use it.

[n8n data table](https://millionrounds.com/workflows?service=n8n+data+table#library)

## Workflows like it

Also integrations, with the same services where possible, closest in size first.

- [**Back up Linux server directories to Google Drive with Borg** 20 steps · Google Drive, n8n data table](https://millionrounds.com/workflow/back-up-linux-server-directories-to-google-drive-with-borg)
- [**Generate product and marketing images with Riverflow 2.0** 20 steps · n8n data table](https://millionrounds.com/workflow/generate-product-and-marketing-images-with-riverflow-2-0)
- [**QBittorrent Auto Ban Slow/Bad Peers** 20 steps · n8n data table](https://millionrounds.com/workflow/qbittorrent-auto-ban-slow-bad-peers)
- [**Back up a Linux server directory to Backblaze B2** 18 steps · n8n data table](https://millionrounds.com/workflow/back-up-a-linux-server-directory-to-backblaze-b2)
- [**Back up self-hosted workflows to Google Drive daily** 18 steps · Google Drive, n8n data table](https://millionrounds.com/workflow/back-up-self-hosted-workflows-to-google-drive-daily)
- [**Manage AI agent chat sessions** 18 steps · n8n data table](https://millionrounds.com/workflow/manage-ai-agent-chat-sessions)
