Catch closed-won deals where payment and rep follow-up have stalled
Every hour this n8n workflow checks closed-won GoHighLevel deals against Stripe payments, rep messages and open tasks, and posts a Slack alert with the evidence, a next step and a draft customer message when an unpaid deal is slipping.
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
- Pipeline Hygiene / CRM
- intermediate
- Sales leader
- RevOps
- Founder
- AE
- Category
- Pipeline Hygiene / CRM
- Difficulty
- Intermediate
- Est. cost
- Not stated by source; workflow hosting plus Gemini usage for each unpaid deal checked
Works with
What problem does this solve?
A deal marked closed-won is not cash until the customer pays, and in small sales teams the rep often moves on before the invoice is settled. Unpaid wins with no follow-up, an unanswered customer reply or an overdue task slip quietly until someone checks the books.
How is the agent set up?
An n8n template by creator iamvaar runs on an hourly schedule. It fetches opportunities from a chosen closed-won stage in GoHighLevel, drops any with no value, and skips deals already alerted by checking a Notification Log sheet in Google Sheets. For each remaining deal it pulls the contact's latest conversation, message history and tasks from GoHighLevel, then looks up the matching Stripe customer and charges and works out how much has been paid since the deal closed and how much is still outstanding. A code step turns all of this into fixed flags before any AI is involved: paid in full, partial payment, no rep follow-up since close (automated workflow and campaign messages do not count as a rep touch), stale follow-up, customer reply left unanswered, no open task, overdue task, no owner, and payment overdue for escalation. The template's defaults are a 24-hour first-touch window, 48 hours between rep touches and escalation after 7 days unpaid. Google Gemini then reads that context with a published system prompt that treats every number and flag as fact, maps flags to a scenario and severity, and returns JSON with a short headline, two to four evidence lines, one action for the rep with a deadline, and a short follow-up message with a payment link placeholder. When an alert is needed it posts to Slack with a link to the contact in GoHighLevel and logs the alert in the sheet.
What prompt does it use?
You are a Sales Operations auditor. Every morning you review ONE closed-won deal whose payment is not yet fully received, and decide whether the sales rep is following up properly or the deal is quietly slipping. INPUT You get a JSON "context" with: deal, contact, payment, communication, tasks, thresholds and flags. Every number and flag was computed by code. Treat them as FACT. Never recompute, never invent dates, amounts, invoice numbers or links. If something is null, say "no data". DEFINITIONS - "Rep touch" = a human-sent outbound message or call. Automated workflow/campaign messages do NOT count. - payment.outstanding = deal value minus money received since the deal was closed. FLAGS -> SCENARIO -> MINIMUM SEVERITY - PAID_IN_FULL: scenario PAID, alert_needed=false, severity none. Stop here. - CUSTOMER_REPLIED_UNANSWERED: scenario CUSTOMER_WAITING. high; critical if hours_since_last_customer_message > 24. - NO_FOLLOW_UP_SINCE_CLOSE: scenario NO_FOLLOW_UP. high; critical if PAYMENT_OVERDUE_ESCALATE is also present. - STALE_FOLLOW_UP: scenario STALE_FOLLOW_UP. medium; high if TASK_OVERDUE is also present. - TASK_OVERDUE: scenario TASK_OVERDUE. medium; high if there are zero rep touches since close. - NO_OPEN_TASK (payment still pending): scenario NO_NEXT_STEP. medium. - NO_OWNER_ASSIGNED: scenario NO_OWNER. medium; high if NO_FOLLOW_UP_SINCE_CLOSE is also present. - PARTIAL_PAYMENT: scenario PARTIAL_PAYMENT. medium minimum; state the remaining amount. - Only WITHIN_FIRST_TOUCH_SLA present, an open task that is not overdue, and an owner assigned: scenario ON_TRACK, alert_needed=false, severity none. - Several flags: use the most severe one as "scenario", raise severity one level if three or more problem flags stack, and mention the others in evidence. - PAYMENT_OVERDUE_ESCALATE: set escalate_to_manager=true. Also set it true for any critical severity. alert_needed = true for severity low, medium, high or critical. false only for PAID and ON_TRACK. OUTPUT FIELDS - headline: max 15 words, plain language, no jargon. - evidence: 2 to 4 strings, each with concrete facts from the context (dates, hours, amounts, task titles). - recommended_action: ONE imperative sentence addressed to the sales rep, with a deadline (e.g. "Call the client today before 5 PM and share the payment link"). - suggested_followup_message: a short, polite message the rep can send to the customer on WhatsApp or email. Mention the signed agreement and the outstanding amount, give one clear next step. Use [payment link] as a placeholder. Max 60 words. Empty string if alert_needed=false. Return ONLY the JSON object that matches the schema. No markdown, no commentary.
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?
- Import the n8n template and connect GoHighLevel, Stripe, Gemini, Slack and a Google Sheets service account; set the pipeline, stage and location IDs for your closed-won stage.
- Create a Notification Log sheet with opportunity ID and notified-at columns so each deal is alerted once (or set a re-notify interval).
- Set the thresholds in the context code step: first-touch window, maximum gap between rep touches, and days unpaid before escalation.
- Fix the Stripe customer lookup so it matches each deal's customer (the template ships filtered to a fixed email).
- Each hour the workflow computes payment status and follow-up flags in code, then the model turns them into a severity, evidence, a rep action and a draft customer message.
- Alerts post to a Slack channel with a link to the contact; the rep follows up and the manager is flagged on escalations.
What results are reported?
No results are claimed; this is a published workflow template with a walkthrough video.
What goes wrong
Where does this break?
- The template's Stripe lookup is filtered by a fixed email, so it only works on real deals after you change how customers are matched.
- By default each deal alerts only once. Set a re-notify interval or a still-unpaid deal can go quiet again after the first alert.
- Payment is matched by Stripe customer and charge dates after the close. Invoices paid another way, refunds, or a different billing contact will show as unpaid. (editor note)
- The draft customer message names an outstanding amount. Have the rep check it against the contract before sending anything. (editor note)
This is where most teams get stuck. Want us to handle the setup?
Source and credit
iamvaar, n8n workflow template · vendor
Source dated 2026-10-15 · last reviewed 2026-10-19. Summarized in our own words; see the source for details.