n8n · Airtable · reporting

Replacing weekly campaign reports with one n8n workflow

An agency I worked with ran several AI campaigns per client: speed-to-lead for new and existing customers, database reactivation, smart follow-up and customer success. Each campaign logged leads in Airtable. Every week someone filtered each view, counted rows and pasted numbers into a report. It took hours and was always slightly out of date.

The fix was a single scheduled n8n workflow that does the counting and posts the result to a live dashboard. Here's the pattern.

n8n workflow fanning out from a schedule trigger to many Airtable searches
One schedule trigger, one Airtable search per campaign and stage, merged into a single payload.

The shape: fan out, normalise, merge, post

  1. Schedule trigger runs the workflow on a fixed interval.
  2. Fan out to one Airtable "search records" node per campaign and stage: leads, responded, booked, interested and not interested. In the build above that came to about 26 searches.
  3. Edit Fields after each search stamps every record with its campaign and stage, so the data carries its own label.
  4. Merge nodes in append mode collect everything into one stream.
  5. A Code node turns rows into totals and rates.
  6. An HTTP Request posts the summary to the dashboard's API.

Why label every record?

It's tempting to count inside each branch. Don't. If every branch outputs the same shape, { campaign, stage, ...record }, then one piece of code downstream handles all of them, and adding a campaign means copying one search node instead of rewriting logic.

The aggregation step

This is the heart of it, simplified from production:

// n8n Code node: one input item per lead record, labelled with campaign + stage
const totals = {};
for (const { json } of $input.all()) {
  const key = json.campaign;                       // e.g. "s2l_a1"
  totals[key] ??= { campaign: key, leads: 0, responded: 0,
                    booked: 0, interested: 0, not_interested: 0 };
  totals[key][json.stage] += 1;
}
const pct = (a, b) => (b ? +((a / b) * 100).toFixed(1) : 0);
return Object.values(totals).map(t => ({
  json: { ...t,
          response_rate: pct(t.responded, t.leads),
          conversion_rate: pct(t.booked, t.leads) },
}));

The dashboard receives one object per campaign with raw counts and rates, so it never has to do maths itself.

Campaign dashboard with response and conversion rate gauges
What the client sees: per-campaign tabs with response and conversion rates.

Things that bite in production

The result

Nobody builds the weekly report anymore. Business owners open the dashboard and see what each AI agent produced. When a new campaign launches, adding it to reporting takes minutes. If you're still copying numbers into a spreadsheet every Monday, this pattern pays for itself quickly.

← All articles Need reporting like this? Let's talk