Using HubSpot deals data in automation

Updated: 2026-07-15Reading time: 5 min

Pull deal stage, amount, and associated contact data into Cotonity workflows to power personalized sales follow-up and event invitations.

Fetching deal records in a workflow

Use the HubSpot: Get Deal action to retrieve a deal record by its ID. If your trigger provides a contact ID rather than a deal ID, use HubSpot: Get Associated Deals first to retrieve the list of deals linked to that contact, then iterate or pick the most recently modified one. The fetched deal object includes all standard properties — Deal Name, Amount, Close Date, Deal Stage, Pipeline — as well as any custom properties your team has configured. These values are stored as workflow variables for the duration of the run.

Branching on deal stage

A common pattern is to personalize the agent's response or next action based on the deal stage. Add a Condition block after the fetch step and evaluate {{deal.dealstage}} against your pipeline stages. For example, send a proposal follow-up sequence if the stage is Decision Maker Bought In, or trigger an onboarding kick-off workflow if the stage moves to Closed Won. Stage IDs in HubSpot are internal keys (e.g., appointmentscheduled), not the display labels — use the HubSpot pipeline settings page to find the correct internal IDs.

Updating deal stage from agent actions

When an agent completes a qualification call or an attendee confirms event registration, you can automatically advance the associated deal to the next stage using the HubSpot: Update Deal action. Supply the deal ID (from the earlier fetch step), the target stage ID, and any supporting properties such as the close date or amount. Cotonity logs the stage change as a HubSpot timeline event, ensuring the entire history is visible to your sales reps without them needing to check the Cotonity dashboard.

Calculating deal-based personalization

Cotonity's expression engine allows arithmetic and date operations on deal properties. You can calculate the number of days until the Close Date, compute a discount percentage based on Amount, or concatenate the Deal Name and owner's first name into a personalized email subject line. These computed values are fully accessible in any downstream action — emails, chat messages, task descriptions, or external API calls — making it easy to build highly contextual sales automations driven by live CRM data.