- Fetches a list of companies from HubSpot.
- For each company, fetches its associated contacts.
- Combines this data into a nested structure where each company object contains an array of its contacts.
Prerequisites
- A HubSpot account with API access.
- A HubSpot Private App and its Access Token (recommended for authentication).
- Ensure that you have added superglue MCP to your
mcp.json
.
mcp.json
Make sure to replace the API key placeholder with your own API key after copying.
Authentication
HubSpot’s API uses Bearer token authentication. The simplest way is to create a Private App in your HubSpot developer account and use its Access Token. Keep this token handy; you’ll provide it as a credential when telling your agent to build and execute your new HubSpot integration workflow.Building a Custom HubSpot Workflow
You can find detailed descriptions of all available tools provided by superglue MCP here. In this tutorial, we will start off by building a custom integration workflow using natural language and your Cursor chat interface only. Using superglue MCP is as easy as providing your LLM agent of choice with a prompt containing instructions and any authentication tokens you may need:What Happened Under the Hood:
- superglue MCP used
superglue_find_relevant_integrations
to discover available HubSpot integrations - superglue MCP used
superglue_build_and_run
to build and test a new workflow that fetches and transforms the requested data according to the user instructions - superglue MCP used
superglue_save_workflow
to persist the workflow for future use - superglue MCP used
superglue_execute_workflow
to execute the saved workflow - superglue MCP used
superglue_get_workflow_integration_code
to generate the code required to embed this workflow in an existing codebase
Next Steps
- Reuse Workflows: You can re-run the workflow any time either programmatically by running the integration code generated, or through superglue MCP by asking your agent to use
superglue_execute_workflow
with the correct ID - Complex Scenarios: Extend this pattern to include more HubSpot objects (Deals, Tickets), apply more complex transformations, or integrate HubSpot data with other system data by building more workflows with superglue MCP.