Connectors
Three connectors ship in @sammati/connector-runtime. More connectors are added on request.
The runtime is a webhook sidecar. Point a Sammati webhook endpoint at it. It verifies x-sammati-signature with the same signing secret as that endpoint, then runs the enabled connectors. It does not replace the customer webhook you already use; you can subscribe this URL as an additional endpoint.
Run
# Use the example config from the @sammati/connector-runtime package
cp connectors.config.example.json connectors.config.json
# edit webhookSecret, set enabled flags and URLs, export tokens
export CONNECTORS_CONFIG="$PWD/connectors.config.json"
export HUBSPOT_ACCESS_TOKEN= # only if hubspot is enabled
export SLACK_WEBHOOK_URL= # only if slack webhookUrl is not in the file
npx @sammati/connector-runtime
Default listen address: http://127.0.0.1:8787. Inbound path: POST /webhooks/sammati. Health: GET /health.
Register that URL in the portal (Webhooks) and subscribe to the events you care about. On the test ledger, consent writes do not fan out; use Send Test Event, or use a live key when you want consent.granted / consent.withdrawn from real writes.
The three connectors
| id | Behavior |
|---|---|
http-webhook | POSTs the Sammati event JSON to targetUrl. If hmacSecret is set, adds x-connector-signature (t=<unix>,v1=<hex> over the raw body). |
hubspot | On consent.granted or consent.withdrawn (and consent.recorded when data.action is GRANT or REVOKE), sets a contact property via the HubSpot CRM API. Token: HUBSPOT_ACCESS_TOKEN or accessToken in the config file. Contact id comes from data.hubspot_contact_id, then email search, then external_user_id search, then fallbackContactId. Live Sammati consent payloads include purpose and status, not email — set fallbackContactId or enrich the payload before you expect a CRM update. |
slack | POSTs a text message to a Slack incoming webhook on consent.withdrawn. URL: SLACK_WEBHOOK_URL or webhookUrl in the file. |
In the Company Portal, open Developer → Connectors for the same three connectors and a downloadable config file. The portal does not store connector secrets.