MCPcopy Index your code
hub / github.com/simstudioai/sim / fetchHubSpotProperties

Function fetchHubSpotProperties

apps/sim/triggers/hubspot/poller.ts:36–46  ·  view source on GitHub ↗
(blockId: string, objectType: string)

Source from the content-addressed store, hash-verified

34}
35
36async function fetchHubSpotProperties(blockId: string, objectType: string) {
37 const credentialId = useSubBlockStore.getState().getValue(blockId, 'triggerCredentials') as
38 | string
39 | null
40 if (!credentialId) throw new Error('No HubSpot credential selected')
41 if (isCredentialSetValue(credentialId)) return []
42 const data = await requestJson(hubspotPropertiesSelectorContract, {
43 query: { credentialId, objectType },
44 })
45 return data.properties.map((p) => ({ id: p.id, label: p.name }))
46}
47
48export const hubspotPollingTrigger: TriggerConfig = {
49 id: 'hubspot_poller',

Callers 1

poller.tsFile · 0.85

Calls 2

isCredentialSetValueFunction · 0.90
requestJsonFunction · 0.90

Tested by

no test coverage detected