Automatically generate Workify invoices the moment a HubSpot deal moves to Closed Won. No manual data entry, no missed invoices.
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.
Settings → API Keys)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_.
Before building the automation, decide which HubSpot deal properties map to invoice fields:
| HubSpot Property | Workify Field |
|---|---|
| Deal name | Invoice notes / reference |
| Deal amount | Line item unit_price |
| Associated contact email | Used to look up Workify client |
| Close date | Invoice issue_date |
| Close date + 30 days | Invoice due_date |
If you use custom HubSpot deal properties (e.g. "Service description"), you can map those to invoice line item descriptions.
dealstage propertydealstage equals your "Closed Won" stage IDAdd an HTTP module:
https://getworkify.app/api/v1/clients?email={{associated_contact_email}}Authorization: Bearer wfy_your_keyIf no client is found, add a Router to either create one first (POST /api/v1/clients) or stop the scenario with a notification.
Add a second HTTP module:
https://getworkify.app/api/v1/invoices{
"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')}}"
}
If you have HubSpot Operations Hub, you can call the Workify API directly from a HubSpot Workflow:
POSThttps://getworkify.app/api/v1/invoicesAuthorization: Bearer wfy_your_keyHubSpot's webhook action supports property tokens ({{deal.dealname}}) directly in the JSON body.
Move a test deal to Closed Won in HubSpot and confirm:
For teams who create contacts in HubSpot first, add a parallel workflow:
POST /api/v1/clients with the contact's name, email, and companyThis ensures every new HubSpot contact automatically exists as a client in Workify, so invoice creation never stalls on a missing client.
Get your Workify API key and start building in minutes. Pro plan includes full API and webhook access.