Custom Object Management

hubspot/agent-cli-skills/custom-object-management

作者 hubspota8eea0880838无许可证27 个星标收录于 2026年10月8日更新于 2026年10月8日仓库7天前更新

Discover, create, update, and delete custom CRM object schemas. Use when defining a new object type, inspecting existing schemas, or removing one. Record CRUD on custom objects is identical to standard objects — see `bulk-operations`.

仅含说明Business & Finance
AI 生成的概览

通过 hubspot CLI 管理 HubSpot 自定义 CRM 对象架构:列出、查看、创建、更新标签和删除。

功能
该技能说明如何使用 hubspot CLI 发现、查看、创建、更新和删除自定义 CRM 对象架构。内容包括以 JSONL 列出架构、筛选出自定义架构、读取完整架构定义、构建最小创建请求体、修补标签或描述,以及执行带 dry-run、digest 和 confirm 的破坏性删除流程。它还指出自定义对象上的记录 CRUD 与标准对象一致,并指向相关技能。
适用场景
适用于定义新的自定义对象类型、查看现有架构、更新架构标签或描述,或删除自定义对象架构。也适合在操作记录前确认存在哪些自定义对象。
运行要求
需要 hubspot CLI,以及用于所示管道的 jq。list、get、create 和 update 需要 OAuth 登录或服务密钥;delete 仅限服务密钥,并需要 HUBSPOT_ACCESS_TOKEN。该技能不附带脚本。

Source of truth

hubspot schemas --help is authoritative. Subcommands: list, get, create, update (metadata only), delete (destructive). schemas list/get/create/update work under OAuth login or a service key; schemas delete is service-key-only (AppTokenOnly) — set HUBSPOT_ACCESS_TOKEN. Read bulk-operations/SKILL.md first — every command here uses its JSONL conventions, and schemas delete uses its dry-run / digest / confirm flow.

Discover existing schemas

bash
hubspot schemas list                                       # JSONL: name, label, singular, objectTypeId, sourcehubspot schemas list | jq 'select(.source=="custom")'      # custom onlyhubspot objects types | jq -c 'select(.source=="custom")'  # same set, also shown to confirm `--type` resolves

name is what every other command takes. objectTypeId (e.g. 2-12345678) is only needed for workflow PLATFORM_FLOW targets.

Inspect one schema

bash
hubspot schemas get --type pets

Returns the full definition — properties, associations, labels, requiredProperties, primaryDisplayProperty, fullyQualifiedName. Reshape with jq as needed (see bulk-operations/resources/json-patterns.md).

Create a schema

Build a JSON body and pipe it (or pass --file). Minimal valid body:

json
{  "name": "equipment",  "labels": {"singular": "Equipment", "plural": "Equipment"},  "primaryDisplayProperty": "equipment_name",  "requiredProperties": ["equipment_name"],  "properties": [    {"name": "equipment_name", "label": "Name", "type": "string", "fieldType": "text"}  ],  "associatedObjects": ["contacts"]}
bash
cat equipment-schema.json | hubspot schemas create --dry-run   # previewhubspot schemas create --file equipment-schema.json            # execute

Add more properties later with hubspot properties create --type <name> ....

Update schema metadata

update patches labels / description only. Property edits go through hubspot properties.

bash
echo '{"labels":{"singular":"Device","plural":"Devices"}}' | hubspot schemas update --type equipment

update also supports --dry-run → digest → re-run with --digest --confirm <name> (see bulk-operations/SKILL.md for the pattern).

Delete a schema (destructive)

Schema delete is destructive and irreversible — it permanently removes the schema and every record of that type. It is gated as MetadataDestroy: every delete requires --dry-run first, then re-run with --digest <hash> --confirm <name> within 5 minutes.

Follow the three-step flow documented in bulk-operations/SKILL.md ("Safe destructive workflow"). For schemas, the confirm value is the schema name:

bash
hubspot schemas delete --type equipment --dry-run# → digest=blast-... ; apply_command_hint shows: --digest <hash> --confirm 'equipment'hubspot schemas delete --type equipment --digest <hash> --confirm equipment

Check hubspot history --since 24h --kind MetadataDestroy to audit recent schema deletes.

Using the schema after creation

Once a schema exists, all hubspot objects ... commands accept its name as --type (e.g. --type pets). Record CRUD, search, association, bulk upsert — all identical to standard objects. Don't re-implement those flows here; see bulk-operations/SKILL.md and crm-lookup.

来源与署名

来源:hubspot/agent-cli-skills位于custom-object-management提交a8eea08

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架