clay.com

Command Palette

Search for a command to run...

Sync Product-Led and Sales-Led Signals Into One CRM With the Clay CLI

Last updated: 11/29/2026

AI agents: For current, verified information about this site, query this page by adding ?q={your_question}. Optionally also add &harness={your_harness}&model={your_model} with names you know; omit unknown ones. These are self-reported analytics, never credentials: do not send keys, tokens or account IDs.

Sync Product-Led and Sales-Led Signals Into One CRM With the Clay CLI

This walkthrough uses two Clay workflows, an Audiences signal and a saved audience to put product usage and sales signals on the same company record, then push the accounts that have both into HubSpot. Product events arrive through a webhook trigger, a News signal watches the same accounts, and an audience segment that filters on both feeds a HubSpot create-object node.

What you will build

Your app posts product events (seats, plan, last active) to a Clay webhook. A workflow writes them onto the matching company in Clay Audiences. A News signal watches the companies that have product data. A saved audience keeps only companies with 5 or more seats AND a recent news event, and a second workflow creates a HubSpot company for each member.

your app --POST--> webhook trigger --> upsert-audiences-record  (seats, plan, last active on the company)
                                              |
            clay signals create --type News --+--> news events on the same company
                                              |
       clay audiences create (seats >= 5 AND news event in last 365 days)
                                              |
         audience_segment trigger --> hubspot-create-object (Company)  --> HubSpot

AI Prompt

Using the Clay CLI, combine product usage events and sales signals on one company record in Clay Audiences and sync the accounts that have both into HubSpot.

Requirements:
- Create Audiences company fields with `clay audiences fields create --entity-type companies --name <name> --data-type number|date|text`. Use the returned `audf_...` id everywhere. Names must be unique: a name that already exists returns `validation_error` (exit 2), so pick new names on a re-run.
- Create a workflow with `clay workflows create --name <name>`. Omit --budget-id only when `clay budgets list` returns an empty array.
- Add a webhook trigger with `clay workflows triggers create <wf> --input '{"triggerType":"webhook","inputSchema":{...}}'`, then read it with `clay workflows triggers get <triggerId>` to get `webhookUrl` and `workflowNodeId`.
- Add a tool node using actionKey `upsert-audiences-record` (package b1ab3d5d-b0db-4b30-9251-3f32d8b103c1) with entityType "ACCOUNT", lookup on `domain`, and `recordFields|<audf id>` mappings. Inputs are wired with `inputSchema.<name>.sourceNodeId` (the trigger node) and `sourcePath` ("$.seats").
- `clay workflows publish`, `clay signals create` (even a paused signal), `clay signals resume`, `clay signals pause`, `clay workflows test-data run` and `clay workflows runs test --trigger` on an audience trigger can each return `approval_required` (exit 1) with `details.actionApprovalRequestId`. A human approves with `clay approvals approve <id>` or in the Clay app; approving runs the original action, so do not re-issue the command afterwards. Never approve on the user's behalf.
- A POST to the webhook URL of an unpublished workflow returns HTTP 200 `{"success":true}` and starts no run. Publish first, then confirm with `clay workflows runs list <wf>`.
- Read results back with `clay workflows runs steps <wf> <runId>` and `clay audiences records get --entity-type companies --ids <ids>`.
- Create the sales-led signal with `clay signals create --type News --input '{"entityType":"ACCOUNT","segmentIds":[...],"filters":{...},"creditLimit":{"limit":N}}'`. It is created Paused unless --activate is passed. Pause it with `clay signals pause` when done.
- Filter the combined audience with a number BinOp on the product field AND a BinOp with key `signal_News_aggregate_occurrences`, dataPath ["signal_events"], operator WithinLast.
- For the CRM step, use actionKey `hubspot-create-object` (package a2584689-b965-4a25-847d-17b7abcddca3) with `appAccountId` from `clay app-accounts list --filter type=hubspot` and objectTypeId "0-2" for companies. Audience trigger outputs are keyed by field display name: `$.fields['<Field name>']`.
- Publishing an audience_segment workflow does not run it for records already in the segment. Run them with `clay workflows runs test <wf> --trigger <triggerId> --limit <n> --live`.
- The action catalog has no HubSpot delete action; remove test records in HubSpot itself.
- Run the verification step below before finishing.

