Pipedrive Stale Deal Detector
On a schedule, the flow finds Pipedrive deals with no activity past a threshold (by stage), reminds the owner in Teams, adds a follow-up activity, and escalates deals stalled well beyond the limit to the sales manager. Keeps the pipeline moving and prevents deals quietly rotting.
Provided as-is, without warranty of any kind. Review and test each pattern in a non-production environment before deploying it to live automations. See our Terms.
Overview
This flow stops Pipedrive deals quietly rotting. On a daily schedule it pulls every open deal, computes how long each has gone without activity, and acts on the stale ones: it reminds the deal owner in a Teams channel, automatically schedules a follow-up activity in Pipedrive, and escalates deals stalled well beyond their limit to the sales manager by email.
Why it matters: Stalled deals are silent revenue leakage. Stage-aware thresholds plus automated nudges and manager escalation keep the pipeline active and surface deals that need help — with zero manual review.
Flow state: Off (demo) — going live requires only authorizing the three connections and setting the environment-variable values.
Use Case
A sales team wants automatic detection and nudging of inactive deals, with per-stage inactivity limits (early-stage deals tolerate longer gaps than late-stage deals) and manager escalation when a deal chronically stalls. Built for Sales Teams and Project Managers.
Flow Architecture
Run Daily Stale Deal Scan
Recurrence (Day/1, 08:00 ET)Daily stale sweep.
Initialize configuration
Initialize Variable x10In-flow tunable thresholds and labels (stage threshold map, default stale days, escalation multiplier, follow-up subject prefix) plus env-var-bound identifiers (Teams group/channel ids, manager email, activity type, pipeline id).
Load stages and deals
Pipedrive ListStages + ListDealsLoads the configured pipeline's stages for name resolution and retrieves all deals.
Filter open deals
Filter ArrayKeeps only status == 'open'.
Per-deal staleness evaluation
Apply to each Open Deal (concurrency 1)Resolves last-activity date and days inactive, computes per-stage and escalation thresholds, and resolves the stage name.
Notify, follow-up, escalate
Condition (stale) → Teams PostMessageToConversation + Pipedrive AddActivity; Condition (severely stalled) → Outlook SendEmailV2For stale deals, posts a Teams reminder and schedules a follow-up activity; if days ≥ escalation threshold, emails the sales manager.
Environment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_TeamsGroupId | String | REPLACE_WITH_TEAMS_GROUP_ID | Teams team (group) ID where reminders are posted. |
| flowlibs_TeamsChannelId | String | REPLACE_WITH_TEAMS_CHANNEL_ID | Teams channel ID for reminders. |
| flowlibs_SalesManagerEmail | String | sales-manager@yourcompany.com | Escalation email recipient. |
| flowlibs_PipedriveActivityType | String | call | Pipedrive activity type for the follow-up (call/email/task/…). |
| flowlibs_PipedrivePipelineId | String | 1 | Pipeline whose stages are loaded for stage-name resolution. |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| Pipedrive | shared_pipedrive | ListStages ListDeals AddActivity |
| Microsoft Teams | shared_teams | PostMessageToConversation |
| Office 365 Outlook | shared_office365 | SendEmailV2 |
Note — All connections are referenced as solution connection references; the flow is portable between environments as long as a connection is mapped at import time.
Customization Guide
Almost every realistic variant of this flow can be implemented by changing environment variable values. A few cases require small edits inside the flow definition — those are called out explicitly below.
- Per-stage tuning
- Edit varStageThresholdMap (keyed by Pipedrive stage_id) and varDefaultStaleDays to match your sales motion; raise varEscalationMultiplier to escalate less aggressively.
- Direct-message the owner
- Replace the channel post with a Teams chat or Outlook email to user_id.email for a private nudge instead of a channel reminder.
- Value-weighted escalation
- Add a Condition on the deal value so only high-value stalls escalate to the manager.
- AI re-engagement draft
- Insert an Azure OpenAI step to draft a tailored re-engagement email per stale deal.
- Auto-recycle
- Use Pipedrive UpdateDealStatus/UpdateDealStage to move deals stalled beyond a hard limit to a Lost/recycle stage.
Key Expressions
The flow is intentionally light on Power Fx / WDL gymnastics — the heaviest expressions are the branch-name concatenation and the approval outcome check. They are listed below in the order they appear in the flow.
EXPR.01Days inactive
Whole days since last activity.
EXPR.02Per-stage threshold
Stale-day limit for the deal's stage.
EXPR.03Escalation threshold
Escalation point = stage threshold × multiplier.
EXPR.04Stale gate
True when the deal is stale.
EXPR.05Stage name
Resolves the deal's stage_id to a readable name.
Customize & download
Generate a ready-to-import copy of this solution with your environment-variable values baked in — available on Base, Pro, or Team.
Upgrade to customize
Comments
Sign in to join the conversation.
Sign inNo comments yet. Be the first to share your experience with this flow.