Библиотека / Финансы, счета и бухгалтерия
Финансы, счета и бухгалтерия
Выполнять ограниченные повторные попытки dunning в Lago с Data Tables и оповещениями SMTP
Запускается по проверенным событиям платежей Lago: повторяет неудачные платежи до трёх раз, фиксирует результат каждой попытки в Data Table и отправляет оповещения SMTP для проверки, действий клиента или восстановления.
Что делает
## Run bounded dunning for failed payments with Lago and email alerts ### How it works This workflow reacts to verified Lago payment events and routes failed payments, customer-action requests, recoveries, and unrelated events. It enriches failed invoices with customer data, retries payment only while a durable three-attempt limit permits, stores every outcome in an n8n Data Table, and sends a configurable billing alert for retries, manual review, customer action, or recovery. ### Setup steps - Add a Lago API credential to the trigger and every Lago action node. - Add an SMTP credential to Send Billing Alert, then replace both example email addresses. - Select the Lago Dunning State table in every Data Table node. It needs the string fields invoice_id, invoice_number, external_customer_id, customer_email, event_type, payment_status, state, and last_action; number fields retry_count and total_amount_cents; and date field last_event_at. - Test the retry, manual-review, customer-action, recovery, and ignored-event paths before publishing. ### Customization Change maxRetries in Decide Whether To Retry, replace email with Slack or PagerDuty, or add human approval for high-value invoices. If Lago Dunning Campaigns already retry these invoices, disable Retry Failed Payment and use this workflow only for state tracking and alerts.
Шаги
- When Lago Reports a Payment Event
- Normalize Billing Event
- Route Billing Event
- Get Failed Invoice
- Get Billing Customer
- Load Retry State
- Decide Whether To Retry
- If Retry Limit Allows
- Retry Failed Payment
- Build Retry State
- Save Retry State
- Prepare Retry Alert
- Send Billing Alert
- Build Manual Review State
Всего шагов: 25.
Похожие автоматизации
Финансы, счета и бухгалтерияУчитывайте использование токенов ИИ в Lago и предупреждайте, когда предоплаченные кредиты заканчиваютсяШагов: 15Формы и опросыRun a timed email-verified quiz with n8n forms, SMTP and data tablesШагов: 33Мониторинг, эксплуатация и инцидентыMonitor URL uptime with data tables and SMTP email alertsШагов: 18Автоматизация эл. почтыChase UK late invoice payments with Data Tables, GOV.UK and SMTP emailШагов: 21