Create a CompanyCam jobsite when a HubSpot deal closes

By General Input

The moment a deal is marked Closed Won, we set up the matching jobsite in CompanyCam, label it by job type, and link it back on the HubSpot deal.

Integrations

  • CompanyCam
  • HubSpot
  • Slack

Type

Agentic Task

Categories

  • Sales
  • Operations

When a deal is marked Closed Won in HubSpot, I want a matching jobsite project created in CompanyCam automatically, so the crew never has to set one up by hand and job photos never land in the wrong place. Trigger this from a HubSpot webhook that fires when a deal's stage changes, and only continue when the new stage is Closed Won. Ignore every other property change.

Start by calling Get Deal with the deal ID from the webhook payload, requesting the deal properties along with its associated contacts. Then call Get Contact for the associated homeowner. Between the two records, collect the customer name, the full street address, and the job type, for example Roofing, Siding, or Insurance Claim. If the deal carries its own address or job type properties, prefer those over what is on the contact.

Before creating anything, call List Projects in CompanyCam and check whether a project for that address already exists. Match addresses loosely rather than exactly, because CRM addresses are messy: treat "123 Main St" and "123 Main Street Unit B" as the same jobsite, and ignore differences in casing, punctuation, and abbreviations like St and Street, Ave and Avenue, or Rd and Road. If you find a convincing match, do not create a second project. Reuse the existing one for the remaining steps and mention in the Slack message that the jobsite already existed.

If nothing matches, call Create Project. Name the project with the customer name and street address. Create Project expects a structured address, so split the HubSpot address into separate street, city, state, and postal code fields rather than passing one combined string. If the city, state, or postal code is missing in HubSpot, fill in what you have and still create the project rather than failing outright.

Then call Add Labels to Project to tag the project based on the job type on the deal, using labels such as Roofing, Siding, or Insurance Claim, so the project lands in the right filter for the field crew. If the job type does not map cleanly onto one of those labels, pick the closest match and call out the ambiguity in the Slack message. If there is no job type at all, skip labeling rather than guessing.

Write the new CompanyCam project link back onto the HubSpot deal with Update Deal, storing it in the deal property the team uses for the jobsite link. Then call Create Note, associated with that deal, recording that the jobsite was created along with the project name, address, any labels applied, and the link, so the sales rep can jump straight from the CRM record to the jobsite photos.

Finish by sending a Slack message to the operations channel with the customer name, street address, job type, labels applied, and the project link, so whoever handles scheduling knows the site is ready to document. Keep it to a few lines and put the link on its own line so it is easy to tap from a phone in the field.

One guardrail: if the deal has no usable street address, do not create a project at all. Post a Slack message naming the deal, with a link to it, so someone can fix the record, then stop. Never create a jobsite that would later have to be merged or deleted.

Related prompts

Explore more prompts
Call overdue Xero customers with an AI collections agentWin back LiveChat visitors whose chats went unansweredTurn Mailjet email clicks into ranked HubSpot follow-upsiMessage campaign console with pre-flight checks and delivery boardChat quality review board for LiveChat support leadsA searchable RFP answer library your bid team drafts fromSee which target accounts just started advertising on LinkedInAccount health board that puts product usage next to your CRMLook up a customer's full chat history mid conversationLusha prospecting workbench with credit-safe reveals