Urgent.News

What's breaking now, across hundreds of outlets.

Tech

A HubSpot migration in n8n you can stop and resume without duplicates

This article was drafted with AI help and reviewed by the author. A migration that runs for six hours will be interrupted at some point. A deploy restarts n8n. The daily API limit runs out. A batch fails on one bad row at 2 AM. The question is what happens when you press run again. If the answer is "it starts from the top and creates everything twice", the migration isn't safe to stop. And a…

This HubSpot migration workflow for n8n allows you to stop and resume the process without creating duplicates. It ensures that the migration can be paused at any point, and when resumed, it will update existing records instead of adding new ones. The workflow achieves this through three key concepts: upserts, a checkpoint table, and associations.

First, every write operation is an upsert (update or insert) operation, using a unique legacy ID as the unique key. This means that if a record with the same unique ID already exists in HubSpot, the workflow will update it instead of creating a duplicate. The legacy ID is unique for each object type (companies, contacts, or deals).

Second, the workflow uses a Postgres table as a checkpoint to keep track of the progress. This table has columns for the object type, legacy ID, HubSpot properties, status, and other metadata. The status column indicates the current state of each source record, such as pending, in-flight, done, or failed. The checkpoint table allows you to monitor the progress of the migration without opening the n8n execution log.

Third, the workflow handles associations between records, such as connections between companies and contacts, or contacts and deals. These associations are established in a second pass, after both sides of the link have been assigned HubSpot IDs.

The workflow consists of a loop that can be started manually. It begins with a settings step that selects the object type to process (companies, contacts, or deals). Next, a Postgres step returns any stuck in-flight rows and marks them as pending. Then, a second Postgres step claims the next batch of records. If there are no more rows to process, the workflow stops.

The batch upsert request is shaped by a Code node, which sends the batch to HubSpot via an HTTP Request node. A second Code node then processes the response, determining the appropriate action for each row based on HubSpot's response. This information is written back to the checkpoint table.

The workflow continues by checking the status of each row in the checkpoint table. If the row is in-flight, it waits for the result and updates the status accordingly. If the status is done, the HubSpot ID is filled, and the association pass is triggered. If the status is failed, the row is marked for retry or retried individually. The workflow repeats this process for each object type, in the order of companies, contacts, and deals.

Rewritten by urgent.news; may contain errors — check the original.

Source: dev.to

Read the original at dev.to →

Report a problem with this story

More in Tech

What Is Schema Markup? The Types a SaaS Site Needs in 2026

Originally published on pzhydkykh.com . Schema markup is the block of code that tells search engines what a page is: a company, a product, an article. In 2026 the advice around schema changed.

  • Schema markup is structured data in schema.org vocabulary, using JSON-LD format for Google.
  • FAQ rich results were discontinued on May 7, 2026, shifting focus to other schema types.

University-Industry Partnerships in Mexico: Campus Activations

Originally published at mobil3.xyz . TL;DR: What we learned running 12+ university activations with 15+ universities: who to write to, how an activation is built and what to report afterwards.

  • Campus liaison office initiates university-industry partnerships in Mexico.
  • Liaison office connects companies with students through concise emails.
  • Successful activations include workshops, teams, mentorship, and follow-up reports.

Postiz Self Host Bluesky Python Client

This week's news about supply chain vulnerabilities in Microsoft's Agent Framework has sparked renewed interest in secure, self-hosted alternatives for critical infrastructure.

More from Wednesday 25 November →