Recued
← Back to recipes

Deal Risk Scorer

by recued-core v1 action

Computes weighted risk subscores for activity, close date, and contacts, with optional AI narrative.

How it works

Data fetch
deal deal-reader-hubspot
Fetch reader from hubspot
contacts deal-contacts-hubspot
Fetch contacts from hubspot
Process (14 steps)
guard_deal guard
Stop if deal is empty
days_since_activity date_diff
Calculate days between deal last activity date and now
activity_risk math
Calculate: min(100, {{step.days_since_activity}} * 5)
days_until_close date_diff
Calculate days between now and deal close date
skip: step.deal.close_date is_null
close_date_risk math
Calculate: min(100, max(0, (30 - {{step.days_until_close}}) * 3))
skip: step.days_until_close is_null
stale_contacts count
Count items in contacts
contact_risk math
Calculate: min(100, {{step.stale_contacts}} * 25)
total_risk weighted_score
Weighted score from: activity risk (NaN%), close date risk (NaN%), contact risk (NaN%)
meets_threshold compare
Check if total risk is at least setting ai threshold
ai_ready all
Check if all conditions are true
ai_context pick
Keep only specific fields from
skip: step.ai_ready equal false
ai_narrative ai-prompt
AI generates a response from a custom prompt (PII auto-protected)
skip: step.ai_ready equal false
risk_checklist to_checklist
Format results as an actionable checklist
risk_summary to_summary
Format results as a summary card
Output
summary risk_summary
checklist risk_checklist
ai_analysis ai_narrative

Settings (5)

Configurable at install. Defaults shown — change anytime in the extension.

enable ai toggle = on
ai threshold number = 50
close weight number = 0.3
activity weight number = 0.4
contacts weight number = 0.3

Tags

hubspot dealrisk-scoringhubspotai

Details

16 steps 5 configurable settings recipe_id: compute-deal-risk-hubspot

Install

Install in Recued View publisher Open Kitchen

If the webclient is not paired yet, copy compute-deal-risk-hubspot and paste it after pairing.