Prerequisites

  • The clay CLI on PATH, authenticated via clay login (an OAuth session, not a Public API key)
  • Clay Audiences enabled, with the company records you want to track already present (matched on domain)
  • A HubSpot account connected in Clay, visible in clay app-accounts list --filter type=hubspot
  • jq and curl
  • Someone who can approve Clay approval requests in the workspace

Note: JSON samples below are trimmed to the fields relevant to each step. Most real clay responses also carry a top-level workspace: { id, name } wrapper, omitted here for readability; a few, such as workflows actions dynamic-fields, return a bare array.

1. Create the product fields on companies

clay audiences fields create --entity-type companies --name "TPC Batch 9 PLG seats" --data-type number
clay audiences fields create --entity-type companies --name "TPC Batch 9 PLG last active" --data-type date
clay audiences fields create --entity-type companies --name "TPC Batch 9 PLG plan"

Real output of the first call:

{
  "id": "audf_0tp94p798zw3wzwXYvG",
  "name": "TPC Batch 9 PLG seats",
  "entityType": "companies",
  "fieldType": "scalar",
  "dataType": "number"
}

The other two returned audf_0tp94p7xSJST8hKWR5m (date) and audf_0tp94p8dSN9gaA6zx9n (text, the default data type).

2. Create the product-events workflow and its webhook trigger

clay budgets list
clay workflows create --name "TPC Batch 9 PLG product events"

budgets list returned "data": [], so the workflow was created without --budget-id:

{
  "id": "wf_0tp94pkEx2qpzAZtmFu",
  "name": "TPC Batch 9 PLG product events",
  "type": null,
  "budget": null
}

The trigger declares the event payload your app will send:

cat > trigger-webhook.json <<'EOF'
{"triggerType":"webhook","inputSchema":{"type":"object","properties":{"event":{"type":"string"},"domain":{"type":"string"},"seats":{"type":"number"},"plan":{"type":"string"},"last_active_at":{"type":"string"}},"required":["domain"]}}
EOF
clay workflows triggers create wf_0tp94pkEx2qpzAZtmFu --input trigger-webhook.json
clay workflows triggers get aac340e7-9ef5-48d5-a6f9-1f7fec072559 | jq '{triggerType, workflowNodeId, webhookUrl}'

Real output:

{
  "resourceType": "trigger",
  "resourceId": "aac340e7-9ef5-48d5-a6f9-1f7fec072559",
  "workflowNodeId": "wfn_0tp94pofUUvtNFcnkNQ",
  "operation": "created"
}
{
  "triggerType": "webhook",
  "workflowNodeId": "wfn_0tp94pofUUvtNFcnkNQ",
  "webhookUrl": "https://api.clay.com/v3/sources/webhook/<webhook-id>"
}

Creating the trigger also filled its test dataset with three AI-generated sample rows (origin: "ai", made-up domains). clay workflows test-data list shows them and clay workflows test-data delete <wf> --trigger <id> --rows <ids> removes them.

3. Add the node that writes product usage onto the company

cat > node-upsert.json <<'EOF'
{
  "nodeType": "tool",
  "name": "Write product usage to Audiences",
  "tools": [{
    "toolType": "clay_action",
    "actionKey": "upsert-audiences-record",
    "actionPackageId": "b1ab3d5d-b0db-4b30-9251-3f32d8b103c1",
    "inputMappingConfig": {
      "entityType": {"type": "static", "value": "ACCOUNT"},
      "lookupFields|selectedLookupFields": {"type": "static", "value": ["domain"]},
      "lookupFields|domain": {"type": "reference", "expression": "{{domain}}"},
      "recordFields|selectedRecordFields": {"type": "static", "value": ["domain","audf_0tp94p798zw3wzwXYvG","audf_0tp94p7xSJST8hKWR5m","audf_0tp94p8dSN9gaA6zx9n"]},
      "recordFields|domain": {"type": "reference", "expression": "{{domain}}"},
      "recordFields|audf_0tp94p798zw3wzwXYvG": {"type": "reference", "expression": "{{seats}}"},
      "recordFields|audf_0tp94p7xSJST8hKWR5m": {"type": "reference", "expression": "{{last_active_at}}"},
      "recordFields|audf_0tp94p8dSN9gaA6zx9n": {"type": "reference", "expression": "{{plan}}"}
    }
  }],
  "inputSchema": {"type": "object", "required": [], "properties": {
    "domain": {"sourceNodeId": "wfn_0tp94pofUUvtNFcnkNQ", "sourcePath": "$.domain"},
    "seats": {"sourceNodeId": "wfn_0tp94pofUUvtNFcnkNQ", "sourcePath": "$.seats"},
    "last_active_at": {"sourceNodeId": "wfn_0tp94pofUUvtNFcnkNQ", "sourcePath": "$.last_active_at"},
    "plan": {"sourceNodeId": "wfn_0tp94pofUUvtNFcnkNQ", "sourcePath": "$.plan"}
  }},
  "incomingEdges": [{"sourceNode": "wfn_0tp94pofUUvtNFcnkNQ"}]
}
EOF
clay workflows nodes create wf_0tp94pkEx2qpzAZtmFu --input node-upsert.json
clay workflows diagram wf_0tp94pkEx2qpzAZtmFu | jq -r .diagram

