Skip to content
Workflow · Search and ads · Opening soon

Cost per lead by channel

Use your HubSpot exports to calculate cost per lead by channel each month. The workflow maps sources to channels, totals spend and leads, then calculates the result.

Early access opens shortly. Check back soon.

Someone typed

“calculate cost per lead by channel each month from ad spend and new leads by source”

The agent read it as

Calculate cost per lead by channel each month from HubSpot ad spend by channel and HubSpot new leads by source, using HubSpot source to channel map.

What the agent built

7 steps, each one an ordinary Mammoth step you can open and change.

  1. File
    HubSpot ad spend by channel
    CSV export · 24 rows
  2. File
    HubSpot new leads by source
    CSV export · 26 rows
  3. File
    HubSpot source to channel map
    CSV export · 6 rows
  4. Step
    Total spend by month
    Step 5
  5. Step
    Make source key (New leads)
    Step 2
  6. Step
    Make source key (Source map)
    Step 1
  7. Join
    Add mapped channels
    24 of 26 paired
  8. Step
    Total leads by month
    Step 4
  9. Join
    Match monthly channels
    24 of 24 paired
  10. Step
    Calculate cost per lead
    Step 7
  11. Result
    Monthly Channel Lead Cost
    25 rows
  12. Schedule
    Runs when you say
    Proposed

Checked on the sample files: every step ran, 25 rows came out, and the join paired 24 of 26 rows; the join paired 24 of 24 rows.

What you get back

The result of that run, the rows to look at first.

Monthly Channel Lead CostSample data25 rows
ChannelMonthCost per leadAd spendNew leads
direct2026-08-010019
display2026-08-0168.422,60038
organic_social2026-08-010052
paid_search2026-08-0150.628,200162
paid_social2026-08-0144.635,400121
partner2026-08-0134.151,40041
referral2026-08-010034
display2026-09-01·2,8000
organic_social2026-09-010058
paid_search2026-09-0152.309,100174
paid_social2026-09-0142.966,100142
partner2026-09-0138.461,50039
25 rows in the result · 12 shown, problems first. Sample data: illustrative figures, not business results.

How do you calculate cost per lead by channel each month?

Export your ad spend by channel, new leads by source, and source to channel map from HubSpot. The workflow matches the source keys, adds the mapped channel, totals spend and leads by month, then calculates cost per lead for each channel. You get monthly channel cost per lead as the result.

How it works

How to use the Monthly Channel Lead Cost workflow

  1. 1Get early accessWe invite people in small batches, job by job. You'll land on this workflow, already built and checked on the sample files.
  2. 2Swap in your exportsUpload your own files as they come out of your tools. The agent checks the workflow on your rows.
  3. 3Change it in words, then turn it onSay what to change and see the new result before anything saves. Then choose when it runs.

Monthly Channel Lead Cost: questions

What export should you use?
Use exported files for ad spend by channel, new leads by source, and a source to channel map from HubSpot. The workflow reads those spreadsheet-style files and uses them together.
What happens to rows that do not match?
Rows that do not match the mapping or the monthly channel totals do not appear in the final matched result. You can review the unmatched rows in the input files and update the mapping or source values.
How do you change the rules?
Edit the steps in words, for example change the source map, the month grouping, or the channel matching rule. Then run the workflow again on the exported files.

Get early access to this workflow

It will open already built and checked on the sample files. Swap in your own exports and see your result.

Early access opens shortly. Check back soon.

Workflows like this

Decide which pages to keep, update or prune, and find the search terms that spend without converting.

All search and ads templates →