All guides
Workify
HubSpot
CRMintermediate

Connect HubSpot to Workify: Auto-Create Invoices When Deals Close

Automatically generate Workify invoices the moment a HubSpot deal moves to Closed Won. No manual data entry, no missed invoices.

What You'll Build

A workflow that fires the moment a HubSpot deal reaches Closed Won and automatically creates a matching invoice in Workify — populated with the deal name, value, and contact details. The invoice lands in Workify as a draft, ready for you to review and send.

What You'll Need

  • A Workify Pro account with an API key (Settings → API Keys)
  • A HubSpot account (free CRM tier works; workflows require Marketing Hub Starter or above)
  • A Make or Zapier account as the middleware layer (HubSpot webhooks can call URLs directly, but Make/Zapier handle the data transformation more cleanly)

Step 1: Get Your Workify API Key

Go to Settings → API Keys in Workify, create a key named "HubSpot", and grant it invoices:write and clients:read scopes. Copy the key — it starts with wfy_.

Step 2: Map Your HubSpot Deal Fields

Before building the automation, decide which HubSpot deal properties map to invoice fields:

HubSpot PropertyWorkify Field
Deal nameInvoice notes / reference
Deal amountLine item unit_price
Associated contact emailUsed to look up Workify client
Close dateInvoice issue_date
Close date + 30 daysInvoice due_date

If you use custom HubSpot deal properties (e.g. "Service description"), you can map those to invoice line item descriptions.

Create a HubSpot Webhook in Make

  1. In Make, create a new scenario with HubSpot → Watch Deal Property History as the trigger
  2. Connect your HubSpot account and configure it to watch the dealstage property
  3. Add a Filter (the wrench icon) after the trigger: only continue when dealstage equals your "Closed Won" stage ID

Look Up the Workify Client

Add an HTTP module:

  • GET https://getworkify.app/api/v1/clients?email={{associated_contact_email}}
  • Header: Authorization: Bearer wfy_your_key

If no client is found, add a Router to either create one first (POST /api/v1/clients) or stop the scenario with a notification.

Create the Invoice

Add a second HTTP module:

  • POST https://getworkify.app/api/v1/invoices
  • Body:
{
  "org_id": "your-org-id",
  "client_id": "{{client_lookup.data[0].id}}",
  "currency": "USD",
  "notes": "{{deal.dealname}}",
  "line_items": [
    {
      "description": "{{deal.dealname}}",
      "quantity": 1,
      "unit_price": {{deal.amount}}
    }
  ],
  "due_date": "{{formatDate(addDays(deal.closedate; 30); 'YYYY-MM-DD')}}"
}

Option B: Via HubSpot Workflows + Webhooks

If you have HubSpot Operations Hub, you can call the Workify API directly from a HubSpot Workflow:

  1. Go to Automations → Workflows → Create a deal-based workflow
  2. Set the trigger: Deal stage is Closed Won
  3. Add a Send a webhook action:
    • Method: POST
    • URL: https://getworkify.app/api/v1/invoices
    • Authentication: custom header Authorization: Bearer wfy_your_key
    • Request body: map HubSpot deal tokens to the JSON payload

HubSpot's webhook action supports property tokens ({{deal.dealname}}) directly in the JSON body.

Step 3: Test the Flow

Move a test deal to Closed Won in HubSpot and confirm:

  • The scenario/workflow fires
  • A draft invoice appears in Workify with the correct client, amount, and due date
  • The line item description matches the deal name

Keeping Clients in Sync

For teams who create contacts in HubSpot first, add a parallel workflow:

  • Trigger: Contact is created
  • Action: POST /api/v1/clients with the contact's name, email, and company

This ensures every new HubSpot contact automatically exists as a client in Workify, so invoice creation never stalls on a missing client.

Tips

  • Add a HubSpot deal property "Workify Invoice ID" and write back the returned invoice ID — creates a two-way link between your CRM and billing tool
  • Use HubSpot's Delay action to give account managers 30 minutes to review before the invoice fires
  • Set up a Slack notification (see our Slack guide) so your team knows when an invoice has been auto-created

Ready to automate your invoicing?

Get your Workify API key and start building in minutes. Pro plan includes full API and webhook access.