Create invoice line items in Xero from Knack

DatabaseAccounting

What it does

When a new record is added to Knack, this automation searches Xero for a matching invoice number. If found, it adds a line item to that invoice; if not, it creates a new invoice with a single line item.

Who it's for

Accounting teams who need invoices synced from Knack to Xero without manual data entry.

Apps used

How teams use this

Sync new invoices from Knack to Xero

When a new record is created in Knack, the invoice is automatically added to Xero with all line items so the accounting team has one source of truth.

Prevent duplicate invoices in Xero

The automation checks for an existing invoice before creating a new one, so the same invoice is never duplicated in Xero even if Knack records are added multiple times.

Add custom fields to line items

Extend the automation to include additional fields such as project code or cost center when the line item is created or updated in Xero.

Route invoices by customer type

Filter invoices by customer type in Knack and route them to different Xero accounts or cost centers based on that condition.

How it works

  1. Monitor for new records in Knack. A new record is created in Knack with invoice details like customer name, amount, and invoice number.
  2. Search for the invoice in Xero. Search Xero for an existing invoice that matches the invoice number from the Knack record so duplicates are avoided.
  3. Create or update the invoice. If the invoice does not exist in Xero, create a new invoice with a single line item. If it exists, add the line item to that invoice instead.