Fetch companies and their associated contacts from HubSpot using superglue Workflows.
Note: All config objects for individual workflow steps support the full ApiConfig schema. superglue infers most fields, but you can provide explicit configurations if needed. Workflows themselves are defined and then executed.
client.buildWorkflow()
to instruct superglue to create the necessary steps. superglue will analyze the HubSpot API (using the provided documentation URL) and the instruction to figure out how to fetch companies, then contacts for each company, and combine them.
buildWorkflow
is called:
instruction
and the integrations
(HubSpot API documentation)./crm/v3/objects/companies
, /crm/v3/objects/contacts
, and how to query associations).hubspotDataSchema
.workflow
object returned contains the definition of these steps, including the generated ApiConfig
objects for each API call.
client.executeWorkflow()
. You’ll provide the workflow definition (or its ID if previously saved/upserted) and the necessary runtime credentials.
result.data
from a successful execution would look something like this:
builtWorkflow
definition using client.upsertWorkflow(workflow.id, workflow)
for later execution by ID.