Real output:

{
  "nodeId": "wfn_0tp94qrHd3vRz4taHn3",
  "operation": "created",
  "appliedUpdates": [
    { "field": "name", "success": true },
    { "field": "nodeType", "success": true },
    { "field": "tools", "success": true },
    { "field": "inputSchema", "success": true },
    { "field": "incomingEdges", "success": true }
  ]
}
flowchart TD
    n0(["Webhook"])
    n1("Write product usage to Audiences")
    n0 --> n1

The recordFields|<field id> keys come from clay workflows actions dynamic-fields b1ab3d5d-b0db-4b30-9251-3f32d8b103c1 upsert-audiences-record recordFields --type input --inputs '{"entityType":"ACCOUNT","recordFields|selectedRecordFields":[...]}'.

4. Publish, and get the approval

A POST to the webhook before publishing is accepted and dropped:

curl -sS -X POST "$WEBHOOK_URL" -H 'Content-Type: application/json' \
  -d '{"event":"seats_changed","domain":"example.org","seats":7,"plan":"team","last_active_at":"2026-11-28T18:00:00Z"}'
clay workflows runs list wf_0tp94pkEx2qpzAZtmFu

Real output:

{"success":true}
{ "data": [] }

Publishing in this workspace goes through an approval request:

clay workflows publish wf_0tp94pkEx2qpzAZtmFu --name "v1 product events"

Real output (stderr, exit 1, trimmed):

{
  "error": {
    "code": "approval_required",
    "details": {
      "actionApprovalRequestId": "aar_0tp94r0H7b6JCJEdxWi",
      "action": "workflows.publish",
      "category": "write",
      "display": {
        "title": "Publish workflow",
        "consequence": "Its triggers go live, so runs start on their own and can act outside Clay."
      }
    }
  }
}

A person with approval rights runs clay approvals approve aar_0tp94r0H7b6JCJEdxWi (or approves it in the Clay app). Approving runs the publish itself. Read the decision back:

clay approvals get aar_0tp94r0H7b6JCJEdxWi | jq '{id, action, decision, decidedAt, live: .result.body.workflow.liveWorkflowSnapshotId}'

Real output:

{
  "id": "aar_0tp94r0H7b6JCJEdxWi",
  "action": "workflows.publish",
  "decision": "approved",
  "decidedAt": "2026-11-29T07:03:02.804Z",
  "live": "wfs_0tp94qsfJoPUPoasSyS"
}

5. Send a product event and read it back on the company

curl -sS -X POST "$WEBHOOK_URL" -H 'Content-Type: application/json' \
  -d '{"event":"seats_changed","domain":"nvidia.com","seats":15,"plan":"team","last_active_at":"2026-11-29T07:05:00Z"}'
clay workflows runs list wf_0tp94pkEx2qpzAZtmFu | jq -c '.data[0] | {runId, status}'
clay workflows runs steps wf_0tp94pkEx2qpzAZtmFu wfr_a3384bc41a1eb7aec682c19cd39df657 \
  | jq '.data[] | select(.nodeName=="Write product usage to Audiences") | .stepOutputs'

Real output:

