# Auto-categorize YNAB transactions with OpenAI and Discord: n8n workflow

> Started by an event in a connected app, and works across Discord. It hands the judgement calls to OpenAI.

Source: https://millionrounds.com/workflow/auto-categorize-ynab-transactions-with-openai-and-discord (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Alerts and monitoring](https://millionrounds.com/workflows?category=Alerts+and+monitoring#library)

# Auto-categorize YNAB transactions with OpenAI and Discord

Started by an event in a connected app, and works across Discord. It hands the judgement calls to OpenAI. 24 steps, 1 branch, 1 loop or waits: large, and worth reading before you trust it with anything live.

Large Calls a model: OpenAI

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fauto-categorize-ynab-transactions-with-openai-and-discord)

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

**1** Branch: places the flow splits

**1** Loop or waits

**1** Service it connects to

## The flow

Starts it 1 Model 3 Logic 16 Service 4

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

- 1 **When clicking ‘Execute workflow’** Manual trigger *Starts it*
- 2 **OpenAI Chat Model2** Lm Chat Open Ai *Model*
- 3 **Structured Output Parser1** Output Parser Structured *Model*
- 4 **Variables** Set *Logic*
- 5 **AI Agent1** Agent *Model*
- 6 **Get Categories** Http Request *Service*
- 7 **Get Transactions** Http Request *Service*
- 8 **Loop Over Items1** Split In Batches *Logic*
- 9 **Get Category Groups** Split Out *Logic*
- 10 **Break out Transactions** Split Out *Logic*
- 11 **Aggregate1** Aggregate *Logic*
- 12 **Aggregate** Aggregate *Logic*
- 13 **Remove Invalid Category Groups** Filter *Logic*
- 14 **Filter out transfers and invalid transactions** Filter *Logic*
- 15 **Discord** Discord *Service*
- 16 **YNAB modify transactions** Http Request *Service*
- 17 **Flatten Category Groups to Categories** Split Out *Logic*
- 18 **Group Transactions** Aggregate *Logic*
- 19 **Hide Internal Categories** Filter *Logic*
- 20 **Merge** Merge *Logic*
- 21 **Categories Only** Set *Logic*
- 22 **Skip Categories, Loop Transactions** If *Logic*
- 23 **Group Categories** Aggregate *Logic*
- 24 **Loop Transactions** Split Out *Logic*

## How it's built

- **Starts on:** An event in a connected app
- **Steps:** 24, with 1 branch, 1 loop or waits
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Discord
- **Model:** OpenAI

## Questions

What does it need to run?

An n8n account, plus your own Discord account, and a key for OpenAI. You connect your own accounts after importing it; none are included.

What starts it?

It starts on an event in a connected app.

Does it use AI?

Yes. It calls OpenAI. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 24 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 24 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%2Fauto-categorize-ynab-transactions-with-openai-and-discord)
- **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.

[Discord](https://millionrounds.com/workflows?service=Discord#library)

## Workflows like it

Also alerts and monitoring, with the same services where possible, closest in size first.

- [**Analyze Google Ads search terms with Claude and DeepSeek** 24 steps · calls a model · Discord, Slack](https://millionrounds.com/workflow/analyze-google-ads-search-terms-with-claude-and-deepseek)
- [**Daily affirmations & weekly gratitude digest with Notion** 24 steps · Discord, Email](https://millionrounds.com/workflow/daily-affirmations-and-weekly-gratitude-digest-with-notion)
- [**Scan personal data in data tables with Groq and Discord** 25 steps · calls a model · Discord, n8n data table](https://millionrounds.com/workflow/scan-personal-data-in-data-tables-with-groq-and-discord)
- [**Monitor customer risk and AI feedback with PostgreSQL** 23 steps · Discord, Gmail](https://millionrounds.com/workflow/monitor-customer-risk-and-ai-feedback-with-postgresql)
- [**Intelligent Gmail label management with Discord** 22 steps · calls a model · Discord, Gmail](https://millionrounds.com/workflow/intelligent-gmail-label-management-with-discord)
- [**Monitor Truth Social posts for Iran-Israel risk and alert Discord** 26 steps · calls a model · Discord, n8n data table](https://millionrounds.com/workflow/monitor-truth-social-posts-for-iran-israel-risk-and-alert-di)
