Hello everyone,
I’m looking to develop a script in Python or Node.js for HubSpot’s custom code module, and I could use your help. Here’s the context of my need:
Context: I’m working on a workflow in HubSpot, and I need an automatic verification to avoid duplicates in our company records. Here’s how my workflow is currently configured:
Workflow entry conditions:
- The “Episto Tier” property is unknown.
- The company record status is “Lead.”
- The company record is not marked as “Deal open, Outbound Ongoing, Not Sales Ready - Budget, Marketing Qualified Lead, Not Sales Ready - Competition, Not Sales Ready - Timing issue, Sales Qualified Lead, Do not contact, Not Sales Ready - Episto, Nurturing, Client, Meeting booked or Not interested.”
Objective of the custom code module:
Once the company enters the workflow, I want to use a custom code module to check if the company name already exists among the existing company records in HubSpot.
- If the company name already exists, it should create a task for the record’s creator to notify them of a potential duplicate.
- If the company name does not exist, a task is assigned to a specific person to request them to assign the “Episto Tier.”
I’m currently stuck on the branch part. My script in Python return it correctly with Yes or No but the branch don’t see it, it didn’t catch it.
If anyone has worked on this kind of problem before or has code examples or best practices to share, it would be incredibly helpful!
Thanks in advance for your help ![]()