Create an invoice when a deal closes
Set up a workflow that turns a signed contract or a won deal into a sent invoice, with an approval step for larger amounts that you add.
The job
A deal closes and the contract comes back signed. Someone in billing reads the contract for the amount, currency and payment terms. They then create the invoice by hand and send it to the customer.
By hand
With Loopfour
How the workflow runs
- TriggerA contract is signedOr a deal moves to closed won in HubSpot, if you change the trigger.
- StepRead the billing termsThe AI Agent step pulls the amount, currency and payment terms from the contract.
- DecisionOver your approval limit?You add this check.
- ApprovalController approvesYou add this step. A rejection stops the run before an invoice is created.
- OutputInvoice created and sentThe template creates the invoice in Stripe and sends it to the customer.
What you need
- Template: Contract-to-invoice, in the Billing area of Workflows > Templates.
- Systems to connect: Stripe for the invoice. If you start from a deal instead of a signed contract, connect HubSpot too.
- Who approves: the person who signs off large invoices, such as your controller. Approvers are named by email address.
The Recipe view of this template describes a longer process, including a deal check and an approval. The workflow it creates has three steps: read the terms, create the Stripe invoice, send it. Open Flow to see exactly what will run, and add the approval yourself.
Set it up
Open the template
Go to Workflows, open the Templates tab and choose Billing. Select Contract-to-invoice to see its details.
Check the steps
Select Flow to see the steps the workflow runs. Then select Run workflow. Studio opens chat with the template, checks your connections and asks for anything it needs before it creates your workflow.
Choose what starts it
The template starts when a signed contract is sent to the workflow. Your developer connects your e-signature system to it. To start from your CRM instead, ask chat to use the HubSpot Deal: Property Change trigger on the deal stage, and to continue only when the stage is closed won.
Add your approval limit
Ask chat to add a Condition step after the terms are read, for example "amount over $10,000". On the yes path, add an Approval step with your controller as approver. See Add an approval step.
Invoice from QuickBooks instead, if you need to
The invoice steps use Stripe. If you bill from QuickBooks, ask chat to replace them with QuickBooks steps that create the invoice and send it.
Deploy, then test
Use a sample contract and test customer. Select Deploy, then Run with the sample contract. Check the amount, currency and due date on the resulting invoice. See Deploy, test and change a workflow.
Run works only when the workflow is Active. Deploying also switches on its trigger; choose a safe schedule or test source before deploying. Runs make real changes in connected systems.
What you review
- Approvals: large invoices wait under Approvals until the approver decides. The approver can also get the request by Slack or email.
- Each run: under Runs, each run shows the terms the AI Agent step read and the invoice that was created. Check the extracted amount against the contract on the first few runs.
- Who did what: the Audit trail tab under Runs records approvals and changes across your company. See Export the audit trail.
Adapt it
- Leave invoices in draft: remove the send step so billing sends each invoice after a final look.
- Two approval levels: add a second Condition and Approval for amounts above a higher limit, such as a director's.
- Tell the team: add a Slack or email step at the end that posts the invoice number to your billing channel. See Send an email or Slack message.
Finance playbooks
Browse step-by-step playbooks for common finance jobs, grouped by area: receivables, payables, billing, month-end close and revenue.
Send a contract when a deal closes
Build a workflow that creates a contract from your PandaDoc template and sends it for signature when a HubSpot deal reaches the stage you choose.
Loopfour