Skip to content
NEWError doctor and Watchtower: failed n8n runs explained in plain words, and emailed to you. See what is new

Library / Finance, Invoices & Accounting

Finance, Invoices & Accounting

Create QuickBooks invoices from won HubSpot deals with Slack alerts

On a schedule, it processes financial data using HubSpot, Quickbooks, Slack.

What it does

## Create QuickBooks invoices from won HubSpot deals with Slack alerts ### How it works Every hour Find Won Deals Without Invoice pulls HubSpot deals in your won stage with no quickbooks_invoice_number yet. For each deal it reads the contact and line items, finds the QuickBooks customer by email or creates one, and creates an invoice with one line per HubSpot line item. The invoice number is saved on the deal, so a deal is never billed twice. Invoices up to autoSendLimit are emailed by QuickBooks, bigger ones wait for finance. Deals without a contact email, and any failed step, are posted to Slack. ### Setup 1. Credentials: HubSpot App Token (private app with deals, contacts and line items read, deals write), QuickBooks Online OAuth2, Slack 2. In HubSpot add a single-line text deal property with internal name quickbooks_invoice_number 3. In Workflow Configuration set wonDealStage, startFromCloseDate, hubspotPortalId, quickbooksCompanyId, quickbooksApiUrl and quickbooksAppUrl (sandbox or live), defaultItemId, paymentTermsDays, autoSendInvoices, autoSendLimit, slackChannel, invoiceMemo 4. Test with a QuickBooks sandbox: mark a test deal with a contact and two line items as won, run Check Every Hour manually. Expected: a two-line invoice in QuickBooks, its number on the deal and a Slack message 5. Activate ### Customization tips The sample Slack messages and memo are a starting point, not a fixed format. - Post Invoice Sent to Slack, Ask Finance to Review Invoice, Ask Sales to Add a Contact, Alert Finance About Failed Deal: message text - Build Invoice: line mapping and due date - Check Every Hour: schedule - autoSendLimit: review threshold

The steps

  1. Check Every Hour
  2. Workflow Configuration
  3. Find Won Deals Without Invoice
  4. Keep New Deals With Amount
  5. Get Deal Contacts and Line Items
  6. Loop Over Deals
  7. Get Deal Contact
  8. Contact Has Email?
  9. Get Line Item Details
  10. Flag Deal as Missing Contact
  11. Ask Sales to Add a Contact
  12. Find Customer by Email
  13. Customer Already in QuickBooks?
  14. Build Invoice

22 steps in total.

Similar automations