Skip to main content

Count Xero invoices, bills, and credit notes with a voided/deleted filter

Workflow preview

Workflow preview
100%
Count Xero invoices, bills, and credit notes with a voided/deleted filter preview
Open on n8n.io

1. Workflow Overview

Quick overview This workflow runs on manual execution to count Xero Accounting records: sales invoices, bills, and sales/bill credit notes; with an optional filter to exclude VOIDED and DELETED sta...

Best for

  • Document Extraction automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.manualtrigger, n8n-nodes-base.httprequest, n8n-nodes-base.code, n8n-nodes-base.merge, n8n-nodes-base.set, n8n-nodes-base.stickynote

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Sobek.

Original n8n.io source

1.1 Workflow description

Title
Count Xero invoices, bills, and credit notes with a voided/deleted filter
Workflow name
Count Xero invoices, bills, and credit notes with a voided/deleted filter

Quick overview

This workflow runs on manual execution to count Xero Accounting records: sales invoices, bills, and sales/bill credit notes; with an optional filter to exclude VOIDED and DELETED statuses, returning a simple tally per record type.

How it works

  1. Starts when you manually execute the workflow in n8n.
  2. Sets an option that controls whether VOIDED and DELETED records are included in the counts.
  3. Calls Xero’s Connections endpoint to retrieve the tenant ID(s) used to authenticate subsequent Accounting API requests.
  4. Queries the Xero Accounting API for sales invoices (ACCREC) and bills (ACCPAY), paging through results and counting returned invoice records.
  5. Queries the Xero Accounting API for sales credit notes (ACCRECCREDIT) and bill credit notes (ACCPAYCREDIT), paging through results and counting returned credit note records.
  6. Combines the four tallies into a single output list of { type, count } results.

Setup

  1. Create and select a Xero OAuth2 credential in n8n with access to the target Xero organisation(s).
  2. If your Xero credential can access multiple tenants, adjust the workflow to target a single tenant if you need per-organisation counts.
  3. Set includeVoidedDeleted to true if you want to include VOIDED and DELETED records; otherwise leave it false to exclude them.

Requirements

  • Xero OAuth2 credential in n8n

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - When clicking ‘Execute workflow’

Type / Role
n8n-nodes-base.manualTrigger - manualTrigger
Config choices
Version 1

Block 2 - Get Connections

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.4

Block 3 - Count Sales Invoices

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.4

Block 4 - Tally Sales Invoices

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 5 - Count Bills

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.4

Block 6 - Tally Bills

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 7 - Count Sales Credit Notes

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.4

Block 8 - Tally Sales Credit Notes

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 9 - Count Bill Credit Notes

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.4

Block 10 - Tally Bill Credit Notes

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 11 - Merge

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.2

Block 12 - Count Options

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 13 - Overview

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 14 - Section - Setup

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 15 - Section - Counting

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 16 - Section - Merge

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Count Xero invoices, bills, and credit notes with a voided/deleted filter
Complexity advanced
Nodes 16
Categories Document Extraction
Author Sobek
Published 17 Jun 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/16467/16467.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Count Xero invoices, bills, and credit notes with a voided/deleted filter do?

Quick overview This workflow runs on manual execution to count Xero Accounting records: sales invoices, bills, and sales/bill credit notes; with an optional filter to exclude VOIDED and DELETED sta...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Document Extraction use case.