🔓 Unlock all 10,000+ workflows & prompts free Join Newsletter →
✅ Full access unlocked — explore all 10,000 AI workflow and prompt templates Browse Templates →
Home n8n Workflow
January 22, 2026

HubSpot + CEIDG: company records fill themselves

Lisa Granqvist Partner Workflow Automation Expert

Someone adds a NIP to a HubSpot company record, and suddenly you’re playing detective. Copying addresses from public registers, hunting for websites, fixing weird formatting. It’s slow, and it’s how bad data sneaks into your CRM.

CRM admins usually get blamed when records are messy, but sales ops and agency teams feel it every day too. This HubSpot CEIDG automation fills company fields from official CEIDG data so you stop retyping the basics and second-guessing what’s correct.

Below you’ll see what the workflow does, what you’ll need, and how to get predictable, cleaner company records when a NIP changes.

How This Automation Works

The full n8n workflow, from trigger to final output:

n8n Workflow Template: HubSpot + CEIDG: company records fill themselves

The Problem: HubSpot company data goes stale (or wrong)

HubSpot is only as useful as the data inside it. But company records are often built in a rush: someone pastes a NIP, leaves the name as “New Company,” and moves on. Later, your team needs an invoice address, a website, or a phone number, so they Google it, copy whatever looks right, and hope it matches official data. That creates duplicates (“ABC Jan Kowalski” vs. “ABC Kowalski”), broken segmentation, and reporting you can’t trust. Honestly, it also creates friction between teams because nobody wants to own cleanup.

It adds up fast. Here’s where it breaks down in real life:

  • People retype the same fields repeatedly, and every manual entry is a chance to introduce a typo.
  • A wrong postal code or street format can derail invoicing and create awkward “please confirm your address” emails.
  • Sales sequences and territory rules misfire when city, region, or website fields are inconsistent.
  • When you finally try to clean the CRM, you discover you don’t know which record reflects official registry data.

The Solution: NIP-triggered CEIDG enrichment inside HubSpot

This workflow watches HubSpot company records for changes to your “nip” property. The moment a NIP is added or updated, it checks that the field is not empty and then calls the official Polish CEIDG database via an HTTP request using your CEIDG API token. If CEIDG returns a valid match, the workflow maps the official fields into your HubSpot company properties and updates the record automatically. If CEIDG does not return data (invalid NIP, not found, or a temporary response issue), the workflow flags the record and writes a note back to HubSpot so the team knows what happened. No guessing. No silent failures.

The workflow starts in HubSpot when a NIP changes. CEIDG is queried and the response is validated. Then the data is transformed into the exact property structure HubSpot expects, and the company record is updated (or tagged with an error note).

What You Get: Automation vs. Results

Example: What This Looks Like

Say your team creates 20 new HubSpot company records a week for Polish sole proprietors. Manually, collecting name, full address, website, phone, and REGON is usually about 10 minutes per record, so you’re spending about 3 hours weekly just on enrichment. With this workflow, a rep pastes the NIP (maybe 30 seconds), and the rest is automated after the CEIDG lookup. Even if you budget a minute to sanity-check the result, you still get a few hours back every week, and the CRM stays consistent.

What You’ll Need

  • n8n instance (try n8n Cloud free)
  • Self-hosting option if you prefer (Hostinger works well)
  • HubSpot to trigger and update company properties.
  • CEIDG API for official Polish business registry data.
  • CEIDG API token (get it from dane.biznes.gov.pl in the API section).

Skill level: Beginner. You’ll connect credentials, create HubSpot properties, and map a few fields.

Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).

How It Works

A HubSpot company NIP changes. The workflow listens for updates to your “nip” property, so the automation only runs when it matters.

The NIP is checked before anything else happens. If the field is empty, the workflow stops and writes a note to the record so you can fix the input instead of wondering why enrichment didn’t run.

CEIDG is queried and the response is verified. n8n calls CEIDG with your API token, then confirms the response includes actual company data before moving forward.

HubSpot fields are filled automatically (or an error is flagged). A mapping step transforms CEIDG fields into your HubSpot properties, then the workflow updates the company record and logs issues to your notes property when something doesn’t match.

You can easily modify which HubSpot properties get updated and how strict the validation is based on your needs. See the full implementation guide below for customization options.

Step-by-Step Implementation Guide

Step 1: Configure the HubSpot Trigger

Set up the workflow to start when the NIP property changes in HubSpot companies.

  1. Add and configure NIP Property Change Trigger as the trigger node.
  2. Set Event to company.propertyChange and Property to nip.
  3. Credential Required: Connect your HubSpot credentials for NIP Property Change Trigger.

Step 2: Connect the CEIDG Data Source

Fetch company data from the CEIDG API using the NIP value from HubSpot.

  1. Open Retrieve CEIDG Company Data and set URL to =https://dane.biznes.gov.pl/api/ceidg/v3/firmy.
  2. Enable Send Query and add a query parameter nip with value {{ $json.propertyValue }}.
  3. Set Authentication to predefinedCredentialType and nodeCredentialType to httpBearerAuth.
  4. Credential Required: Connect your httpBearerAuth credentials for Retrieve CEIDG Company Data.

Step 3: Validate the NIP and Retrieved Data

