ScaleXP Invoicing: Create invoices automatically with HubSpot workflows

Set up a HubSpot workflow with the SXP Invoicing action to create Xero or QuickBooks Online invoices automatically from deals.

Use a HubSpot workflow to create invoices in Xero or QuickBooks Online automatically, for example when a deal is closed won. The workflow uses the deal's company or contact, line items, currency and your tax settings.

You need:

  • ScaleXP Invoicing installed in HubSpot, with Xero or QuickBooks Online connected. See Step 1: Install ScaleXP Invoicing in HubSpot.
  • Access to HubSpot workflows.
  • Deals with line items. Line items should be tax-exclusive, or use HubSpot's tax settings.

1. Create a deal-based workflow

  1. In HubSpot, go to Automation > Workflows and create a workflow.
  2. Choose Deal-based. The ScaleXP Invoicing actions only work in deal-based workflows. Ignore invoice-based workflows, which are for HubSpot payments.
  3. Set the trigger for when billing should start, for example:
    • Deal stage is Closed won
    • A property such as Ready to bill is set to Yes
    • A contract start date is reached

2. Add the SXP Invoicing action

  1. Click + to add an action.
  2. Under Integrated apps, expand SXP Invoicing.
  3. Choose the action you need:
    • Create Xero Invoice or Create Quickbooks Online Invoice for a one-off invoice.
    • Create Xero Recurring Invoice or Create Quickbooks Online Recurring Invoice for a repeating invoice.
SXP Invoicing actions in the HubSpot workflow action panel

3. Choose the contact and dates

Create Xero Invoice action with connection, invoice contact and date settings
  • Connection: the Xero or QuickBooks organization to use. If it's empty, connect your accounting system in the ScaleXP Invoicing dashboard.
  • Invoice Contact: how to find the customer, using the Company associated to deal, the email of the Contact associated to deal, or a Specific Xero contact or Specific Quickbooks contact (the contact ID is synced back to a deal property).
  • Create new contact if not found: creates the customer from the HubSpot company or contact. If you use the company, set which email to use.
  • Invoice Date (or Start Date for recurring invoices): When workflow is triggered, On deal close date, or Use a deal property such as a contract start date.
  • Invoice Due Date (Xero): a number of days after the invoice date, or a deal property. Optional for draft invoices.
  • Terms (QuickBooks Online recurring): payment terms from QuickBooks, such as Net 30.

4. Choose the invoice details

Create Xero Invoice action with status, line items, accounts and taxes, and branding theme
  • Reference (Xero) or Message (QuickBooks Online): text on the invoice. You can insert deal properties.
  • Invoice Status (Xero): Draft, Submitted for Approval or Authorised. Non-draft invoices need every account and tax rate filled in.
  • Line Items:
    • All: every line item on the deal.
    • Filter: only some line items, for example one product.
    • Split: all line items split by a percentage, for example a 10% deposit.
    • New Items: only line items that haven't been invoiced before.
    • Billing frequency options, such as Only One-time, to include only line items with that frequency.
  • Accounts and Taxes (Xero): Enter in Xero, Match with Xero products (uses each line item's SKU), Choose from a list, or Use line item properties (beta), which our support team must set up first.
  • Taxes (QuickBooks Online): Use default to let QuickBooks calculate tax, or Override default to pick a rate.
  • Branding theme for invoice (Xero): the invoice template.
  • Custom fields (QuickBooks Online): fill in up to three custom fields.
  • Invoice frequency (recurring): how often the invoice repeats. In QuickBooks Online, Start invoices the same day creates today's invoice straight away, as QuickBooks creates recurring invoices overnight.

The invoice uses the deal currency. To match products, see Step 3: Map HubSpot products to Xero or QuickBooks.


5. Add branches for different cases

Use HubSpot branches to apply different settings, each with its own SXP Invoicing action. For example:

  • Pipeline is Upsells: create a one-off invoice for the change.
  • Country is outside your tax region: use an action with a different tax setting.
  • Amount is over a limit: create a draft for review instead of an authorized invoice.

For contract changes, see ScaleXP Invoicing: How to handle upsells, cross-sells, and downgrades.


6. Turn on the workflow and check the results

  1. Click Save, then Review and turn on.
  2. When a deal enrolls, the invoice is created in your accounting system and shows on the ScaleXP Invoicing card on the deal. You can still add more invoices by hand.
  3. If an invoice fails, the workflow history shows the error, for example Could not find contact.

To get alerts, add a second workflow that watches the Invoice Status deal property, which changes to Invoices Synced when the sync succeeds. ScaleXP Invoicing also updates properties such as Number of Invoices, Overdue Invoice Count and Next Invoice Due Date, which you can use in other workflows. See ScaleXP Invoicing: Data fields synced back to HubSpot.