hs_get_workflow
Retrieve full details of a HubSpot workflow, including enrollment triggers, actions, and settings, by supplying the workflow ID.
Instructions
Get full details of a workflow including enrollment triggers, actions, and settings.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workflowId | Yes | HubSpot workflow (automation) ID |
Implementation Reference
- src/tools/workflows.ts:18-19 (handler)The getWorkflow function that executes the tool logic - calls HubSpot API to get workflow details by ID
export async function getWorkflow(args: z.infer<typeof GetWorkflowSchema>) { return hubspot(`/automation/v3/workflows/${args.workflowId}`); - src/tools/workflows.ts:14-16 (schema)GetWorkflowSchema - Zod schema requiring a workflowId number
export const GetWorkflowSchema = z.object({ workflowId: z.number().int().describe("HubSpot workflow (automation) ID"), }); - src/index.ts:271-276 (registration)Registration of 'hs_get_workflow' tool with server.tool(), including description and schema
server.tool( "hs_get_workflow", "Get full details of a workflow including enrollment triggers, actions, and settings.", GetWorkflowSchema.shape, async (args) => { try { return ok(await getWorkflow(args)); } catch (e) { return err(e); } }, ); - src/index.ts:59-62 (registration)Import of GetWorkflowSchema and getWorkflow from workflows.ts
import { ListWorkflowsSchema, listWorkflows, GetWorkflowSchema, getWorkflow, } from "./tools/workflows.js";