Draft stalled-deal rescue emails that cannot cite a wrong number or date
For a stalled deal, an agent reads the CRM record, recent outside news and the last meeting transcript, then drafts a rescue plan and email. A strict checker blocks any draft whose dates, amounts or names don't match the record.
Curated by Andrew Donato, Editor. Reviewed .
Get one setup like this every Thursday, by email.
Written for sales leaders running leaner teams.
Free. One email a week. Unsubscribe anytime.
Paste this into ChatGPT, Claude or your agent tool. See the prompt
- Deal Review / Forecasting
- advanced
- AE
- Sales leader
- RevOps
- Category
- Deal Review / Forecasting
- Difficulty
- Advanced
- Est. cost
- Author reports a few cents per rescue (sourced); plus Anthropic API and Tavily usage
Works with
What problem does this solve?
AI-written deal emails are risky because one wrong amount, date or contact in front of a customer costs trust. Most CRM-connected agent demos show the connection, not how to stop the model from inventing details.
How is the agent set up?
Deep Shah open-sourced Deal Rescue, a side project built on LangGraph with fixed nodes and edges rather than a free-roaming agent. For one stalled Salesforce opportunity it fetches three things in parallel: the opportunity, its history, contacts and activities from Salesforce; outside signals such as people changes and hiring from web search (Tavily); and the latest meeting transcript from Google Drive (read-only). A deterministic rubric with no model scores the deal (start at 100, deduct for silence, pushed close dates, stage regressions and falling activity). Claude then writes a scored timeline, a read of the deal and an email draft, and may move the score by at most 15 points only if it cites a signal. Every date, amount, stage name and contact the model may use is handed to it as a closed set, and a validation gate re-checks all of them on the way out. A draft that invents or changes anything is rejected with reasons and retried at most twice; after that the run ends and publishes nothing. Passing runs write a draft with an approval flag back to Salesforce, where a person approves and Salesforce sends; the code has no send function. A dashboard streams each step, every run is logged with model, outcome, retries and timing, and an eval suite graded by the same gate compares models. The repo (Apache 2.0) runs end to end on sample data without any keys. The prompt below is our starter version of the drafting step.
What prompt does it use?
Starter prompt by The GTM Agent Weekly, written from the setup described on this page. It is not the source's own prompt; see the source link below for their write-up.
# ROLE
You draft a rescue plan and a re-engagement email for one stalled deal at {{COMPANY}}. A separate checker will reject your draft if any fact is not in the evidence below.
# INPUTS
- {{DEAL_RECORD}}: the opportunity from the CRM, with amount, stage, close date history, contacts and recent activities.
- {{RUBRIC_SCORE}}: the deal score from a fixed rubric, with the deductions that produced it.
- {{OUTSIDE_SIGNALS}}: recent news, hiring and people changes at the account, each with a source link.
- {{TRANSCRIPT_EXCERPTS}}: quoted lines from the latest meeting.
- {{ALLOWED_FACTS}}: the only dates, amounts, stage names and contact names you may use.
# TASK
1. Write a short timeline of the deal using only {{ALLOWED_FACTS}}.
2. Explain why the deal stalled and what could restart it, citing the record, a signal or a transcript line for each point.
3. You may adjust {{RUBRIC_SCORE}} by up to {{MAX_ADJUSTMENT}} points only if you cite the signal that justifies it.
4. Draft one short email to the right contact that gives a real reason to talk now.
# OUTPUT FORMAT
JSON with: timeline (list), diagnosis (list of points with citations), score_adjustment (number and cited reason), email (to, subject, body).
# GUARDRAILS
- Use dates, amounts and names exactly as they appear in {{ALLOWED_FACTS}}. If something you need is missing, write "unknown" instead of guessing.
- Never address a contact the signals say has left the company.
- Draft only. Nothing is sent without a person approving it in the CRM. Replace every {{PLACEHOLDER}} before running. Works with any capable LLM and runner.
Get 5 setups like this every week, free.
Real agent setups with prompts, sources and failure modes, in one short weekly email.
Free. One email a week. Unsubscribe anytime.
What tools does it use?
How do you set it up?
- Pick stalled opportunities and rank them by dollars at risk.
- Fetch the CRM record, outside signals and the latest meeting transcript in parallel; let outside sources come back empty without failing the run.
- Score each deal with a fixed rubric in code, not with the model.
- Give the model a closed list of allowed dates, amounts, stages and contacts, and have it write the plan and email with a citation for each claim.
- Run a code checker on every draft that rejects any fact not in the allowed list, retry at most twice, then stop and publish nothing.
- Write passing drafts back to the CRM with an approval flag so a person approves and the CRM sends.
- Log every run and use the same checker as the grader when comparing cheaper and larger models.
What results are reported?
The author reports about 30 seconds and a few cents per rescue, and says his eval suite showed a smaller Claude model met the same honesty standard as the largest one at about half the cost. The repo is demonstrated on sample data; no results from live deals are published.
Used in recipes
What goes wrong
Where does this break?
- The checker is strict on purpose: a draft citing $240,001 against a $240,000 record, or a date one day off, is rejected.
- The check for a departed recipient matches full names in news snippets, so a nickname can slip past it (stated by the author as a known limit).
- Runs that fail twice publish nothing, so someone needs to watch failed runs or stalled deals can drop out of view. (editor note)
- Setup needs a Salesforce connected app, a Google OAuth client and API keys, so plan admin time before trying it on live deals. (editor note)
This is where most teams get stuck. Want us to handle the setup?
Source and credit
Deep Shah, Deal Rescue Agent (open source, announced on LinkedIn) · linkedin
Source dated 2026-10-18 · last reviewed 2026-10-23. Summarized in our own words; see the source for details.