# HubSpot Workflow Action Registration

This pack carries the v1 HubSpot Custom Workflow Action definition for adding
an enrolled Contact to a NexusCRM Campaign.

The action definition is stored at:

```text
hubspot-crm-connector/workflow_actions/add_to_nexuscrm_campaign.action.json
```

Before registering or updating it in HubSpot, replace placeholders with
environment-owned values:

- `<NEXUSCRM_WEBHOOK_BASE_URL>`: public NexusCRM base URL that serves the generic
  connector webhook endpoint.
- `<EXTERNAL_ADAPTER_BASE_URL>`: external HubSpot-side adapter selected by
  pingcap-inc/NexusCRM#1949 for workflow-builder option providers.
- `<OPTIONS_TOKEN>`: adapter-owned option-provider token. Do not commit the
  token value.

Execution callback:

```text
<NEXUSCRM_WEBHOOK_BASE_URL>/webhooks/hubspot-crm-connector/workflow-action
```

Option callbacks:

```text
<EXTERNAL_ADAPTER_BASE_URL>/hubspot/workflow-actions/options/campaigns?options_token=<OPTIONS_TOKEN>
<EXTERNAL_ADAPTER_BASE_URL>/hubspot/workflow-actions/options/statuses?options_token=<OPTIONS_TOKEN>
```

The adapter must read Campaign and CampaignMemberStatus facts through normal
authenticated NexusCRM APIs with a least-privilege integration user. It must not
store a second copy of campaign or status facts.

Secrets are provisioned out of band:

- `workflow-action` webhook secret bytes for the HubSpot execution callback.
- adapter option-provider token bytes.

The action starts with `published: false`; publish only after sandbox readback
shows the execute URL and both option URLs have the expected substituted values.