Ensure the NIP exists before calling CEIDG and that the API returned a valid company record.

  1. In Validate NIP Presence, set the condition to check that value1 is not empty using {{ $json.propertyValue }}.
  2. Confirm that Validate NIP Presence routes the true path to Retrieve CEIDG Company Data and the false path to Flag HubSpot Record Error.
  3. In Confirm Data Retrieved, set the numeric condition to Left Value {{ $json.count }} gt 0.
  4. Ensure Confirm Data Retrieved routes true to Map Data for HubSpot and false to Flag HubSpot Record Error.

⚠️ Common Pitfall: If Confirm Data Retrieved always returns false, verify the CEIDG response includes count and that your API token has access.

Step 4: Set Up the Data Mapping Logic

Transform CEIDG data into the property structure needed by HubSpot.

  1. Open Map Data for HubSpot and paste the provided JavaScript into JavaScript Code exactly as shown in the workflow.
  2. Verify the script reads the HubSpot payload using $item(0).$node["NIP Property Change Trigger"].json to resolve companyId.
  3. Confirm the output JSON includes the properties object with mapped fields like name, address, and description.

Step 5: Configure HubSpot Updates

Update the HubSpot company record with the enriched data and handle failures.

  1. In Modify HubSpot Company, set Resource to company and Operation to update.
  2. Set Company ID to {{ $('Validate NIP Presence').item.json.companyId }}.
  3. Map the update fields using expressions, for example City {{ $json.properties.city }} and Postal Code {{ $json.properties.zip }}.
  4. In Custom Properties, set property to ceidg_notes and value to {{ $json.properties.description }}.
  5. Credential Required: Connect your HubSpot credentials for Modify HubSpot Company.
  6. In Flag HubSpot Record Error, set Company ID to {{ $('Validate NIP Presence').item.json.companyId }} and update ceidg_notes to =Invalid NIP / No data found in CEIDG database.
  7. Credential Required: Connect your HubSpot credentials for Flag HubSpot Record Error.

If you want to track failures separately, add a dedicated property in HubSpot and update it in Flag HubSpot Record Error.

Step 6: Test and Activate Your Workflow

Validate end-to-end behavior before enabling production execution.

  1. Click Execute Workflow and trigger a NIP property change on a test company in HubSpot.
  2. Confirm the execution path follows NIP Property Change TriggerValidate NIP PresenceRetrieve CEIDG Company DataConfirm Data RetrievedMap Data for HubSpotModify HubSpot Company.
  3. Verify successful updates in HubSpot (city, address, website, and ceidg_notes populated).
  4. Test a missing or invalid NIP to ensure Flag HubSpot Record Error is executed and ceidg_notes is updated.
  5. When satisfied, toggle the workflow to Active for production use.
🔒

Unlock Full Step-by-Step Guide

Get the complete implementation guide + downloadable template

Common Gotchas

  • HubSpot credentials can expire or need specific permissions. If things break, check your private app token access and the n8n HubSpot credential first.
  • If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
  • CEIDG API responses can change shape or return “not found” for entities that aren’t in CEIDG. Make sure your “ceidg_notes” property is visible so reps see why enrichment failed.

Frequently Asked Questions

How long does it take to set up this HubSpot CEIDG automation?

About 30 minutes if your HubSpot properties and CEIDG token are ready.

Do I need coding skills to automate HubSpot CEIDG enrichment?

No. You’ll connect accounts and paste your CEIDG API token into n8n. The only “technical” part is checking the field mapping matches your HubSpot properties.

Is n8n free to use for this HubSpot CEIDG automation workflow?

Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in CEIDG API costs (often free or low-cost, depending on your plan).

Where can I host n8n to run this automation?

Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.

Can I customize this HubSpot CEIDG automation workflow for extra HubSpot fields?

Yes, and it’s common. You’ll adjust the mapping in the “Map Data for HubSpot” code step so additional CEIDG fields populate your chosen HubSpot properties. Many teams also tweak the validation so only empty fields get filled, which avoids overwriting existing account-owner edits. You can also change which property triggers the run if your NIP field uses a different internal name.

Why is my HubSpot connection failing in this workflow?

Usually it’s an expired or incorrect HubSpot private app token in n8n. Check the HubSpot credential in n8n first, then confirm the token has permission to read company changes and update company properties. If it works for some records but not others, you may be hitting property-level issues (like a missing “nip” property) or the workflow is writing to a property that doesn’t exist in that HubSpot portal.

How many company records can this HubSpot CEIDG automation handle?

A lot, as long as your CEIDG API plan and n8n execution limits allow it.

Is this HubSpot CEIDG automation better than using Zapier or Make?

Often, yes, because this is more than a simple “lookup then update.” n8n makes it easy to add branching logic for validation, “found vs not found” handling, and field mapping without paying extra for multi-step paths. Self-hosting is also a big deal if you expect lots of company updates and don’t want per-task pricing. Zapier or Make can still work if you keep the logic minimal, but you’ll usually end up bolting on extra steps as soon as you want notes, stricter checks, or logging. Talk to an automation expert if you want help picking the simplest setup for your volume.

Once this is live, “add NIP” becomes the only manual step most teams need. The workflow keeps your HubSpot company records accurate so you can actually trust what you’re looking at.

Need Help Setting This Up?

Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.

Lisa Granqvist

Workflow Automation Expert

Expert in workflow automation and no-code tools.

×

Use template

Get instant access to this n8n workflow Json file

💬
Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Launch login modal Launch register modal