campaignstack_sync_lead_to_hubspot
Sync a single lead into the workspace's connected HubSpot portal (same behavior as the integration:crm_sync workflow node). Upserts the contact by email (idempotent), optionally associates the lead's company (when a real domain resolves), and optionally logs an outreach note on the contact's timeline. lifecycleStage is NEVER sent unless explicitly provided (downgrade risk on existing CRM contacts). Leads without an email cannot be synced (errorCode no_email). Requires a connected HubSpot integration — use campaignstack_connect_hubspot first. On success returns the HubSpot contactId (plus companyId/noteId when those steps ran) and a degraded[] list for steps that fell back gracefully (e.g. company_upsert, source_property, note). This path is in beta: it is unit-tested but not yet confirmed inside a real portal's UI, so tell the user to spot-check the first synced contact in HubSpot.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | Optional outreach note to log on the contact's HubSpot timeline | |
| leadId | Yes | ||
| leadSource | No | Lead source table (defaults to trying global, then private) | |
| syncCompany | No | Associate the lead's company when a real domain resolves (default true) | |
| workspaceId | No | Workspace ID (defaults to the bound workspace) | |
| lifecycleStage | No | HubSpot lifecyclestage to set (e.g. 'lead'). NEVER sent unless provided — sending it can downgrade an existing customer contact |