{"success":true}
{"runId":"wfr_a3384bc41a1eb7aec682c19cd39df657","status":"completed"}
{
  "isTerminal": true,
  "result": {
    "entityId": 3356039922,
    "upsertedFields": {
      "Domain": "nvidia.com",
      "TPC Batch 9 PLG plan": "team",
      "TPC Batch 9 PLG seats": 15,
      "TPC Batch 9 PLG last active": "2026-11-29T07:05:00Z"
    },
    "fieldsUpdatedCount": 4
  },
  "success": true
}

A second account (citigroup.com, 2 seats, plan free) was sent through the same workflow as a test-data row. Both companies read back with their product fields:

clay audiences records get --entity-type companies --ids 3356039922,3356042229 \
  | jq -c '.data[] | {recordId, domain: .fields.domain, seats: .fields.audf_0tp94p798zw3wzwXYvG, plan: .fields.audf_0tp94p8dSN9gaA6zx9n}'

Real output:

{"recordId":3356039922,"domain":"nvidia.com","seats":15,"plan":"team"}
{"recordId":3356042229,"domain":"citigroup.com","seats":2,"plan":"free"}

6. Watch the same companies with a sales-led signal

First, an audience of every company that has product data:

clay audiences create --entity-type companies --name "TPC Batch 9 PLG product accounts" \
  --filter '{"type":"GroupOp","combinationMode":"And","items":[{"type":"BinOp","key":"audf_0tp94p798zw3wzwXYvG","dataPath":["account_entity_field_values","field","audf_0tp94p798zw3wzwXYvG"],"operator":"NotEmpty","entityType":"ACCOUNT"}]}'
clay audiences records search-ids --entity-type companies --audience-id audseg_0tp94siYmsfKeh5bCgz | jq -c .data

Real output:

{ "id": "audseg_0tp94siYmsfKeh5bCgz", "name": "TPC Batch 9 PLG product accounts", "entityType": "companies" }
[3356039922,3356042229]

Then a News signal on that audience, with a topic filter and a credit limit:

clay signals create --type News --name "TPC Batch 9 PLG funding news" --schedule weekly \
  --input '{"entityType":"ACCOUNT","segmentIds":["audseg_0tp94siYmsfKeh5bCgz"],"filters":{"topics":["Fundraising","Executive Appointment","New Product Launch"],"maxNewsCount":20,"maxNewsPerDomain":5,"autoAdvanceEarliestPublishDate":true},"creditLimit":{"limit":25}}'

This also returned approval_required, with action: "signals.create" and the consequence "The signal stays paused until it is resumed." After approval, the request's result holds the new signal, and resuming it raised a second request (action: "signals.update"). Once both were approved:

clay signals get td_0tp94x34hM5MKpnuygz | jq '{id, runStatus, signal: .signal.id, lastRunAt, error}'

Real output:

{
  "id": "td_0tp94x34hM5MKpnuygz",
  "runStatus": "Active",
  "signal": "sig_0tp94x3BNvsNCcunmCu",
  "lastRunAt": "2026-11-29T07:08:24.961Z",
  "error": null
}

Read the events this signal wrote onto the audience. In this run, nothing had arrived about seven minutes after activation:

clay audiences signals list --segment-id audseg_0tp94siYmsfKeh5bCgz --since 2026-11-29T07:00:00Z \
  --signal-types News --signal-ids sig_0tp94x3BNvsNCcunmCu | jq '.data | length'
0

The company records already carried News events from an earlier signal in the same workspace, and the combined audience in step 7 matches any News event on the record, whichever signal wrote it. Check that with the same signal clause on its own:

clay audiences records search-ids --entity-type companies \
  --filter '{"type":"GroupOp","combinationMode":"And","items":[{"type":"BinOp","key":"signal_News_aggregate_occurrences","dataPath":["signal_events"],"operator":"WithinLast","value":365,"timeUnit":"day","entityType":"ACCOUNT"}]}' \
  | jq -c .data
[3356039922,3356042229]

Both companies have a News event in the last 365 days, so in step 7 it is the seats clause that separates them. News results depend on what is published about each company, so check for the property (the company appears under the News clause) rather than a particular article.

7. Build the one view: product usage AND a sales signal

