🧲 CRM · All integrations

Address validation in HubSpot workflows

Cleanse contact and company addresses automatically at creation — with a Custom Code action in a HubSpot workflow.

HubSpot's Operations Hub runs Node.js directly in workflows. One fetch() against /datavask/adresser, and every new contact gets a validated address plus an A/B/C category as a property.

How to set it up

  1. Get an API key
    Free account on the dashboard → copy dawa_live_….
  2. Create a workflow
    Trigger: contact created or address property changed.
  3. Add a Custom Code action
    Store the key as a secret (DANADRESSE_KEY) and paste the fetch code.
  4. Save the result as properties
    Output: cleansed address, postcode, city and category — use category C to flag addresses needing manual follow-up.
# Custom Code action in a workflow
// HubSpot workflow → Custom code (Node.js 18)
const res = await fetch(
  'https://api.danadresse.dk/datavask/adresser?betegnelse=' +
  encodeURIComponent(event.inputFields.address),
  { headers: { 'X-Api-Key': process.env.DANADRESSE_KEY } });
const vasket = await res.json();
// vasket.kategori: 'A' | 'B' | 'C' + den korrekte adresse

Good to know

No Operations Hub?

Use a form embed with our JS widget so the address is valid at input time.

Segmentation

The A/B/C category as a property makes it easy to build lists of doubtful addresses.

Enrichment

Also call /adgangsadresser for municipality and parish — useful for territories and route planning.

A HubSpot App Marketplace app is on the roadmap — write to partners@lynbro.dk for early access.

Ready to try it with HubSpot?

Free Hobby key, no credit card — the API answers in under 100 ms.

Get an API key →

API docs · Code examples · JS widget