Setup Guide
1
Create a private app
In HubSpot, create a private app with contacts scope to get your access token.
2
Set up enrichment workflow
Use HubSpot workflows to trigger Factr enrichment on new contact creation.
3
Map to custom properties
Create custom contact properties to store enriched facts.
4
Surface in sales tools
Add custom properties to your HubSpot Sales views and templates.
Code Example
JavaScript / Node.js
// HubSpot contact enrichment
const hubspot = require('@hubspot/api-client');
const client = new hubspot.Client({ accessToken: process.env.HUBSPOT_TOKEN });
async function enrichHubSpotContact(email) {
// Get contact by email
const contact = await client.crm.contacts.basicApi.getByEmail(email);
// Enrich with Factr
const factrRes = await fetch('https://factr.polsia.app/api/enrich', {
method: 'POST',
body: JSON.stringify({ email, apiKey: process.env.FACTR_API_KEY })
});
const { fact } = await factrRes.json();
// Update contact
await client.crm.contacts.basicApi.update(contact.id, {
properties: { enriched_fact: fact }
});
}
Key Benefits
- Sales-ready insights in HubSpot
- Automatic enrichment on contact creation
- Improve deal velocity with personalization
- Build smarter workflows with enriched data