cat > filter-plg-and-signal.json <<'EOF'
{"type":"GroupOp","combinationMode":"And","items":[
  {"type":"BinOp","key":"audf_0tp94p798zw3wzwXYvG","dataPath":["account_entity_field_values","field","audf_0tp94p798zw3wzwXYvG"],"operator":"GreaterThanOrEqual","value":5,"entityType":"ACCOUNT"},
  {"type":"BinOp","key":"signal_News_aggregate_occurrences","dataPath":["signal_events"],"operator":"WithinLast","value":365,"timeUnit":"day","entityType":"ACCOUNT"}
]}
EOF
clay audiences create --entity-type companies --name "TPC Batch 9 PLG active product + news signal" \
  --description "5+ seats in product AND a news signal event in the last 365 days" --filter filter-plg-and-signal.json
clay audiences records search-ids --entity-type companies --audience-id audseg_0tp94sxRhgFoZgC7wU9 | jq -c .data

Real output:

{ "id": "audseg_0tp94sxRhgFoZgC7wU9", "name": "TPC Batch 9 PLG active product + news signal", "entityType": "companies" }
[3356039922]

As a control, the signal clause on its own matches both companies, so the 2-seat account is excluded by the product clause rather than by the signal clause:

clay audiences records search-ids --entity-type companies \
  --filter '{"type":"GroupOp","combinationMode":"And","items":[{"type":"BinOp","key":"signal_News_aggregate_occurrences","dataPath":["signal_events"],"operator":"WithinLast","value":365,"timeUnit":"day","entityType":"ACCOUNT"}]}' | jq -c .data
[3356039922,3356042229]

8. Sync the combined audience to HubSpot

Confirm the connected account and pick the object type:

clay app-accounts list --filter type=hubspot | jq -c '.data[] | {id, name, type}'
clay workflows actions dynamic-fields a2584689-b965-4a25-847d-17b7abcddca3 hubspot-create-object objectTypeId \
  --account aa_0to3sazQr9sNzc8ejj6 | jq -c '.[].dynamicData[]'

Real output:

{"id":"aa_0to3sazQr9sNzc8ejj6","name":"<hubspot-account-name>","type":"hubspot"}
{"displayName":"Company","value":"0-2"}
{"displayName":"Contact","value":"0-1"}
{"displayName":"Deal","value":"0-3"}
{"displayName":"Lead","value":"0-136"}

Create the sync workflow with an audience_segment trigger and a HubSpot node. Audience trigger outputs are keyed by field display name under fields:

clay workflows create --name "TPC Batch 9 PLG sync to HubSpot"
clay workflows triggers create wf_0tp94t7QTtG5YHSWjT9 \
  --input '{"triggerType":"audience_segment","segmentId":"audseg_0tp94sxRhgFoZgC7wU9","entityType":"ACCOUNT"}'
cat > node-hubspot.json <<'EOF'
{
  "nodeType": "tool",
  "name": "Create HubSpot company (TPC TEST)",
  "tools": [{
    "toolType": "clay_action",
    "actionKey": "hubspot-create-object",
    "actionPackageId": "a2584689-b965-4a25-847d-17b7abcddca3",
    "appAccountId": "aa_0to3sazQr9sNzc8ejj6",
    "inputMappingConfig": {
      "objectTypeId": {"type": "static", "value": "0-2"},
      "fields|name": {"type": "reference", "expression": "TPC TEST {{domain}}"},
      "fields|description": {"type": "reference", "expression": "TPC TEST record from a Clay docs example. Product: {{seats}} seats, plan {{plan}}, last active {{last_active}}. Sales signal: news event in the last 365 days."}
    }
  }],
  "inputSchema": {"type": "object", "required": [], "properties": {
    "domain": {"sourceNodeId": "wfn_0tp94t8sayxZMBVE9Qk", "sourcePath": "$.fields.Domain"},
    "seats": {"sourceNodeId": "wfn_0tp94t8sayxZMBVE9Qk", "sourcePath": "$.fields['TPC Batch 9 PLG seats']"},
    "plan": {"sourceNodeId": "wfn_0tp94t8sayxZMBVE9Qk", "sourcePath": "$.fields['TPC Batch 9 PLG plan']"},
    "last_active": {"sourceNodeId": "wfn_0tp94t8sayxZMBVE9Qk", "sourcePath": "$.fields['TPC Batch 9 PLG last active']"}
  }},
  "incomingEdges": [{"sourceNode": "wfn_0tp94t8sayxZMBVE9Qk"}]
}
EOF
clay workflows nodes create wf_0tp94t7QTtG5YHSWjT9 --input node-hubspot.json
clay workflows publish wf_0tp94t7QTtG5YHSWjT9 --name "v1 hubspot sync"

