Skip to content
CasesMasterContext · Automating client work reports · 10 июня 2026

How the MasterContext agency automated client work reports on n8n

MasterContext automated its client reports for paid search: twice a month a bot pulls the data itself, calculates the metrics, and writes a draft conclusion. Zero tokens.

Speed
1-3 days → by morning
reporting cycle
Cadence
2× / mo
runs at 6:00
Tokens
0
a decision tree writes the conclusion
Upkeep
~$5 / mo
VPS, no token costs
Stage
In production
runs autonomously

MasterContext, a paid-search agency from Krasnoyarsk, is #1 for paid search in its city by the Runet Rating and a certified Yandex partner. Among its clients are large franchise delivery chains, for example Yobidoyobi: the agency runs Yandex.Direct for them per city and per franchisee separately. In total MasterContext has around 140 clients on Direct setup, and for the Yobidoyobi chain alone the bot assembles about 90 reports.

Every client gets a work report twice a month. Before, a manager put it together by hand. Now the bot assembles the rough part before the team comes in to work.

In short

I built MasterContext a bot on self-hosted n8n that twice a month, at six in the morning, generates the client reports on paid search itself. It exports data from the Direct database, calculates the metrics that aren't in the ready-made BI, and writes a draft conclusion through a decision tree right in the code, with no neural net and not a single token.

The bot puts the finished report with all the numbers and a draft conclusion into a shared Google spreadsheet. The manager finds their client, adds their part, and sends it. The reporting cycle, which used to stretch over 1-3 days, is now ready to go through by morning.

What it was before

The agency has client managers, each with their own set of clients. Reports go out twice a month: on the 1st for the full previous month, on the 16th for the first half of the current one. And every time the manager did the same set of steps by hand:

  1. opened Yandex DataLens, where the agency's analytics are built;
  2. pulled the right figures for a specific city or franchisee;
  3. calculated by hand what DataLens doesn't have: cost of acquisition, efficiency, conversion, average check;
  4. assembled this into a report message in the usual structure;
  5. wrote the conclusion: the campaign is growing, holding steady, or dropped, and what to do about it;
  6. sent the finished report to each of their clients in Telegram.

One report took a fair amount of time, and there are nearly a hundred and fifty clients, each report with its own numbers. All told, the reporting cycle stretched over one to three days. The whole time, the agency's best people were doing not strategy but assembling tables by hand.

The problem wasn't only the time. When you assemble dozens of tables by hand twice a month, it's easy to slip on a number, mix up the comparison period, or miss a client. And a report is the agency's face to the client, so a mistake there is unpleasant.

Before and after

Before automationAfter automation
The manager assembled each report from DataLens by handThe bot exports the data for all clients itself
Metrics not in the BI were calculated by handThe bot calculates them itself by the same formulas
The manager wrote the draft conclusion from scratchA decision tree prepares a draft comparison
The reporting cycle stretched over 1-3 daysBy morning the reports are ready to go through
Numbers are easy to mix up in a manual routineThe calculation is the same for all clients
The team's time went into assembling tablesThe team's time goes into analysis and decisions

How it works now

For the managers, almost nothing changed on the surface: they still work with the spreadsheet and still send reports to clients. What changed is that by the time they arrive, the reports are already assembled.

The bot runs twice a month at six in the morning and does everything before the workday starts:

  1. exports data from the database that feeds Yandex.Direct, the same data DataLens is built on;
  2. gathers the right figures for each city and franchisee: impressions, clicks, reach, cost per click, cost per lead, conversions, spend;
  3. calculates the metrics that aren't in the ready-made analytics;
  4. lays it all out in a fixed report structure (financial totals, key metrics for search, the Yandex Ad Network, display ads);
  5. through a decision tree, writes a draft conclusion: compares the period to the previous one and formulates what exactly changed;
  6. puts the finished report into a shared Google spreadsheet that all the managers can access.

A finished paid-search report in the shared Google spreadsheet: financial totals, search and Ad Network metrics, and an automatic draft conclusion, with the client's confidential numbers hidden

In the spreadsheet, each report has its own columns: client, client login, report period, comparison period, report text, result, and manager. The manager finds their row, sees the ready numbers and a draft conclusion, and is left with the most important part: check it, add their judgment, and send.

The workflow in n8n: exporting data from the Direct database, calculating metrics for each client, a decision tree for the conclusion, and writing the finished report to a Google spreadsheet

A decision tree instead of a neural net

The most interesting thing in this project isn't the volume, it's how the conclusion is written. The temptation was obvious: hand the numbers to a neural net and ask it to "write a conclusion for this report". We deliberately didn't do that.

An ad report isn't an essay, it's a comparison of numbers by clear rules. If revenue grew compared to last month, there are more conversions, and the cost per conversion went down, the conclusion is the same: more conversions at a lower cost, an excellent result. If conversion dropped but there are more leads, the wording is different. All these branches can be described in advance.

