Template · Sales

Closed-lost debrief

Your CRM posts the deal to a webhook when it moves to Closed lost, with the notes, emails and call summaries attached. Claude reads the history, picks the real reason from your list with the evidence for it, says what would have changed the outcome, and suggests when and why to re-engage. The debrief goes to your CRM and to the sales channel.

Download .json

WebhookDEAL-4471Northwind Logistics · $48,000 ARRClosed lost
Pipeline
  1. Write debrief Claude API · Opus 5
  2. Update CRM Shell
  3. Post to Slack Shell
CRMDEAL-4471Reason: timing. Re-engage in March after their ERP migration.Updated
The pipeline

What each step does

  1. Write debrief

    Claude API · Opus 5

    Reads the deal history and picks the loss reason, with evidence, lessons and a re-engage date.

  2. Update CRM

    Shell

    Sends the reason and debrief to your CRM.

  3. Post to Slack

    Shell

    Posts the debrief to the sales channel.

Set it up

From copy to first run

  1. Copy the pipeline JSON with the button above.
  2. In Jimothy, open Pipelines → New pipeline, paste it under “Or import a pipeline JSON” and click Import.
  3. Fill in the variables below under Pipeline settings → Variables.
  4. Triggers → Add trigger → Webhook. Have your CRM (or a Zapier step) post deals that move to Closed lost, with the fields below.

Send title (company), description (the deal’s notes, emails and call summaries), key (the deal id) and the extra fields amount, owner and competitor.

Variables

What to fill in

The prompts and commands read these as {{vars.<name>}}. The examples are placeholders: replace them with your own.

VariableWhat to put in itExample
reasonsYour loss reasons. The debrief picks exactly one.price, missing feature, competitor, timing, no decision, champion left, poor fit
crmWebhookUrlWhere the debrief goes, e.g. a Zapier hook that sets the loss reason and a follow-up task.—
slackWebhookUrlA Slack incoming webhook for the sales channel.—
Show the pipeline JSON
{
  "jimothyPipeline": 1,
  "name": "Closed-lost debrief",
  "description": "Works out why a deal was lost, files the reason in your CRM, and sets a date to re-engage.",
  "icon": "rocket",
  "color": "#0369a1",
  "repo": {
    "mode": "scratch"
  },
  "concurrency": 3,
  "variables": {
    "reasons": "price, missing feature, competitor, timing, no decision, champion left, poor fit",
    "crmWebhookUrl": "",
    "slackWebhookUrl": ""
  },
  "steps": [
    {
      "id": "debrief",
      "name": "Write debrief",
      "type": "agent",
      "description": "Reads the deal history and picks the loss reason, with evidence, lessons and a re-engage date.",
      "harnessId": "anthropic-api",
      "model": "claude-opus-5",
      "timeoutMinutes": 10,
      "passPattern": "^\\s*REASON:\\s*\\S",
      "prompt": "Deal {{issue.key}}: {{issue.title}}, {{issue.raw.amount | default:\"amount unknown\"}}, owner {{issue.raw.owner | default:\"unknown\"}}, competitor {{issue.raw.competitor | default:\"none recorded\"}}.\n\nHistory:\n{{issue.description | truncate:60000}}\n\nWrite a closed-lost debrief. Start with exactly one line \"REASON: <one of: {{vars.reasons}}>\", then the line \"*Closed lost: {{issue.title}}* ({{issue.raw.amount | default:\"amount unknown\"}})\". Then:\n*Evidence*: two or three quotes or facts from the history that show it\n*What would have changed it*: specific, about our process or product, not the buyer\n*Re-engage*: a month and the trigger to watch for, or \"Don't\" with why\n*Lesson for the team*: one sentence\nBase everything on the history; say when it doesn't support a conclusion."
    },
    {
      "id": "crm",
      "name": "Update CRM",
      "type": "shell",
      "description": "Sends the reason and debrief to your CRM.",
      "dependsOn": [
        "debrief"
      ],
      "timeoutMinutes": 2,
      "command": "printf '{\"deal\":%s,\"reason\":%s,\"debrief\":%s}' {{issue.key | json}} {{steps.debrief.output | first_line | json}} {{steps.debrief.output | json}} | curl -fsS -X POST -H 'Content-Type: application/json' --data @- {{vars.crmWebhookUrl}}"
    },
    {
      "id": "post",
      "name": "Post to Slack",
      "type": "shell",
      "description": "Posts the debrief to the sales channel.",
      "dependsOn": [
        "debrief"
      ],
      "timeoutMinutes": 2,
      "command": "printf '{\"text\":%s}' {{steps.debrief.output | json}} | curl -fsS -X POST -H 'Content-Type: application/json' --data @- {{vars.slackWebhookUrl}}"
    }
  ]
}