# Outbound revenue attribution board for Mailshake and Pipedrive

> See which cold email campaigns actually created pipeline and closed revenue instead of just replies, by tracing every Mailshake lead into the deals it became in Pipedrive.

- Workflow type: app
- Services: Mailshake, Pipedrive
- Categories: Sales, Marketing
- Published: 2026-08-31

## What it does

- Lists every Mailshake campaign side by side with the open pipeline value and closed won revenue traced back to it, so you can rank campaigns by money rather than by open rate.
- Matches each lead your campaigns produced to a person in Pipedrive by email address, pulls that person's deals with value, stage, and won or lost status, and rolls the totals up per campaign and per month.
- Shows a match confidence on every lead and keeps a separate tab of leads that never made it into the CRM, which is usually where the revenue leak is hiding.
- Includes a Write the attribution recap button that sends a background agent over a date range you pick, reconciling leads to deals and writing a narrative about which campaigns and which messaging angles sourced real pipeline.

## What you'll need

- A Mailshake account with campaigns running and Lead Catcher in use, plus your Mailshake API key
- A Pipedrive login with permission to see persons, deals, and pipeline stages
- Sales reps who log deals against the person record rather than only against the company, since email address is the join key
- A rough idea of your sales cycle length, which helps you choose the right attribution window

## Prompt

Build me an outbound revenue attribution app that answers the question my cold email tool never can: did outbound actually generate revenue, not just replies. It connects Mailshake, where the campaigns and leads live, to Pipedrive, where the deals and the money live, and joins them on the lead's email address.

The main surface is an attribution board. One row per Mailshake campaign, pulled from List Campaigns. For each campaign show the campaign name and status, the number of leads it produced, how many of those leads matched a person in Pipedrive, the open pipeline value traced back to the campaign, the closed won revenue traced back to it, and a closed lost figure. Let me sort the board by closed won revenue and by open pipeline, because the whole point is ranking campaigns by money instead of by open rate. Show reply and lead counts too, but keep them secondary in the visual hierarchy so nobody reads this as another engagement report.

Here is how a campaign gets its numbers. Pull the leads with List Leads and pull List Created-Leads Activity to get each lead's created date and the campaign it belongs to, filtered to the date range selected at the top of the board. For each lead, look the person up in Pipedrive with Search Persons using the lead's email address as the search term, scoped to the email field with exact matching where possible. When a person is found, call List Deals filtered by that person to pull their deals with value, currency, stage, and open, won, or lost status. Use List Stages to turn stage ids into readable stage names. Roll those deal values up per campaign, and also per month based on the month the lead was created, so I can see an attribution trend over time rather than one flat total.

Two rules matter a lot and both need to be visible and adjustable in the app rather than buried in code. First, match confidence. An exact match on one person's email address is a strong match. A lead email that returns more than one person, or matches only on a company domain rather than the full address, is a weak match that a human should confirm. Show the confidence on every lead row, let me filter the board to strong matches only, and let me manually confirm or reject a weak match so the decision sticks the next time I open the app. Second, the credit rule. Give me a setting at the top of the board with two options: credit a campaign for all deals on a matched person, or credit only deals created after the lead's created date. Default to the second, stricter option, show clearly which rule is active, and recalculate everything when I switch it, because that choice changes the numbers a lot and people will argue about it.

Clicking a campaign opens a detail view: every lead it produced, with the lead's email, the date it was created, its Mailshake lead status, the matched Pipedrive person, the match confidence, and each deal on that person shown with title, value, stage, and won or lost status. This is the drill down someone uses in a pipeline review when they want to see the actual names behind a number.

Give unmatched leads their own tab. Every lead from the selected date range with no person found in Pipedrive, showing the email address, the campaign, the created date, and the lead status, sorted with the most recent first and grouped by campaign so a pattern in one campaign stands out. Put a running count and a percentage at the top, because this tab is usually where the leak is: replies the team celebrated that never made it into the CRM. Let me search this tab by email or domain and export the list.

Add a monthly rollup view: pipeline created and revenue closed by the month the lead first came in, broken out by campaign, so I can see whether outbound is improving or whether one good quarter is carrying the whole story.

Finally, add a Write the attribution recap button. I pick a date range, press it, and a background agent runs inside the app. It walks the campaigns and leads for that range, reconciles leads to Pipedrive persons and their deals using the same operations and the currently selected credit rule, and writes a narrative back into the app. The recap should cover which campaigns sourced real pipeline and real closed won revenue, which messaging angles those campaigns used based on their names and content, which campaigns produced plenty of replies that went nowhere, and where the drop off is happening between lead and deal, calling out whether the loss is at the matching step, meaning leads never entered the CRM, or later at the deal stage. It should end with a short set of recommendations about which campaigns to scale and which to retire. Store each recap with its date range and the credit rule used, show a history of past recaps in the app, and show clear progress while the agent is running since this takes a while over a large date range.

A note on the data. Both systems paginate, so page fully through campaigns, leads, activity, and deals rather than reading the first page. Cache the matching results so reopening the board is fast, with a refresh control to rebuild it on demand. Pipedrive search endpoints are rate limited more tightly than the rest of the API, so pace the person lookups and handle a rate limit response by backing off and continuing rather than failing the whole board. Show deal values in the deal's own currency and note when a campaign total mixes currencies rather than silently adding them together.

## How to customize

- Switch the credit rule between giving a campaign credit for every deal on a matched person and counting only deals created after the lead date, which changes the numbers considerably
- Change the date range on the board and on the recap agent to match your sales cycle, for example a rolling ninety days instead of this quarter
- Choose which Pipedrive pipelines count toward attribution if you run separate pipelines for outbound, inbound, and renewals
- Adjust what counts as a strong match versus one worth reviewing by hand when a lead email maps to more than one person

## FAQ

### How does the app know which deal came from which campaign?

It uses the lead's email address as the join key. Every lead your Mailshake campaigns produced is looked up against your Pipedrive people by email, and any deals sitting on that person are traced back to the campaign the lead came from. Nothing gets written into Mailshake or Pipedrive to make this work, so you can run it against your existing data today.

### What happens when one person has several deals?

You decide. There is a credit setting with two options: give the campaign credit for every deal on that person, or count only the deals created after the date the lead came in. The second option is stricter and usually closer to the truth for long standing accounts. The board shows which rule is active so nobody misreads the totals.

### Why do some leads show up as unmatched?

Either the reply never got entered into the CRM at all, or the person exists under a different email address such as a personal one or a role address. That tab is the point of the app. It is normally the largest single gap between the replies your team celebrates and the pipeline finance sees.

### Can I use this with HubSpot or another CRM instead of Pipedrive?

The same shape works on HubSpot by looking people up with a contact search and pulling their deals the same way. Ask for that swap when you build it and the CRM side gets rebuilt against HubSpot instead.

### Is this a live report or a one time snapshot?

It is a board you open whenever you want, and it reads current data from both tools each time. The written recap is separate: you press the button, pick a date range, and a background agent produces a narrative that stays in the app so you can bring it to a pipeline review.

Use this prompt in General Input: https://www.generalinput.com/prompts/outbound-revenue-attribution-board-for-mailshake-and-pipedrive