Quick overview
This workflow runs every Thursday to build a weekly payment run by reading an invoice ledger and previous payment runs from Google Sheets, writing one decision row per invoice back to the Payment Runs tab, and emailing a plain-text summary via Gmail.
How it works
- Runs every Thursday morning on a schedule trigger.
- Reads all rows from the Ledger tab and the existing Payment Runs tab in the same Google Sheets spreadsheet.
- Evaluates each open invoice to decide whether to pay now, pay early for a discount, hold, request approval, flag data issues, or skip it because it was already proposed in a prior run.
- Stops with an error if the ledger is empty or required columns are missing, or stops quietly if there is nothing to record for the current window.
- Writes one row per decision into the Payment Runs tab using an upsert keyed by RunKey to avoid duplicates on reruns.
- Builds a plain-text summary including totals by currency and reasons for blocked invoices, then sends it to the configured approver email address via Gmail.
Setup
- Create a Google Sheets spreadsheet with a Ledger tab and a Payment Runs tab, and ensure the header names match the column names configured in the Set Ledger and Runs Config node.
- Add Google Sheets credentials with edit access to the spreadsheet and update ledgerSheetId (and tab names if different) in the Set Ledger and Runs Config node.
- Add Gmail credentials to send email and set approverEmail in the Set Ledger and Runs Config node, or remove the Gmail step if you only want the sheet output.
- Optionally adjust runWindowDays, approvalLimit, defaultCurrency, dateOrder, and runDate in the Set Ledger and Runs Config node to match your payment policy and date format.
Requirements
- A Google Sheets credential with edit access to the spreadsheet, and a Gmail credential with send access.
- No AI model, no API key and no paid service.
- A Ledger tab and a Payment Runs tab with the column names set in the Set Ledger and Runs Config node.
Customization
- Change the day or hour in the "Weekly Thursday Trigger" node.
- Change runWindowDays: 3 for a short week, 14 for a two-week payment run.
- Set approvalLimit to 0 to turn off the approval check.
- Replace the Google Sheets write with Airtable, Notion or a database node.
Additional info
The workflow never moves money; the Payment Runs tab is a proposal. Totals are grouped per currency with no conversion. Bad rows are written with the status FIX DATA and a reason, and never counted in the total. A failed sheet write stops the run and sends no email. Contains no credentials and no real data.