hubspot-get-workflow
Retrieve detailed workflow information from HubSpot, including actions, enrollment criteria, and scheduling, by specifying the workflow ID using the flowId parameter.
Instructions
🎯 Purpose:
1. This tool retrieves detailed information about a specific workflow from the HubSpot account.
🧭 Usage Guidance:
1. Use the "flowId" parameter to specify which workflow to retrieve.
2. This endpoint returns complete workflow information including actions, enrollment criteria, and scheduling.
3. Use the hubspot-list-workflows tool first to identify the workflow ID you need.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| flowId | Yes | The ID of the workflow to retrieve |
Implementation Reference
- The handler function that fetches the specific workflow from HubSpot API using the provided flowId and returns the details or an error message.async process(args) { try { const response = await this.client.get(`/automation/v4/flows/${args.flowId}`); return { content: [ { type: 'text', text: JSON.stringify(response, null, 2), }, ], }; } catch (error) { return { content: [ { type: 'text', text: `Error retrieving HubSpot workflow (ID: ${args.flowId}): ${error instanceof Error ? error.message : String(error)}`, }, ], isError: true, }; } }
- Zod schema defining the input parameters for the tool, specifically the flowId.const GetWorkflowSchema = z.object({ flowId: z.string().describe('The ID of the workflow to retrieve'), });
- dist/tools/toolsRegistry.js:47-47 (registration)Registers an instance of the GetWorkflowTool in the central tools registry.registerTool(new GetWorkflowTool());