Back to ERPNext in Google Sheets
SheetXAI logo
ERPNext logo
ERPNext · Google Sheets Guide

Pull ERPNext Unpaid Purchase Invoices Into a Sheet for AP Review

2026-05-13
4 min read
See the Excel version →

The Scenario

You are a finance manager. Every Monday morning you send a cash-flow planning snapshot to the CFO covering the next 30 days. A big piece of that is accounts payable — which supplier invoices are outstanding, when they are due, and which ones are already overdue.

The data is in ERPNext. Your weekly process: log into ERPNext, navigate to the Purchase Invoice list, filter to Unpaid, export to CSV, open in Google Sheets, delete the 14 columns you do not need, sort by due date, add a formula to flag overdue invoices, and format the supplier name column because the export wraps it weirdly.

Twenty-five minutes, every Monday, for a report that takes thirty seconds to describe.

The bad version of Monday morning:

  • Log into ERPNext, navigate to Purchase Invoices
  • Filter to status Unpaid, export to CSV
  • Open CSV, find and keep: supplier name, invoice total, currency, due date
  • Delete the other columns
  • Add a formula to flag invoices where due date is before today
  • Fix the column widths and sort by due date
  • Paste the range into the CFO's weekly template
  • It is 9:30 and you have not started the actual cash-flow analysis.

The fast version is one prompt.

The Easy Way: One Prompt in SheetXAI

SheetXAI queries ERPNext directly and writes the AP snapshot into the sheet, formatted the way the CFO template expects it.

Open the SheetXAI sidebar and type:

List all ERPNext Purchase Invoices with status 'Unpaid' and write supplier name, invoice total, currency, and due date into columns A through D of this sheet. Sort by due date ascending. Add a column E with "OVERDUE" for any invoice where the due date is before today, and leave it blank otherwise.

SheetXAI queries ERPNext, writes the results, sorts the rows, and applies the overdue flag. By the time you open the sheet, the raw AP data is ready for your cash-flow analysis.

What You Get

A clean AP snapshot with every unpaid Purchase Invoice:

  • Supplier name — column A
  • Invoice total — column B
  • Currency — column C
  • Due date — column D, sorted ascending
  • Overdue flag — column E, "OVERDUE" for past-due invoices, blank otherwise

The CFO can scan column E before you say a word. The overdue invoices are already surfaced. You move straight to the analysis instead of building the view.

What If the Data Is Not Quite Ready

AP review has predictable variations — multi-currency, partial payments, supplier exceptions. SheetXAI handles them inline.

When the CFO wants only invoices due in the next 30 days

The full unpaid list might have invoices due in three months that are not relevant to this week's planning.

List all ERPNext Purchase Invoices with status 'Unpaid' and a due date within the next 30 days. Write supplier name, invoice total, currency, and due date into columns A through D, sorted by due date ascending. Flag overdue invoices in column E.

When you need to show amounts in a single currency for the summary

The invoices are in GBP, EUR, and USD. The CFO wants one total in USD.

List all unpaid ERPNext Purchase Invoices with due date in the next 30 days. Write supplier name, original invoice total, currency, and due date into columns A through D. In column E, convert the invoice total to USD using the exchange rates in the FX Rates tab (column A = currency code, column B = rate to USD). Sum column E at the bottom of the sheet.

When you want to group by supplier to see total exposure per vendor

The CFO sometimes wants to know total owed to each supplier before deciding payment priority.

List all unpaid ERPNext Purchase Invoices sorted by supplier name, then by due date ascending within each supplier. Write supplier name, invoice total, currency, and due date into columns A through D. Add a subtotal row after each supplier group showing total owed to that supplier.

When you need the full picture: overdue flags, currency conversion, and a cash-flow summary paragraph, all at once

Fetch all unpaid ERPNext Purchase Invoices. Write supplier name, invoice total, currency, and due date into columns A through D sorted by due date. Convert all totals to USD using rates in the FX Rates tab and write the USD equivalent into column E. Flag column F as "OVERDUE" for invoices past due today. Then write a two-sentence cash-flow summary at the top of the sheet: total AP balance in USD, and how much of it is overdue.

The pattern: instead of pulling data and analyzing it separately, you describe the entire output in one instruction and SheetXAI builds it.

Try It

Get the 7-day free trial of SheetXAI and run it before your next Monday AP review. The ERPNext integration is included in every SheetXAI plan. For other finance workflows, see how to bulk-generate Sales Invoices from a sheet of Sales Order IDs or the ERPNext in Google Sheets overview.

Stop memorizing formulas.
Tell your spreadsheet what to do.

Join 4,000+ professionals saving hours every week with SheetXAI.

Learn more