workflows-as-code
Skill by TomGranot
Exports all HubSpot workflows to versioned JSON files, so they can be diffed over time and restored. It is for teams that want backups and reviewable change history for their HubSpot automation.
Install workflows-as-code
Built from the published package, never by AI.
git clone --depth 1 https://github.com/TomGranot/hubspot-admin-skills /tmp/hubspot-admin-skills && mkdir -p ~/.claude/skills && cp -r /tmp/hubspot-admin-skills/skills/workflows-as-code ~/.claude/skills/workflows-as-codeRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/TomGranot/hubspot-admin-skills /tmp/hubspot-admin-skills && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/hubspot-admin-skills/skills/workflows-as-code ~/.gemini/antigravity-cli/skills/workflows-as-codeAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
Workflows as Code is an agent skill for HubSpot. It uses the v4 Automation API to export every workflow in a portal to one JSON file per workflow, plus a manifest. Exports are meant to be kept under version control, and two exports can be compared with a standard diff to see what changed in actions and enrollment criteria.
The restore script recreates a workflow from an export file. It removes server-assigned fields, adds a "(restored)" suffix to the name, and creates the workflow disabled so it can be reviewed before it is enabled. The skill is aimed at HubSpot admins and operations teams who treat workflow definitions as production configuration that should be backed up and reviewed.
Written from the project's SKILL.md and checked against it.
What it can do
- Export workflowsExports every workflow in the portal to a JSON file and writes a manifest.csv listing them.
- Diff exportsCompares exports from different dates to show changes in actions and enrollment criteria.
- Restore workflowsRecreates a workflow from an export file as a disabled copy for review before enabling.
What you need
- HubSpot service key with the automation scope
- Python 3.10 or later
- uv
- A git repository or other private place to store exports
Try asking
- Export all my HubSpot workflows to JSON files for today.
- Compare this month's workflow export with last month's and show what changed.
- Restore the workflow from my June 1 export as a disabled copy.
Good to know
- The HubSpot Workflows API is in beta and may change.
- The scripts call the unversioned v4 path, which HubSpot lists as ending support on March 30, 2027.
- Deleted workflows cannot be restored through the API, so an earlier export is the only restore path.
- Some actions may be rejected when recreated in a different portal and must be added in the UI.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/workflows-as-code/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to workflows-as-code
All alternatives →Scores inbound HubSpot leads on engagement, company fit and urgency, then ranks the ones worth a call today. Built for sales owners who need to decide who to call first.
Builds a ranked list of prospects by deriving an ideal customer profile from existing customers. It finds look-alike companies and decision-makers, then scores them. Built for owners who need new customers.
Writes prospect outreach and follow-up sequences in the owner's own voice, learned from their sent mail. Queues every send for approval and logs each touch to the CRM. Runs draft-only when no mail connector is available.
Writes and runs B2B cold outbound, including cold emails, follow-up sequences, LinkedIn messages and multichannel cadences. Built for sales development and outbound teams that want replies rather than template blasts.
Speed to Lead checks inbound inquiries from web forms, the shared inbox, and the CRM, then drafts replies for the owner to approve. It is for owners who lose leads because nobody replies fast enough.
Helps write, build and improve B2B cold email and follow-up sequences for prospects who did not opt in. Covers SDR and founder outreach.
Compare with lead-triage, lead-finder or outreach-composer
workflows-as-code: common questions
Can this recover a deleted HubSpot workflow?
Not through the API. The source says HubSpot Support can sometimes recover one, and an export taken beforehand is the only restore path the user controls.
Will a restored workflow start running automatically?
No. The restore script creates the workflow disabled, under a "(restored)" name, so it can be checked in the UI before being renamed and enabled.
Are the exported files safe to share?
The source says exports can contain internal names, property names, list IDs and notification text, so they should be kept in a private repository.
How do I install workflows-as-code?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is workflows-as-code free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is workflows-as-code safe to use?
It scores 58 of 100. Grades: maintenance A, licence A, quality B. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to workflows-as-code?
Similar skills: lead-triage, lead-finder, outreach-composer, cold-email.