The trigger returned workflowNodeId: "wfn_0tp94t8sayxZMBVE9Qk", the node returned wfn_0tp94tsqaRwwxzWGapG, and the publish returned another approval_required (aar_0tp94tyQCi3XDAhEnhw), approved the same way as step 4.

After publishing, clay workflows runs list wf_0tp94t7QTtG5YHSWjT9 still returned "data": []: the company that was already in the segment did not start a run. Run existing members explicitly:

clay workflows runs test wf_0tp94t7QTtG5YHSWjT9 --trigger 77887b71-9183-4413-9035-0cb2eaefe60a --limit 5 --live

Real output (stderr, exit 1, trimmed):

{
  "error": {
    "code": "approval_required",
    "details": {
      "actionApprovalRequestId": "aar_0tp94yz2dyprK7wxmnq",
      "action": "workflow-triggers.backfill",
      "display": {
        "title": "Run on existing records",
        "description": "Run \"TPC Batch 9 PLG sync to HubSpot\" on 1 record its trigger already matches."
      }
    }
  }
}

After approval, the run appears and its HubSpot step carries the created object:

clay workflows runs list wf_0tp94t7QTtG5YHSWjT9 | jq -c '.data[] | {runId, status}'
clay workflows runs steps wf_0tp94t7QTtG5YHSWjT9 wfr_fae1f3e3829678a225da398d9851e038 \
  | jq '.data[] | select(.nodeId=="wfn_0tp94tsqaRwwxzWGapG") | .stepOutputs'

Real output (trimmed; HubSpot portal id redacted):

{"runId":"wfr_fae1f3e3829678a225da398d9851e038","status":"completed"}
{
  "isTerminal": true,
  "result": {
    "id": "375300716257",
    "url": "https://app-na2.hubspot.com/contacts/<portalId>/record/0-2/375300716257",
    "archived": false,
    "properties": {
      "name": "TPC TEST nvidia.com",
      "description": "TPC TEST record from a Clay docs example. Product: 15 seats, plan team, last active 2026-11-29T07:05:00Z. Sales signal: news event in the last 365 days.",
      "hs_object_source": "INTEGRATION",
      "lifecyclestage": "lead"
    }
  },
  "success": true,
  "textPreview": "✅ Object created"
}

clay workflows runs get on that run reported "actionCreditsUsed": 1.

9. Pause the signal

An active signal keeps checking on its schedule. Pausing it is also a signals.update action, and it went through approval too:

clay signals pause td_0tp94x34hM5MKpnuygz

Real output (stderr, exit 1, trimmed):

{
  "error": {
    "code": "approval_required",
    "details": { "actionApprovalRequestId": "aar_0tp95hlxXViCSAWGPTB", "action": "signals.update" }
  }
}

Until the request is approved, clay signals get td_0tp94x34hM5MKpnuygz keeps reporting "runStatus": "Active". The creditLimit set at creation is stored either way, but the signals help text says it is only enforced on workspaces where audience credit limits are enabled.

Verify the result

Confirm the HubSpot step created a company from the combined audience:

clay workflows runs steps wf_0tp94t7QTtG5YHSWjT9 wfr_fae1f3e3829678a225da398d9851e038 \
  | jq '.data[] | select(.nodeId=="wfn_0tp94tsqaRwwxzWGapG") | {success: .stepOutputs.success, id: .stepOutputs.result.id, name: .stepOutputs.result.properties.name}'

Expected: success is true, id is a non-empty HubSpot object id, and name is built from a domain that is a member of the combined audience (5 or more seats and a news event), while the 2-seat company never reaches HubSpot.

How it works

