A real project posted on ProfoundlyReal brief, anonymized

How Can Custom Coded Workflow Actions Handle Duplicate Deal Project IDs in HubSpot?

Duplicate Project IDs Were Leaving Stale Deals Open in the Pipeline.

IndustryProfessional services and consulting
Company size11 to 50 people
RegionUS Midwest
TimelineA few days

The Situation

A HubSpot partner agency in the US Midwest was supporting a client that tracks bids in a dedicated deal pipeline, where several deals can relate to the same project. When a new deal arrived with a project ID that already existed, the pipeline filled with duplicates and superseded deals stayed open. The agency wanted two custom coded workflow actions built quickly in the client's account, and asked to watch the build so its own team could learn the technique.

What They Asked For

1A coded action that detects a matching project ID on another deal and appends an incrementing suffix such as .1 or .2
2A second coded action that closes superseded deals with the same base project ID as lost, with a set loss reason
3Exclusion of deals already in won or lost stages
4A screen-share of the build so the agency could learn from it
5A fast turnaround

How Pros Approached It

1Treated both actions as lookups: call HubSpot's CRM search API for deals with the same project ID, then act on what comes back
2For the first action, count existing matches and write the next suffix back to the enrolled deal's property
3For the second, search the same pipeline for open deals sharing the base ID and move them to the lost stage with the agreed reason
4Suggested a short call first to confirm the exact rules, such as which stages count as closed, before writing code

The Kind of Pro Who Fits

Profoundly Certified

A HubSpot developer comfortable writing custom coded workflow actions against the CRM search API.

Work Involved

Custom coded workflow actionsWorkflow automation

Common Questions

Can HubSpot workflows find other deals with the same property value?

Not with standard actions alone. A custom coded action can call the CRM search API to find deals with a matching value and then update the enrolled deal or the matches.

Which HubSpot subscription do custom coded workflow actions need?

Custom coded actions need a Professional or Enterprise tier of the hub that includes them (formerly Operations Hub, now Data Hub). Check your portal's subscription before scoping the work.

Is a small coded workflow fix a big project?

No. Two focused actions like these were scoped as a small fixed piece of work, and a screen-share during the build is a cheap way for an agency team to learn the pattern.

Have a project
like this?
Book a Free Call