Money

FIFO Lots, the 3-Year Rule and Daily ČNB Rates: An n8n Telegram Bot Works Out Czech Stock Taxes From a Broker CSV

  • Level Advanced
  • Setup1–3 hrs (estimated)
  • Evidence Some evidence
  • CostNot stated in source
  • No-codeNo
n8nSource-linked

What they did

An investor in Czechia sends his Trading 212 and Interactive Brokers CSV exports to a Telegram bot on his own n8n server. It matches every sale to the shares bought first (FIFO), checks the 3-year tax-free holding rule for each lot, converts every trade at that day's Czech National Bank rate, and can show the tax impact of a sale before he makes it, plus a yearly report grouped like the tax return. The workflow is free on GitHub.

How it went

A lot-by-lot tax table and yearly summary, ready to check with an adviser.

Worth knowing

  • Built for Czech rules only, and he says it isn't tax advice. Needs a self-hosted n8n server and about 47 nodes; check results against your broker's own tax report.

Prompt

Cleaned version rewritten from the source — not a direct quote.

Here are my broker exports [CSV files] for [year]. Using [country]'s rules ([FIFO, holding-period exemption, yearly limit, currency conversion source]), match each sale to the lots bought, mark which are tax-free, convert amounts at the official rate for each date, and give me a table grouped the way my tax return asks for it. Flag anything you're unsure of for my tax adviser.

Recommended

Try it in Grok Bot

Grok Bot can do a one-off version: give it the CSVs and your country's rules and ask for the lot-by-lot table.

  1. Copy the prompt (button below).
  2. Open Grok Bot chat and paste it. Replace any [bracketed] placeholders.
  3. Connect the listed tools (Telegram, GitHub) as connectors when Grok Bot asks.
  4. If the task repeats, ask: "Make this a daily routine."

Alternatives: the same prompt works in n8n, Claude, ChatGPT Agent, OpenClaw.

Set it up

Tools: Telegram, GitHub · Stack: Self-hosted n8n + Telegram + broker CSV exports (Trading 212, IBKR)

  1. Read the original source for full context.
  2. Connect the tools your agent needs.
  3. Paste the prompt and replace [bracketed] placeholders.
  4. Run once manually and check the output before scheduling it.

Generic suggested steps, not from the source.

Evidence

Detailed Reddit post (r/n8n) with the rules handled and a public GitHub workflow and setup guide

Source: Reddit · 2026-10-13 · Verified by us: not yet · Report broken or outdated

Related use cases

MoneyWeb · 2026-02

Check a hospital bill against what Medicare would pay

A writer gave Claude the coded hospital claim (UB-04) for his late brother-in-law's $195,628 ER bill and asked it to build a spreadsheet of Medicare rates per code. Claude flagged bundled items billed separately, a bypass charge for a procedure that never happened, and a ventilation charge Medicare does not allow.

  • Level Intermediate
  • Setup1–3 hrs*
  • Evidence Strong evidence
ClaudeSource-linked
Inbox & communicationReddit

6-class email router for a 22-person consultancy

An IMAP trigger feeds an OpenAI classifier that routes 80–120 emails a day to Slack, Pipedrive and Zendesk. It hit 94% accuracy on 500 emails and saves 11 hours a week.

  • Level Intermediate
  • Setup1–3 hrs*
  • Evidence Some evidence
n8nSource-linked
MoneyReddit

Invoice capture for a distributor: 4m12s down to 38s each

A shared Gmail label feeds an extractor, totals are validated to €0.01, low-confidence fields go to a human, and results push to Sage. 87% need no human touch.

  • Level Intermediate
  • Setup1–3 hrs*
  • Evidence Some evidence
n8nMakeSource-linkedNeeds verification