Skip to main content

Enrich HubSpot companies with Polish CEIDG data using NIP identifiers

Workflow preview

Workflow preview
100%
Enrich HubSpot companies with Polish CEIDG data using NIP identifiers preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

This workflow automatically enriches HubSpot company records with official data from the Polish CEIDG (Central Register and Information on Economic Activity) database when a NIP (Polish Tax ID) is ...

Best for

  • Lead Generation automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.if, n8n-nodes-base.hubspottrigger, n8n-nodes-base.hubspot, n8n-nodes-base.httprequest, n8n-nodes-base.code, n8n-nodes-base.stickynote

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Karol Otręba.

Original n8n.io source

1.1 Workflow description

Title
Enrich HubSpot companies with Polish CEIDG data using NIP identifiers
Workflow name
Enrich HubSpot companies with Polish CEIDG data using NIP identifiers

This workflow automatically enriches HubSpot company records with official data from the Polish CEIDG (Central Register and Information on Economic Activity) database when a NIP (Polish Tax ID) is added or updated.

Who's it for

Polish sales teams, marketing agencies, and CRM administrators who work with Polish companies in HubSpot and want to save time on manual data entry while ensuring data accuracy.

How it works

  1. Trigger: Monitors HubSpot for changes to the "NIP" property on company records
  2. Validation: Checks if the NIP field is not empty
  3. API Query: Fetches official company data from the Polish CEIDG database using the provided NIP
  4. Data Check: Verifies if company data was successfully retrieved
  5. Transform: Maps CEIDG data to HubSpot company properties
  6. Update: Enriches the HubSpot company record with:
    • Company name
    • Full address (street, city, postal code, state)
    • Phone number
    • Website URL
    • NIP and REGON numbers
    • Business start date
  7. Error Handling: If NIP is invalid or no data found, adds a note to the company record

Requirements

  • HubSpot account with:
    • Custom property "nip" created for companies
    • Custom property "ceidg_notes" created for companies (optional, for storing API notes)
    • App token or developer API credentials
  • CEIDG API Token (free registration at https://dane.biznes.gov.pl/)
  • n8n instance (self-hosted or cloud)

How to set up

  1. Create HubSpot custom properties:

    • Go to HubSpot Settings > Properties > Company Properties
    • Create a "nip" property (single-line text)
    • Create a "ceidg_notes" property (multi-line text) for storing API responses
  2. Get CEIDG API Token:

    • Register at https://dane.biznes.gov.pl/
    • Navigate to API section and generate your token
    • Add token to n8n credentials (HTTP Bearer Auth)
  3. Configure HubSpot credentials:

    • Add your HubSpot App Token in n8n credentials
    • Or use HubSpot Developer API credentials
  4. Activate the workflow:

    • Import this workflow to your n8n instance
    • Configure the credentials in all HubSpot and HTTP nodes
    • Activate the workflow
  5. Test:

    • Add or update a NIP value in any HubSpot company record
    • Check if the company data gets automatically populated

How to customize

  • Add more fields: Modify the "Transform data for HubSpot" Code node to map additional CEIDG fields
  • Change trigger property: Update the HubSpot Trigger to monitor a different property name
  • Notification: Add an email or Slack notification node after successful updates
  • Batch processing: Add a schedule trigger to process multiple companies at once
  • Data validation: Add nodes to validate NIP format before making the API call
  • Logging: Add a Google Sheets or database node to log all enrichment activities

Notes

  • CEIDG database contains data for sole proprietorships registered in Poland
  • For limited liability companies (sp. z o.o.) and other entities, you'll need to use KRS (National Court Register) API instead
  • The workflow processes one company at a time as they are updated
  • API rate limits apply based on your CEIDG API plan

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Check if NIP exists

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2

Block 2 - When NIP property changes

Type / Role
n8n-nodes-base.hubspotTrigger - hubspotTrigger
Config choices
Version 1

Block 3 - Update company in HubSpot

Type / Role
n8n-nodes-base.hubspot - hubspot
Config choices
Version 2.2

Block 4 - Fetch company data from CEIDG

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 5 - Transform data for HubSpot

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 6 - Mark error in HubSpot

Type / Role
n8n-nodes-base.hubspot - hubspot
Config choices
Version 2.2

Block 7 - Check if data retrieved

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 8 - Workflow Description

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 9 - Step 1: HubSpot Trigger

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 10 - Step 2: Validate Input

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 11 - Step 3: Fetch Data

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 12 - Step 4: Verify Response

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 13 - Step 5: Map Fields

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 14 - Step 6: Update Success

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 15 - Error Handling

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Enrich HubSpot companies with Polish CEIDG data using NIP identifiers
Complexity advanced
Nodes 15
Categories Lead Generation
Author Karol Otręba
Published 24 Oct 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/10125/10125.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Enrich HubSpot companies with Polish CEIDG data using NIP identifiers do?

This workflow automatically enriches HubSpot company records with official data from the Polish CEIDG (Central Register and Information on Economic Activity) database when a NIP (Polish Tax ID) is ...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Lead Generation use case.