Cut DSO and Collect Faster with n8n, Stripe & QuickBooks
Detect overdue invoices, craft GPT-powered reminders, send email/SMS, and log every interaction in Salesforce using n8n.
The cost of manual accounts receivable follow-up
Most finance teams still rely on exports, spreadsheets, and manual outreach to chase late payments. That process is slow, error-prone, and inconsistent: invoices fall through the cracks, messages are repetitive or impersonal, and AR staff spend hours on low-value tasks instead of resolving disputes and building relationships.
The business impact is straightforward — longer days sales outstanding (DSO), unpredictable cash flow, and higher collection costs. Affected companies see delayed projects, stretched working capital and avoidable write-offs. The good news is a targeted automation workflow using n8n with Stripe, QuickBooks, GPT, and Salesforce turns this reactive effort into a systematic, measurable process.
How the n8n workflow detects overdue invoices
Start the workflow on a scheduled Cron node (daily or multiple times per day). Use Stripe and QuickBooks nodes to query invoices: Stripe List Invoices and QuickBooks Query nodes fetch unpaid or past‑due invoices. Normalize records with a Set or Function node (merge Stripe and QuickBooks records, dedupe by invoice number or customer ID, and compute days overdue).
Add an IF node to separate truly overdue invoices (days overdue > 0 and not already in a recent follow-up window). Track follow-up metadata (attempt count, last contact date) using either Salesforce custom fields, a lightweight database (Google Sheets / Airtable), or n8n’s credentials-based storage. This avoids duplicate outreach and lets the workflow escalate after configured attempts.
Generate personalized reminders with GPT and payment links
Use the OpenAI node (or HTTP Request to an LLM endpoint) to generate dynamic, customer-specific reminder copy. Pass variables like customer name, invoice amount, due date, line items, and a secure payment link into the prompt template. Include tone parameters (polite, firm, or urgent) based on days overdue and attempt count so messages scale in firmness without sounding robotic.
Enrich messages with a payment link pulled from Stripe (Invoice hosted invoice_url or Checkout session). Format the final content with a Function node or the Set node to produce both HTML (email) and plain-text/SMS variants. Store the generated copy and metadata before sending so you can audit or reuse it in follow-ups.
Send emails and SMS, and log communications in Salesforce
Route delivery through channel logic: prefer email first, fall back to SMS if email bounces or based on customer preference. Use n8n’s Email/SMTP node (or transactional providers like SendGrid/SES) for email and Twilio node for SMS. Implement Send nodes inside a SplitInBatches loop for rate control, and add error handling with the Error Trigger node to retry failed sends according to provider limits.
After each send, create or update a Salesforce record (Task, EmailMessage, or a custom FollowUp object) with the message content, timestamp, and attempt metadata. Use the Salesforce node set to Create or Update so AR reps and account managers see an auditable timeline. Optionally, trigger an internal Slack/Teams notification when an invoice reaches escalation thresholds.
Before and after — business impact and ROI
Before: AR teams export a list from QuickBooks, manually compose messages, copy payment links, and log outreach in Salesforce — a process that can take hours each day, introduces mistakes, and delays follow-up. Collections depend on individual effort and institutional memory, increasing DSO and the risk of write-offs.
After: n8n runs nightly (or more frequently), identifies overdue invoices, generates tailored GPT reminders with secure payment links, sends them by the preferred channel, and logs every communication in Salesforce. The result is faster time-to-payment, fewer manual hours, predictable escalation, and better customer experience. Typical ROI metrics include a reduction in DSO (example: 10–30%), reclaimed staff hours (e.g., 15–40 hours/month), and higher recovery rates from automated timely outreach.