Hey @Jon, thank’s for your answer.
This node is a simplification of this worklow :
- a basic custom node (I developed - with custom credential) to get the last companies dataset update date
- a native Hubspot node with Hubspot Credential readings recent new or modified companies since this last update date
- an other more complex custom node that updating a companies dataset in our solution. User need to define a row identifer dataset column, user have to map each dataset column with an input item value (Hubspot company in this case, there can be a lot of them, boring to define for the user), …
After simplification, worklow have only one node :

User has less setup to do :
At the same time I took the opportunity to solve another problem: the Hubspot API “Get recently modified and created companies” does not return the properties labels of type “enumeration”, so this node is doing other Hubspot API calls (Get all company properties, Get owners, …) to convert codes into labels.
In summary, this simplified node has the disadvantage of being very specific, but has the advantage of simplifying the interaction between the two solutions.
To makes API calls to Hubspot and to our solution with the correct credential, the “execute” method use this functions :
/**
* Make an API request to Hubspot
*/
export async function hubspotApiRequest(
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions,
method: IHttpRequestMethods,
endpoint: string,
body: IDataObject | GenericValue | GenericValue[] = {},
query: IDataObject = {},
) {
const options: IHttpRequestOptions = {
method,
body,
qs: query,
url: `https://api.hubapi.com/${endpoint}`,
headers: {
'content-type': 'application/json; charset=utf-8',
},
};
return this.helpers.httpRequestWithAuthentication.call(this, 'hubspotAppToken', options);
}
/**
* Make an API request to Geoptis Solution
*/
export async function geoptisSolutionApiRequest(
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions,
method: IHttpRequestMethods,
endpoint: string,
body: IDataObject | GenericValue | GenericValue[] = {},
query: IDataObject = {},
) {
const credentials = await this.getCredentials('geoptisSolutionApi');
const options: IHttpRequestOptions = {
method,
body,
qs: query,
url: `https://${credentials.host}/api/v1/${endpoint}`,
headers: {
'content-type': 'application/json; charset=utf-8',
},
};
return this.helpers.httpRequestWithAuthentication.call(this, 'geoptisSolutionApi', options);
}