Automation library · Alerts and monitoring

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.

LargeCalls a model: OpenAI

24 stepsLarge: read it before trusting it with anything live
1Branch: places the flow splits
1Loop or waits
1Service it connects to

The flow

Starts it 1Model 3Logic 16Service 4

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

  1. 1When clicking ‘Execute workflow’Manual triggerStarts it
  2. 2OpenAI Chat Model2Lm Chat Open AiModel
  3. 3Structured Output Parser1Output Parser StructuredModel
  4. 4VariablesSetLogic
  5. 5AI Agent1AgentModel
  6. 6Get CategoriesHttp RequestService
  7. 7Get TransactionsHttp RequestService
  8. 8Loop Over Items1Split In BatchesLogic
  9. 9Get Category GroupsSplit OutLogic
  10. 10Break out TransactionsSplit OutLogic
  11. 11Aggregate1AggregateLogic
  12. 12AggregateAggregateLogic
  13. 13Remove Invalid Category GroupsFilterLogic
  14. 14Filter out transfers and invalid transactionsFilterLogic
  15. 15DiscordDiscordService
  16. 16YNAB modify transactionsHttp RequestService
  17. 17Flatten Category Groups to CategoriesSplit OutLogic
  18. 18Group TransactionsAggregateLogic
  19. 19Hide Internal CategoriesFilterLogic
  20. 20MergeMergeLogic
  21. 21Categories OnlySetLogic
  22. 22Skip Categories, Loop TransactionsIfLogic
  23. 23Group CategoriesAggregateLogic
  24. 24Loop TransactionsSplit OutLogic

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.