How to Detect Deal Risk From Email Thread Patterns

iGPT Team
By iGPT Team
| | 3 min read
How to Detect Deal Risk From Email Thread Patterns

You can build a deal risk detector with iGPT’s API, a few lines of Python, and about ten minutes. It scans email threads for engagement drops, unanswered objections, competitor mentions, and overdue commitments, then returns structured JSON you can pipe into Slack, your CRM, or a dashboard.

Here’s how.

Step 1: Get your API key

Sign up at igpt.ai/hub/apikeys and grab your key. Store it as an environment variable:

export IGPT_API_KEY=your_key_here

Step 2: Install the SDK and connect an inbox

pip install igptai
import os
from igptai import IGPT

igpt = IGPT(api_key=os.getenv("IGPT_API_KEY"))

res = igpt.connectors.authorize(
    user="user_123",
    service="spike",
    scope="messages"
)

print("Open this URL to authorize:", res.get("url"))

The user opens the URL, authorizes their inbox, and iGPT starts indexing. Thread reconstruction, quoted text deduplication, participant attribution, and temporal ordering all happen automatically during indexing.

Step 3: Query for deal risk signals

igpt = IGPT(
    api_key=os.getenv("IGPT_API_KEY"),
    user="user_123"
)

response = igpt.recall.ask(
    input=(
        "What friction or risk signals exist in my "
        "active deals? Include engagement drops, "
        "unanswered objections, competitor mentions, "
        "and overdue commitments from our side."
    ),
    quality="cef-1-high",
    output_format="json"
)

That’s it. The output could look like this:

Three signals converging on one account plus an overdue deliverable from your own side. Any single signal is a task for your next touchpoint. All four together is the pattern that precedes deals going dark, and the overdue_from_us field is the one your rep most needs and least wants to discover during a live call.

Scaling to a workflow

The query above works for one user checking their own deals. To turn it into a production workflow:

Daily Slack digest. Run the query on a cron job, filter for high-risk deals, post a summary to your sales channel. Your Monday pipeline review starts with evidence instead of gut feel.

CRM enrichment. Push risk signals and overdue commitments into Salesforce or HubSpot on a daily sync. Your CRM starts reflecting what actually happened in the conversation rather than what your rep remembered to log.

Pre-call prep. Pull the risk report for a specific account before a scheduled call. You walk in knowing the objection that went unanswered, the commitment you owe, and the engagement shift that happened after your last proposal.

Quarterly forensics. Run the query against closed-lost deals from last quarter. See which patterns appeared before the deal died and how early they showed up. Every loss becomes a training case.

Other things you can detect with the same API

The same recall.ask() call with different prompts gives you:

Follow-up radar. “Which contacts are waiting on a response from me?” surfaces every thread where you owe a reply, ranked by how overdue it is.

Commitment tracker. “What have I promised to send or do this week across all active threads?” matches promises against follow-through and flags what’s late.

Competitive intelligence. “Which prospects have mentioned competitors, and in what context?” pulls mentions with surrounding conversation so you know whether it’s casual research or active evaluation.

Account health. “What’s the overall engagement trend across my top 10 accounts over the past 30 days?” gives a macro view of which relationships are warming and which are cooling.


Try it on your own inbox at igpt.ai/hub/playground. Connect through MCP at mcp.igpt.ai if you’re working inside Claude, Cursor, or another MCP-compatible tool.

Turn email into
reasoning-ready data

Get Started

Context Is All You Need