정보
이 스킬은 HubSpot 워크플로우를 API를 통해 버전 관리된 JSON 파일로 내보내어 코드처럼 다룰 수 있게 합니다. 개발자는 변경 사항을 diff로 추적하고 JSON 백업에서 워크플로우를 완전히 복원할 수 있어 중요한 안전망을 제공합니다. HubSpot UI에서는 보호되지 않는 자동화 구성을 백업, 검토 및 복구하는 데 사용하세요.
빠른 설치
Claude Code
추천npx skills add TomGranot/hubspot-admin-skills -a claude-code/plugin add https://github.com/TomGranot/hubspot-admin-skillsgit clone https://github.com/TomGranot/hubspot-admin-skills.git ~/.claude/skills/workflows-as-codeClaude Code에서 이 명령을 복사하여 붙여넣어 스킬을 설치하세요
문서
Workflows as Code
Export every workflow in the portal to JSON files, keep the exports under version control, and restore workflows from JSON when something breaks. HubSpot has no recycle bin for workflows — a deleted or mangled workflow is gone unless you have its definition. This skill gives you that safety net, plus reviewable diffs of what changed between exports.
Why This Matters
Workflows are production automation, but most portals treat them like disposable UI configuration: no backups, no change history, no review. One mis-click in the workflow editor can silently break lead routing or suppression for weeks. The v4 Automation API supports full read and create of workflow definitions, which makes a code-like lifecycle possible: export → version → diff → restore.
Prerequisites
- A HubSpot private app access token (
HUBSPOT_ACCESS_TOKENin.env) with theautomationscope (plus sensitive-data scopes if any flows touch sensitive properties) - Python 3.10+ with
uv - A place to keep exports — a git repository is ideal (
data/workflow-exports/is gitignored here by default because exports may reference internal names; move them to a private repo if you want history)
Scripts
| Stage | Script | Run with |
|---|---|---|
| Export | scripts/export.py | uv run skills/workflows-as-code/scripts/export.py |
| Restore | scripts/restore.py | uv run skills/workflows-as-code/scripts/restore.py <export-file.json> |
export.py lists all flows via GET /automation/v4/flows, fetches each full definition via the batch read endpoint (POST /automation/v4/flows/batch/read, falling back to per-flow GETs), and writes one JSON file per workflow plus a manifest. restore.py recreates a workflow from an export file via POST /automation/v4/flows — always disabled, under a "(restored)" name, for review before enabling.
Execution Pattern
Stage 1: Plan
- Decide export cadence: before any workflow cleanup (mandatory — see
/cleanup-workflows), after building new workflows, and on a schedule (monthly pairs well with/quarterly-database-cleanup). - Decide where exports live long-term (private git repo recommended).
Stage 2: Before
Nothing to prepare — the export is read-only. Note the current workflow count from Automation > Workflows for comparison.
Stage 3: Execute — Export
uv run skills/workflows-as-code/scripts/export.py
Output layout:
data/workflow-exports/<YYYY-MM-DD>/
├── manifest.csv # flowId, name, type, isEnabled, revisionId, file
├── flow-<flowId>.json # one full definition per workflow
└── ...
To diff two exports:
diff -u data/workflow-exports/2026-06-01/flow-12345.json \
data/workflow-exports/2026-07-01/flow-12345.json
(Timestamps and revision IDs will differ; meaningful changes show up in actions and enrollmentCriteria.)
Stage 3 (alternative): Execute — Restore
To recreate a deleted or broken workflow from an export:
uv run skills/workflows-as-code/scripts/restore.py data/workflow-exports/2026-06-01/flow-12345.json
The script strips server-assigned fields (id, revisionId, timestamps), renames the flow with a "(restored)" suffix to avoid name collisions, and creates it disabled. Review it in the UI, verify enrollment criteria and actions against the original, then rename and enable.
Stage 4: After
- Export: verify the manifest row count matches the portal's workflow count and spot-open one JSON file.
- Restore: open the restored workflow in Automation > Workflows, compare against the export, then enable.
Rollback
- Export is read-only — nothing to roll back.
- A restored workflow you do not want: it was created disabled; just delete it.
Technical Gotchas
- Updating in place requires the current
revisionId.PUT /automation/v4/{flowId}must include the flow's latestrevisionIdandtype— a stale revision is rejected. The restore script sidesteps this by creating a new flow instead of updating. - Some actions round-trip imperfectly. Actions whose field shapes are undocumented (e.g., copy-from-associated-object, notification recipients) export fine but may be rejected on re-create in a different portal. The restore script reports per-action errors; add rejected actions in the UI.
- v3 workflow IDs are not v4 flow IDs. If you have old tooling built on
/automation/v3/workflows, the v4 API provides workflowId → flowId mapping endpoints for migration. New tooling should use v4 exclusively — v3 is legacy. - Sensitive-data scopes. Flows that read or set sensitive properties require the corresponding sensitive-data scopes on your private app, or reads will fail.
- Exports may contain internal data. Workflow names, property names, list IDs, and notification text are all in the JSON. Treat exports like configuration secrets — keep them in a private repo.
GitHub 저장소
Frequently asked questions
What is the workflows-as-code skill?
workflows-as-code is a Claude Skill by TomGranot. Skills package instructions and resources that Claude loads on demand, so Claude can perform workflows-as-code-related tasks without extra prompting.
How do I install workflows-as-code?
Use the install commands on this page: add workflows-as-code to Claude Code as a plugin, or clone its repository into your skills directory, then restart Claude so it picks up the skill.
What category does workflows-as-code belong to?
workflows-as-code is in the Meta category, tagged api and automation.
Is workflows-as-code free to use?
Yes. workflows-as-code is listed on AIMCP and free to install. It runs inside Claude, so no separate service account is required to use the skill itself.
연관 스킬
이 스킬은 콘텐츠 콜렉션(Content Collections)을 위한 프로덕션 검증된 설정을 제공합니다. 콘텐츠 콜렉션은 Markdown/MDX 파일을 Zod 검증이 포함된 타입 안전한 데이터 콜렉션으로 변환해주는 TypeScript 최우선 도구입니다. 블로그, 문서 사이트 또는 콘텐츠 중심의 Vite + React 애플리케이션을 구축할 때 타입 안전성과 자동 콘텐츠 검증을 보장하기 위해 사용하세요. Vite 플러그인 구성과 MDX 컴파일부터 배포 최적화 및 스키마 검증에 이르기까지 모든 것을 다룹니다.
이 스킬은 개발자들이 Polymarket 예측 시장 플랫폼을 활용한 애플리케이션을 구축할 수 있도록 지원하며, 거래 및 시장 데이터를 위한 API 통합 기능을 포함합니다. 또한 WebSocket을 통한 실시간 데이터 스트리밍을 제공하여 실시간 거래와 시장 활동을 모니터링할 수 있습니다. 이를 통해 거래 전략을 구현하거나 실시간 시장 업데이트를 처리하는 도구를 생성하는 데 활용할 수 있습니다.
이 스킬은 개발자들이 명령어, 파일, LSP 작업 등 25개 이상의 이벤트 유형에 연결되는 OpenCode 플러그인을 만들 수 있도록 돕습니다. JavaScript/TypeScript 모듈을 위한 플러그인 구조, 이벤트 API 명세, 구현 패턴을 제공합니다. OpenCode AI 어시스턴트의 라이프사이클을 사용자 정의 이벤트 기반 로직으로 가로채거나, 모니터링하거나, 확장해야 할 때 사용하세요.
SGLang은 RadixAttention 프리픽스 캐싱을 활용하여 JSON, 정규식, 에이전트 워크플로우를 위한 고속 구조화 생성에 특화된 고성능 LLM 서빙 프레임워크입니다. 특히 반복되는 프리픽스가 있는 작업에서 상당히 빠른 추론 속도를 제공하여 복잡한 구조화 출력 및 다중 턴 대화에 이상적입니다. 제약 디코딩이 필요하거나 광범위한 프리픽스 공유가 있는 애플리케이션을 구축할 때는 vLLM과 같은 대안보다 SGLang을 선택하십시오.