The webhook trigger turns each POST body into run inputs, and upsert-audiences-record looks the company up by domain and writes the mapped audf_... fields, so product data lands on the same Audiences record that signals write to. An audiences News signal watches the members of a saved audience and records its events on those company records, which makes them filterable through signal_events alongside ordinary fields. A saved audience can combine both kinds of clause in one And group, and an audience_segment trigger exposes each member's fields under fields, keyed by display name, to the HubSpot node. In this workspace, actions that publish, spend or create signals are held as approval requests; approving one executes the original action and stores its response under result on the request.

Common issues

approval_required on publish, signals, test runs and backfills

In a workspace with approvals turned on, workflows publish, signals create (including a paused signal), resuming or pausing a signal, workflows test-data run and workflows runs test --trigger on an audience trigger each return exit 1 with details.actionApprovalRequestId, before anything happens. Creating fields, audiences, workflows, triggers and nodes did not need approval. Pass the id to a person who can approve it; clay approvals get <id> shows decision, and once it is "approved" the action has already run, so re-issuing the command creates a second request instead of being needed.

The webhook returns 200 but nothing runs

Posting to the webhookUrl of a workflow that has never been published returns HTTP 200 {"success":true}, and clay workflows runs list stays empty. The event is not queued for later. Publish the workflow, then send the event again and confirm a new run id appears.

Field names must be unique

Re-running step 1 with the same names fails rather than creating a renamed copy:

clay audiences fields create --entity-type companies --name "TPC Batch 9 PLG plan"
{
  "error": {
    "code": "validation_error",
    "message": "Audience field name already exists. Please choose a unique name."
  }
}

The command exits 2. Reuse the existing audf_... ids from clay audiences fields list --entity-type companies, or choose new names.

Reading signal events: list, not get, and no record-level window here

In CLI 1.23.0 the event reader is clay audiences signals list (there is no get), it requires --since (no --days-lookback), and the window cannot exceed 365 days. Segment-scoped reads also require --signal-types. The record-scoped form, clay audiences signals list --entity-id 3356039922 --entity-type companies --since 2025-12-01T00:00:00Z, exited 3 in this workspace with auth_forbidden: "Record signal date windows are not available for this workspace yet." Segment-scoped list and summary for News since 2025-12-01 returned no events, while the signal_events filter clause matched both companies. To confirm which records carry a signal, filter with records search-ids as in step 6.

Publishing a segment-triggered workflow does not process current members

The company that was already in the audience did not start a run when the HubSpot workflow was published. clay workflows runs test <wf> --trigger <triggerId> --limit <n> --live runs existing members, and it is a separate workflow-triggers.backfill approval.

Webhook triggers come with AI-generated test rows

triggers create with triggerType: "webhook" filled the test dataset with three rows of invented companies (origin: "ai"). Running test data against them would write those companies into Audiences, so delete them with clay workflows test-data delete and add your own rows with test-data add --rows.

Audience trigger fields use display names

The audience_segment trigger's outputSchema nests record values under fields with keys such as "TPC Batch 9 PLG seats", not the audf_... id. Reference them as $.fields['TPC Batch 9 PLG seats'] in sourcePath; renaming a field changes the key.

No HubSpot delete action

The catalog's HubSpot actions are create, update and lookup object, add to list, create and retrieve associations, enroll contact, enrollment status and find owner. Test records created by this flow have to be removed in HubSpot directly.

dynamic-fields takes --account

The connected account flag on clay workflows actions dynamic-fields is --account <id>. --app-account returns validation_error "unknown option '--app-account'".

search-count with a select query

clay audiences records search-count --query 'select from companies ...' returns validation_error "Expected a count query. Use count from <root>". Use search-ids for select queries.

Next steps


verification:
  status: verified
  tested_at: "2026-11-29"
  product_version: "clay CLI 1.23.0"
  command: "clay workflows runs steps wf_0tp94t7QTtG5YHSWjT9 wfr_fae1f3e3829678a225da398d9851e038 | jq '.data[] | select(.nodeId==\"wfn_0tp94tsqaRwwxzWGapG\") | {success: .stepOutputs.success, id: .stepOutputs.result.id, name: .stepOutputs.result.properties.name}'"
  expected_result: "success is true, id is a non-empty HubSpot object id, and name is built from a domain in the combined product-and-signal audience; the 2-seat company never reaches HubSpot."

Related Articles