Hello HubSpot Community,
We are currently setting up an automated workflow inside HubSpot Operations Hub for a UK fleet management client. The goal is to automatically enrich Deal and Contact records with live vehicle data from our API endpoint (regchecker. co. uk) whenever a deal stage changes.
Integration Architecture:
-
Data Source: (regchecker.co.uk)
-
Workflow Mechanism: Operations Hub Custom Code Action (Node.js) triggering a
GETrequest to fetch vehicle MOT status and tax expiration dates (?vrn=...). -
Target Destination: Custom Deal Properties in HubSpot CRM.
Issue / Technical Query:
-
JSON Payload Mapping Error: When the node-fetch request executes inside the HubSpot Custom Code block, nested JSON arrays (specifically MOT advisory history logs from regchecker.co.uk) cause an asynchronous timeout before the
exports.maincallback resolves. -
API Rate Limit Handling: What is the best pattern to handle HTTP 429 retry headers within HubSpot’s 20-second execution window for Custom Code Actions?
Troubleshooting Steps Taken:
-
Verified that raw endpoint responses return valid JSON (HTTP 200) within 350ms in Postman.
-
Sanitized special characters and spaces from registration plate input fields.
-
Wrapped the async request inside a standard
try/catchblock within the HubSpot code editor.
Has anyone experienced execution timeout issues when parsing multi-nested JSON arrays inside Operations Hub Custom Code actions? Any advice on optimizing callback promises would be greatly appreciated!
Thanks in advance!