I have a workflow that creates a HubSpot company using the HubSpot Create/Update Company block. The company creation part works fine. After creating the company I have a JSON array of contacts that are associated with the company. I call a sub-workflow for each of those contacts. The sub-workflow calls the HubSpot Create/Update Contact block for each contact in the JSON array.
The intention is to add a HubSpot contact for each one and use the same domain that was used for creating the company, to go ahead and associate the new contact with the existing company. I am passing in the same domain variable to the sub-workflow that was used to create the company. The contacts are created but the HubSpot Create/Update Contact block is not finding the company by domain. Because of this it is re-creating the company for each contact that gets added resulting in duplicate companies in HubSpot.
I assume the HubSpot Create/Update Contact block is using the HubSpot API under the hood, and there is a known issue with obtaining company by domain via the API: Solved: HubSpot Community - Retrieve company by domain - HubSpot Community .
I’ll include screenshots below showing MindStudio debug output where the HubSpot company is being created with a specific domain, and then in the sub-workflow where the Create/Update Contact block is failing to find the Company via the same domain.
HubSpot company successfully being created (the Received company ID comes back)
HubSpot contact being created but failing to find associated company with same domain

