Recipe · Affiliate marketing and media buying

Campaign spend report

Opens a platform's own reporting page in this profile's signed-in session, walks the rows it draws, and files one row per campaign into the Campaign spend dataset. The row selector is a guess — every platform draws its table differently and many virtualise it — so expect to adjust it once for yours, and check the first run against the platform's own total before anyone reports from this table.

On this page

What it does

Reads numbers off a page, not an API. Check the first run against the platform's own total before anyone reports or bills from this table — the default row selector is a guess and every platform draws its report differently.

Reads a platform's own reporting page in this profile's session and files one row per campaign into the Campaign spend table.

It runs against one profile, through that profile's own proxy and with its own cookies — so the pages load the way that account's owner would see them. It navigates, so give it a profile whose session you are happy to have in use.

One profileIts own proxy and cookiesThe Campaign spend table3 settings on the run

The 5 steps

The real tree, read out of the pack the launcher ships. Indentation is nesting: the steps under a loop run once per row, and the ones under a branch run only when the condition above them holds. Every {{…}} is a value filled in at run time — from the row being walked, from a setting on the run, or from the profile itself.

gotoOpen the reportGo to {{vars.report_url}}
waitWait
evaluateRead the campaign rowsRun script
saveRowsFile the spendSave to Campaign spendon failure: continue
screenshotScreenshoton failure: continue

Each of those is one of the step types on the automation reference, with the same fields the editor shows and the same fields an agent is handed over the local API.

The tables it uses

These load with the recipe. A dataset is a typed table your workspace owns — the columns are named and typed up front so the steps can address them, and every one of them is yours to rename, extend or fill from a file afterwards.

Campaign spend

writes

What the spend report reads off a platform's own reporting page: one row per account and campaign.

row_key
Key · text
account
Account · text
campaign
Campaign · text
spend
Spend · number
currency
Currency · text
checked_at
Checked at · datetime
profile
Profile · profile

Re-running updates the row it already wrote rather than adding a second one. That is what the match column in the save step is for, and it is the difference between a status check and a table that doubles in size every pass.

What it asks you for

Settings are filled in when the run starts, and every profile can hold its own values — which is how one workflow serves a whole folder of accounts.

account
Account name · text · required

How this account should be named in the Campaign spend table. It becomes half of the row key, so two accounts never overwrite each other's row for a campaign they both happen to call the same thing.

report_url
Reporting page · text · required

The platform's own campaign report, as you reach it while signed in, with the date range already set the way you want it. Nothing is stored: the run uses the session already in this profile.

row_selector
Row selector · text

A CSS selector matching one campaign row. THE DEFAULT IS A GUESS — it fits an ordinary HTML table and nothing else. A virtualised grid, a div layout or a canvas-drawn report each need their own, and a virtualised one only ever holds the rows currently on screen. Open the page and check before trusting a run.

Loading it

In the launcher, open Automations, choose Load a starter pack, and pick Affiliate marketing and media buying. Untick anything you do not want. The tables land first, then the workflows, then a project called Media Buying Ops that links them together.

What arrives is an ordinary automation row. Open it in the editor, change a step, rename it, delete it — nothing in the app treats it as special afterwards, and loading the pack a second time makes a fresh copy rather than overwriting the one you edited. Tables are the opposite: an existing table of the same name is reused and keeps its rows.