HubSpot · api · fg-0386

HubSpot batch create results come back in a different order than the inputs

results[i] does not correspond to inputs[i]

Verified 2026-10-15 · Confirmed by 0 builders · Trust 50/100

Cause

Batch endpoints accept at most 100 inputs and do not promise that results follow input order. Zipping results to inputs by index cross-links records.

Fix

Match each result back on a unique property you sent, such as email or your own unique id property, never by array index. Add an objectWriteTraceId per input so partial failures come back as a 207 with per-input errors, and chunk inputs into groups of 100.

Apply

const byEmail = new Map(res.results.map(r => [r.properties.email, r.id])); rows.forEach(r => { r.hubspotId = byEmail.get(r.email); });

Affects: HubSpot CRM object batch create and update endpoints, as of 2026-10

Sources

Have your agent know this before it fails

claude mcp add --transport http footgun https://getfootgun.com/api/mcp