So I wired the conclusion logic as a decision tree right in the code. The bot walks through the conditions ("this and that metric → this wording") and assembles a draft comparison itself. The manager adds the reason for the result and the action plan, because that's already about judgment, not arithmetic.

What this gives:

  • zero tokens. No neural net is involved in the conclusions, so there's nothing to pay for;
  • predictability. On the same numbers the conclusion is always the same, nothing drifts or gets made up;
  • speed and cost. A decision tree in code runs instantly and costs exactly nothing beyond the server.

This is probably the main idea of the case. Automation doesn't have to be "smart" and expensive to pay off. Sometimes the most reliable solution isn't a neural net but carefully described rules.

Why the reports don't go to the client on their own

Technically the bot could send the finished reports to clients in Telegram itself. We deliberately didn't do that, and it was the agency's own condition.

The client's logic is this: if reports fly out automatically, the manager will stop reading them and turn into a "forward" button. And the agency's value is exactly that a live person looks at the numbers, understands the specific client's context, and adds a conclusion a machine won't make.

So the bot brings the report to the state of "everything calculated, draft conclusion ready" and leaves it in the shared spreadsheet. After that it's the human: the manager finds their client, studies the report, adds the reason and the plan, copies it, and sends. The bot took the assembly, the judgment stayed with the human. Exactly the way the client wanted.

The result

MetricBeforeAfter
Who assembles the reportThe manager, by handThe bot, before the team arrives
Reporting cycle1-3 daysReady by morning
Scale~140 clients, ~90 reports for Yobidoyobithe same volumes, assembly runs itself
Risk of error in manual assemblyHigh, all by handThe calculation is the same for all clients
ConclusionWritten from scratchDraft ready, the human finishes it
Cost of running the bot-~$5 a month for the VPS, zero tokens
What the team doesAssembles tablesAnalyzes and decides

The main thing here isn't that the bot "makes reports for people". It does the boring part: the export, the calculation, the assembly, the draft comparison. And the thing the client actually pays the agency for, the judgment and strategy, is still done by a human, who just now has the time for it.

Where this can be moved to

This setup isn't only about Yandex.Direct and isn't only for agencies. It suits almost anyone who regularly assembles same-type reports by clear rules:

  • agencies and marketing departments with a stack of clients or projects;
  • any recurring reports on ads, sales, finance;
  • situations where the data is in the system, but a person spends days assembling it into a report by hand.

There's no tie to specific tools here. If the data can be exported, the metrics calculated, and the conclusion rules described in words, the same kind of bot will come together for your system: another ad platform, another BI, another spreadsheet.


If you have recurring reporting that someone assembles by hand by the same rules, this setup can be built for your tools. I'll honestly look at which part is worth automating and which is better left to a human.

Write to me on Telegram or leave a request. Tell me how your reports work now, and I'll break down for free what can be assembled automatically there.

Stack

Workflow
n8n self-hosted
Data
Yandex.Direct databaseDataLens
Logic
Code processingDecision tree
Output
Google Sheets
Channel
Telegram

FAQ

Why does a decision tree in code write the conclusion, not a neural net?
Because an ad report isn't creative writing, it's a comparison of numbers by clear rules. If revenue grew, there are more conversions, and the cost per conversion is lower, the conclusion is unambiguous. That kind of logic is cheaper and more reliable to describe in code: zero tokens, a predictable result, nothing made up and nothing drifting from run to run.
Why don't the reports go to the client in Telegram automatically?
That's what the client wanted. The condition was direct: managers shouldn't forward reports blindly. So the bot puts the finished report with the numbers and a draft conclusion into a shared spreadsheet, and the manager finds their client, reads it, adds their part, and sends it themselves. It's deliberate human-in-the-loop, not an oversight.
How much does it cost to keep this process running?
The only ongoing cost is a small VPS, around five dollars a month. No neural net is used in the conclusions, so there's nothing to pay for tokens. The bot runs on the same infrastructure as the agency's other scenarios, so there's no need to keep a separate server just for reports.
Can the same thing be built for another ad channel or another reporting system?
Yes. Here the source is the database Yandex.Direct and DataLens are built on, but there's no hard tie to them specifically. If the ad data can be exported, the metrics calculated, and the conclusion rules described, the setup transfers to another channel, another BI, or another report format. The export layer and the set of rules change.
What about the confidentiality of the agency's clients?
The agency itself, MasterContext, we name openly. But the specific numbers and client identifiers in the report screenshot are hidden, and we keep it that way. The data doesn't go to external services for a nice conclusion: everything is calculated on the agency's infrastructure, and the reports sit in their own working spreadsheet.
How often and when are the reports generated?
Twice a month. On the 1st the bot assembles a report for the full previous month, on the 16th for the first half of the current one, both times compared to the prior period. It runs at six in the morning, so that by the start of the workday the finished reports are already in the spreadsheet and the managers just have to go through them.
Get in touch

Want to automate something in your business?

Tell me what you're sick of doing by hand. 30 minutes for a brief, then a concrete offer or an honest no if it's not my kind of task.